:root {
  --green: #407740;
  --green-dark: #2e5a30;
  --ink: #14231a;
  --flag: #d7261e;
  --text: #1f2a24;
  --muted: #55615a;
  --line: #dfe5e0;
  --bg: #ffffff;
  --bg-soft: #f3f6f3;
  --radius: 10px;
  --head: "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 17px/1.5 var(--body); color: var(--text); background: var(--bg-soft); }
:focus-visible { outline: 3px solid var(--flag); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); text-transform: uppercase; color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.15rem; margin-top: 0; }
header { background: var(--ink); color: #fff; }
header .in { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
header img { width: 44px; height: 44px; border-radius: 8px; background: #fff; }
header span { font: 700 1.2rem var(--head); text-transform: uppercase; letter-spacing: .03em; }
.wrap { width: min(720px, 100% - 32px); margin-inline: auto; }
main { padding: 24px 0 64px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.muted { color: var(--muted); font-size: .92rem; }
.banner { background: #fff6d6; border: 1px solid #e8d48a; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font: 600 .95rem var(--body); color: var(--text); cursor: pointer; }
.chip small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.chip:hover { border-color: var(--green); }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.chip[aria-pressed="true"] small { color: #e3f0e3; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.days .chip { flex: 0 0 auto; text-align: center; border-radius: var(--radius); min-width: 64px; }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.times .chip { border-radius: var(--radius); }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #b9c4bc; border-radius: 8px; font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .6em 1.4em; border-radius: 999px; background: var(--green); color: #fff; font: 600 1rem var(--head); text-transform: uppercase; letter-spacing: .04em; border: 2px solid var(--green); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-ghost { background: #fff; color: var(--flag); border-color: var(--flag); }
.btn-ghost:hover { background: var(--flag); color: #fff; border-color: var(--flag); }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 16px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.error { color: var(--flag); font-weight: 600; min-height: 1.5em; margin: 10px 0 0; }
.empty { color: var(--muted); padding: 8px 0; }
[hidden] { display: none !important; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--head); text-transform: uppercase; font-weight: 600; color: var(--muted); }
tr.cancelled td { color: var(--muted); text-decoration: line-through; }
.table-scroll { overflow-x: auto; }
tr.attention td { background: #fff6d6; border-bottom: 1px solid #e8d48a; text-decoration: none; color: var(--text); }
tr.attention .chip { margin-left: 8px; min-height: 36px; padding: 4px 12px; }

/* Header link (Member sign in / My account / Sign out) */
.hdr-link { margin-left: auto; color: #fff; font: 600 .95rem var(--body); text-decoration: none; background: none; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.hdr-link:hover { background: #fff; color: var(--ink); }
.wrap.wide { width: min(1100px, 100% - 32px); }
.narrow { max-width: 460px; margin-inline: auto; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-plain { background: #fff; color: var(--green-dark); border-color: var(--line); }
.btn-plain:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--green); }
.member-box { background: #fff; border: 2px solid var(--green); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
ul.plain { list-style: none; padding: 0; margin: 0 0 12px; }
ul.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }
ul.small { font-size: .9rem; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); color: var(--green-dark); border: 1px solid var(--line); vertical-align: middle; text-transform: capitalize; }
.tag-paused { background: #fff6d6; color: #7a5b00; border-color: #e8d48a; }
.tag-cancelled { background: #fbe9e8; color: #8f1b15; border-color: #f0c2bf; }
.meter { margin: 0 0 14px; }
.meter-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.bar { height: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.bar span { display: block; height: 100%; background: var(--green); }
select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #b9c4bc; border-radius: 8px; font: inherit; background: #fff; }
code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 1.05em; }

/* Admin */
.tabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 2px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 10px 14px; font: 600 1rem var(--head); text-transform: uppercase; letter-spacing: .03em; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--green); }
.notice { background: #e8f3e8; border: 1px solid #b7d7b7; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; }
.notice .chip { margin-left: 8px; min-height: 34px; padding: 4px 12px; }
.list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 4px; }
.list-head h2 { margin: 0 auto 0 0; }
.list-head input { width: min(320px, 100%); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td, tr.clickable:focus td { background: var(--bg-soft); }
tr.status-cancelled td, tr.status-paused td { color: var(--muted); }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.grid-form label { margin: 10px 0 0; }
.grid-form label input, .grid-form label select, .grid-form label textarea { margin-top: 4px; font-weight: 400; }
.grid-form .full { grid-column: 1 / -1; }
.grid-form .btn-row, .grid-form > div.full { margin-top: 14px; }
.grid-form h3 { margin: 18px 0 0; font-size: 1rem; }
.person { padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.person-actions .chip { min-height: 38px; padding: 6px 12px; }
.adj-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 8px; }
.adj-form label { margin: 0; }
.adj-form label > * { margin-top: 4px; }
.adj-form .grow { flex: 1 1 220px; }

/* Admin calendar */
.cal-card { padding-bottom: 12px; }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.cal-toolbar h2 { margin: 0 auto 0 0; font-size: 1.2rem; }
.cal-toolbar .chip { min-height: 40px; padding: 6px 14px; }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 16px; font: 600 .95rem var(--body); color: var(--text); cursor: pointer; min-height: 40px; }
.seg button + button { border-left: 2px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--green); color: #fff; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.cal-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
#calBody.loading { opacity: .5; }

/* event colours: website / member / waiting for payment / Bay Manager */
.ev-online { --ev: #407740; --ev-bg: #e6f1e6; }
.ev-member { --ev: #1f5f99; --ev-bg: #e3eef8; }
.ev-pending { --ev: #a26b00; --ev-bg: #fff3d6; }
.ev-baymanager { --ev: #5d6b63; --ev-bg: #eef1ef; }
.ev-party { --ev: #6b3fa0; --ev-bg: #f0e8fa; }
.ev-lesson { --ev: #0f6f6a; --ev-bg: #e0f3f1; }
.sw.ev-online, .sw.ev-member, .sw.ev-pending, .sw.ev-baymanager, .sw.ev-party, .sw.ev-lesson { background: var(--ev); }

/* day view: bays in columns */
.day-grid { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.day-head, .day-body { display: grid; grid-template-columns: 52px repeat(3, minmax(0, 1fr)); }
.day-head { background: var(--ink); color: #fff; font: 600 1rem var(--head); text-transform: uppercase; letter-spacing: .04em; text-align: center; }
.day-head div { padding: 10px 4px; }
.day-head div + div { border-left: 1px solid rgba(255,255,255,.2); }
.day-body { position: relative; }
.time-col, .bay-col { position: relative; }
.bay-col { border-left: 1px solid var(--line); }
.time-label { position: absolute; right: 6px; transform: translateY(-50%); font-size: .75rem; color: var(--muted); }
.time-label:first-child { transform: none; }
.grid-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.grid-line.half { border-top-style: dashed; opacity: .6; }
.closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #f4f6f4, #f4f6f4 6px, #eceff0 6px, #eceff0 12px); }
.ev { position: absolute; left: 4px; right: 4px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; overflow: hidden;
      text-align: left; padding: 4px 8px; border: 0; border-left: 4px solid var(--ev); border-radius: 6px; background: var(--ev-bg); color: var(--text);
      font: .82rem/1.25 var(--body); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ev strong { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ev span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ev:hover, .ev:focus-visible { filter: brightness(.96); z-index: 2; }

/* week view */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.week-col { background: var(--bg-soft); border-radius: var(--radius); padding: 6px; min-height: 160px; }
.week-col.today { outline: 2px solid var(--green); }
.week-head { display: block; width: 100%; border: 0; background: none; text-align: left; padding: 4px 4px 8px; font: 600 .9rem var(--body); color: var(--muted); cursor: pointer; }
.week-head b { color: var(--ink); font-size: 1.1rem; }
.week-ev { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--ev); background: var(--ev-bg); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; font: .82rem/1.3 var(--body); color: var(--text); cursor: pointer; }
.week-ev b, .week-ev span { display: block; }
.week-ev span { color: var(--muted); }
.empty.small { font-size: .82rem; padding: 4px; }

/* month view */
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.month-dow { padding: 6px; font: 600 .8rem var(--head); text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.month-cell { position: relative; min-height: 112px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.month-cell.other { background: #fafbfa; }
.month-cell.other .month-day { color: #9aa49e; }
.month-cell.today .month-day { background: var(--green); color: #fff; }
.month-day { border: 0; background: none; width: 28px; height: 28px; border-radius: 50%; font: 600 .9rem var(--body); color: var(--ink); cursor: pointer; }
.month-day:hover { background: var(--bg-soft); }
.ev-line { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--ev); background: var(--ev-bg); border-radius: 4px; padding: 2px 5px; margin-top: 3px;
           font: .75rem/1.3 var(--body); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.more { border: 0; background: none; padding: 2px 4px; font: 600 .75rem var(--body); color: var(--green-dark); cursor: pointer; }
.month-sum { position: absolute; top: 8px; right: 6px; font-size: .72rem; color: var(--muted); }

.ev-dialog { border: 0; border-radius: var(--radius); padding: 24px; width: min(440px, calc(100% - 32px)); box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.ev-dialog::backdrop { background: rgba(20,35,26,.45); }
.ev-dialog h2 { font-size: 1.3rem; }

@media (max-width: 640px) {
  .day-head, .day-body { grid-template-columns: 40px repeat(3, minmax(0, 1fr)); }
  .ev { padding: 3px 5px; font-size: .75rem; }
  .month-cell { min-height: 74px; }
  .month-cell .ev-line { font-size: 0; height: 6px; padding: 0; } /* phones: coloured dots per booking */
  .month-sum { display: none; }
  .cal-toolbar h2 { order: -1; width: 100%; }
}

/* Clover card form */
.card-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin: 8px 0; }
.card-field-card_number { grid-column: 1 / -1; }
.card-label { display: block; font-weight: 600; margin-bottom: 4px; }
.card-frame { min-height: 46px; border: 1px solid #b9c4bc; border-radius: 8px; padding: 0 4px; background: #fff; overflow: hidden; }
.card-frame iframe { width: 100%; height: 44px; border: 0; }
.card-err { color: var(--flag); font-size: .85rem; min-height: 1.2em; margin: 2px 0 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.consent input { width: 20px; min-height: 20px; height: 20px; margin-top: 3px; flex: none; }
.secure-note { font-size: .85rem; color: var(--muted); }
.tag-past_due, .tag-check, .tag-no_card, .tag-failed { background: #fbe9e8; color: #8f1b15; border-color: #f0c2bf; }
.tag-paid { background: #e6f1e6; color: #2e5a30; border-color: #b7d7b7; }
.billing-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 10px 0; }
.billing-row label { margin: 0; }
.billing-row label > * { margin-top: 4px; }

/* Who's coming steppers (member bookings) */
.stepper { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stepper > span { flex: 1; }
.stepper small { display: block; color: var(--muted); font-size: .85rem; }
.stepper .chip { width: 44px; padding: 0; font-size: 1.3rem; line-height: 1; }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; font-size: 1.1rem; }
#partyBox h3 { margin: 16px 0 4px; font-size: 1rem; }

/* Waiver */
.waiver-text { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--bg-soft); font-size: .9rem; line-height: 1.5; margin-bottom: 8px; }
.waiver-text.small-text { max-height: 220px; margin-top: 12px; }
.waiver-text p { margin: 0 0 .8em; }
.sig-pad { display: block; width: 100%; height: 150px; border: 1px dashed #8a978f; border-radius: 8px; background: #fff; touch-action: none; margin-bottom: 6px; }
.minors { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 6px; }
.minor-row { display: grid; grid-template-columns: 1fr 180px auto; gap: 10px; align-items: end; margin-bottom: 8px; }
.minor-row label { margin: 0; }
.minor-row .chip { min-height: 46px; }
.share-box { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 6px; }
.waiver-status { margin: 4px 0 0; }
@media (max-width: 560px) { .minor-row { grid-template-columns: 1fr 1fr; } .minor-row .chip { grid-column: 1 / -1; } }
.sig-img { max-width: 360px; width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
@media print {
  header, .tabs, .no-print, #testBanner, #notice, #waiverList { display: none !important; }
  body { background: #fff; }
  .card { border: 0; padding: 0; }
  .waiver-text.print-full { max-height: none; overflow: visible; border: 0; background: none; }
}

/* Status badges (admin Bookings tab) */
.st { display: inline-block; white-space: nowrap; font-size: .8rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid; line-height: 1.3; }
.st-ok { background: #e6f1e6; color: #24502a; border-color: #b7d7b7; }
.st-warn { background: #fff3d6; color: #6e4b00; border-color: #e8d48a; }
.st-bad { background: #fbe9e8; color: #8f1b15; border-color: #f0c2bf; }
.st-member { background: #e3eef8; color: #174a78; border-color: #b8d1ea; }
.st-neutral { background: #f1f3f2; color: #4c5852; border-color: #dfe5e0; }
.status-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.bookings-table td { vertical-align: middle; }
tr.cancelled .st { text-decoration: none; }
/* status badges inside calendar bookings */
.ev-badges { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; white-space: normal !important; }
.ev .ev-badges .st, .week-ev .ev-badges .st { font-size: .68rem; padding: 1px 6px; }
.week-ev .ev-badges { margin-top: 4px; }
.mi { display: inline-block; font-weight: 700; margin-right: 2px; }
.mi-member { color: #1f5f99; } .mi-warn { color: #a26b00; } .mi-bad { color: #b3261e; }
.cal-legend-symbols span { white-space: nowrap; }
.week-ev .ev-badges { display: flex; }
.week-ev .ev-badges .st { display: inline-block; }
.week-ev .ev-badges .st span, .ev .ev-badges .st span { display: inline; color: inherit; }
.ev .ev-badges .st-ok, .week-ev .ev-badges .st-ok { color: #24502a; }
.ev .ev-badges .st-warn, .week-ev .ev-badges .st-warn { color: #6e4b00; }
.ev .ev-badges .st-bad, .week-ev .ev-badges .st-bad { color: #8f1b15; }
.ev .ev-badges .st-member, .week-ev .ev-badges .st-member { color: #174a78; }
.ev .ev-badges .st-neutral, .week-ev .ev-badges .st-neutral { color: #4c5852; }
.req { color: var(--flag); font-weight: 700; }
.field-err { color: var(--flag); font-size: .9rem; font-weight: 600; margin: 4px 0 0; min-height: 0; }
.field-err:empty { display: none; }
input[aria-invalid="true"] { border-color: var(--flag); box-shadow: 0 0 0 1px var(--flag); }

/* Email / text choices */
.mkt-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px 4px; margin: 14px 0 6px; background: var(--bg-soft); }
.mkt-box legend { font-weight: 700; padding: 0 6px; }
.mkt-box .consent { margin: 8px 0; font-size: .92rem; }
.optout-card { border-color: #f0c2bf; background: #fffafa; }
.optout-card h3 { margin-top: 0; color: #8f1b15; }
.row-actions .chip { min-height: 34px; padding: 4px 10px; font-size: .82rem; margin: 2px 0; }

/* ---------- Phones ---------- */
.consent input[type="checkbox"] { width: 22px; height: 22px; min-height: 22px; }
.hdr-link { min-height: 42px; }
.chip-link { display: inline-flex; align-items: center; margin-top: 6px; min-height: 40px; text-decoration: none; }
@media (max-width: 700px) {
  /* admin tables become stacked cards */
  .table-scroll:has(.stack-table) { overflow-x: visible; }
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table thead { display: none; }
  .stack-table tr { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 10px; background: #fff; }
  .stack-table td { border: 0; padding: 5px 0; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
  .stack-table td::before { content: attr(data-label); flex: 0 0 84px; color: var(--muted); font: 600 .75rem var(--head); text-transform: uppercase; letter-spacing: .03em; }
  .stack-table td[data-label=""]::before { display: none; }
  .stack-table td { flex-wrap: nowrap; }
  .stack-table td > .cell { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .stack-table tr.attention { background: #fff6d6; }
  .stack-table tr.clickable { cursor: pointer; }
  .stack-table td.empty { display: block; }
  /* tabs wrap so every tab is visible */
  .tabs { flex-wrap: wrap; overflow-x: visible; }
  .tabs button { padding: 11px 10px; font-size: .9rem; }
  /* waiver text: shorter so it doesn't trap scrolling */
  .waiver-text { max-height: 42vh; }
}
@media (max-width: 640px) {
  /* calendar day view: symbols only, names can use two lines */
  .ev .ev-badges .st .st-word { display: none; }
  .ev .ev-badges .st { padding: 0 4px; }
  .ev strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .cal-legend { font-size: .8rem; }
}
@media (max-width: 700px) { .row-actions .chip { min-height: 40px; } }

/* New booking dialog (walk-ins) */
.wk-dialog { width: min(520px, calc(100% - 24px)); max-height: 92vh; overflow-y: auto; }
.wk-dialog h3 { font-size: .95rem; margin: 16px 0 6px; }
.wk-dialog label { margin: 10px 0 0; }
.wk-dialog label input { margin-top: 4px; font-weight: 400; }
.wk-seg { margin: 6px 0 4px; }
.wk-svc .chip small { display: block; font-weight: 400; color: var(--muted); }
.wk-svc .chip[aria-pressed="true"] small { color: inherit; opacity: .85; }
.wk-later { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wk-member-list { display: grid; gap: 6px; margin-top: 8px; max-height: 240px; overflow-y: auto; }
.wk-member { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; font: inherit; cursor: pointer; }
.wk-member.picked { border-color: var(--green); background: #e6f1e6; box-shadow: 0 0 0 1px var(--green); }
.wk-quote { margin: 14px 0 0; padding: 10px 12px; background: var(--bg-soft); border-radius: 8px; min-height: 1em; }
.wk-quote:empty { display: none; }
.cal-toolbar .new-booking, .list-head .new-booking { min-height: 42px; }
.consent input[type="radio"] { width: 22px; height: 22px; min-height: 22px; flex: none; margin-top: 3px; }
/* short bookings (e.g. 30 min): name, then time and symbol-only badges on one line */
.ev.ev-short { flex-direction: row; flex-wrap: wrap; align-content: flex-start; column-gap: 6px; padding-top: 2px; padding-bottom: 2px; }
.ev.ev-short strong { flex-basis: 100%; }
.ev.ev-short .ev-badges { margin-top: 0; }
.ev.ev-short .ev-badges .st .st-word { display: none; }
.ev.ev-short .ev-badges .st { padding: 0 4px; }
.wk-later { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.wk-later label, .wk-later input { min-width: 0; width: 100%; }

/* Calendar: 5-minute blocks; click an empty one to book it */
.bay-col { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--slot, 7px) - 1px),
           rgba(20, 40, 28, .045) calc(var(--slot, 7px) - 1px), rgba(20, 40, 28, .045) var(--slot, 7px)); }
.bay-col.slot-ok { cursor: pointer; }
.grid-line.quarter { border-top-style: dotted; opacity: .45; }
.slot-hover { position: absolute; left: 2px; right: 2px; z-index: 3; pointer-events: none;
              background: rgba(46, 125, 50, .22); border: 1px solid var(--green); border-radius: 3px; }
.slot-hover::after { content: attr(data-label); position: absolute; left: 4px; bottom: calc(100% + 2px); white-space: nowrap;
                     font-size: .72rem; font-weight: 700; color: #fff; background: var(--green-dark); padding: 1px 6px; border-radius: 4px; }
/* blocked time */
.ev-block { --ev: #8a948e; --ev-bg: repeating-linear-gradient(45deg, #eef0ef, #eef0ef 6px, #e2e6e3 6px, #e2e6e3 12px); }
.ev.ev-block, .week-ev.ev-block, .ev-line.ev-block { background: var(--ev-bg); }
.sw.ev-block { background: #8a948e; }

/* footer and policy page */
.site-foot { color: var(--muted, #55615a); font-size: .85rem; text-align: center; padding: 8px 16px 28px; }
.site-foot a { color: inherit; }
.policy { max-width: 760px; margin-inline: auto; line-height: 1.6; }
.policy h2 { margin-top: 1.6em; }
.policy ul { padding-left: 1.2em; }
.policy li { margin-bottom: .4em; }

/* ================================================================ theme (matches golfers-den.com)
   Oswald headlines, dark green, red flag accents, venue photos behind the top of each page. */
@font-face {
  font-family: "Oswald";
  src: url(/fonts/oswald-latin.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root { --brown: #4a1f14; --ink-2: #1d3226; --shadow: 0 10px 30px rgba(10, 22, 14, .10), 0 2px 6px rgba(10, 22, 14, .06); }
body { background: #eef3ef; }

/* Header: dark bar with a thin red/green stripe, like the main site's top bar */
header { background: linear-gradient(90deg, #0d1a12, var(--ink) 60%, var(--ink-2)); border-bottom: 3px solid var(--green); position: relative; z-index: 2; }
header img { width: 46px; height: 46px; box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
header span { font-size: 1.35rem; letter-spacing: .05em; }
.hdr-link { font-family: var(--head); text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }

/* Headlines */
h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: .02em; }
.eyebrow { font: 600 .9rem var(--head); text-transform: uppercase; letter-spacing: .12em; color: #cfe0d3; margin: 0 0 10px; }
.eyebrow::before { content: ""; display: inline-block; width: 11px; height: 11px; background: var(--flag);
  clip-path: polygon(0 0, 100% 35%, 0 70%); margin-right: 8px; }

/* Hero (booking page): venue photo with the main site's dark green overlay */
.hero { position: relative; color: #fff; background: var(--ink) url(/img/hero-768.webp) center / cover no-repeat; isolation: isolate; }
@media (min-width: 769px) { .hero { background-image: url(/img/hero.webp); } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,22,14,.62) 0%, rgba(10,22,14,.86) 100%); }
@media (min-width: 900px) { .hero::after { background: linear-gradient(90deg, rgba(10,22,14,.9) 0%, rgba(10,22,14,.65) 55%, rgba(10,22,14,.35) 100%); } }
.hero .wrap { padding: clamp(36px, 7vw, 72px) 0 clamp(70px, 10vw, 110px); }
.hero h1 { color: #fff; margin-bottom: .25em; }
.hero .lead { font-size: clamp(1rem, 2.2vw, 1.15rem); color: #e6efe8; max-width: 34em; margin: 0; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; padding: 0; margin: 18px 0 0; font-size: .95rem; color: #cfe0d3; }
.hero-facts li::before { content: "✓ "; color: #9fd3a4; font-weight: 700; }
.hero + main { margin-top: -56px; position: relative; padding-top: 0; }

/* Other customer pages: a shorter photo band behind the top of the page */
body.photo-top { position: relative; isolation: isolate; }
body.photo-top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 270px; z-index: -1;
  background: linear-gradient(180deg, rgba(10,22,14,.72), rgba(10,22,14,.9)), var(--ink) url(/img/bays-768.webp) center 40% / cover no-repeat; }
@media (min-width: 769px) { body.photo-top::before { height: 300px;
  background: linear-gradient(180deg, rgba(10,22,14,.7), rgba(10,22,14,.9)), var(--ink) url(/img/bays.webp) center 40% / cover no-repeat; } }
body.photo-top main > h1:first-child, body.photo-top main > .page-title { color: #fff; }
body.photo-top main > .page-title + p, body.photo-top main > h1:first-child + p { color: #e6efe8; }

/* Cards: lift off the page, green accent on top */
.card { border: 0; border-top: 4px solid var(--green); box-shadow: var(--shadow); padding: 22px 22px 20px; }
.card h2 { font-size: 1.25rem; display: flex; align-items: center; gap: 10px; }
.step { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: #fff; font: 600 1rem var(--head); }
.member-box { box-shadow: var(--shadow); border-width: 0 0 0 5px; }
.banner { box-shadow: var(--shadow); }

/* Choices: richer selected state, gentle hover */
.chip { transition: border-color .15s, background .15s, transform .1s; }
.chip:hover { border-color: var(--green); background: #f5faf5; }
.chip:active { transform: scale(.98); }
.chip[aria-pressed="true"] { background: linear-gradient(180deg, #4b8a4b, var(--green)); border-color: var(--green-dark);
  box-shadow: 0 4px 12px rgba(64,119,64,.35); }
.days .chip { font-family: var(--head); letter-spacing: .03em; }
.btn { box-shadow: 0 6px 16px rgba(64,119,64,.30); }
.btn:hover { transform: translateY(-1px); }
input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(64,119,64,.2); }

/* Footer: dark like the main site */
.site-foot { background: var(--ink); color: #b9cbbf; padding: 26px 16px 30px; margin-top: 24px; font-size: .9rem; line-height: 1.7; }
.site-foot a { color: #e6efe8; }
.site-foot strong { font: 600 1.05rem var(--head); text-transform: uppercase; letter-spacing: .06em; color: #fff; }
body.admin .site-foot { display: none; }
header span { white-space: nowrap; }
@media (max-width: 420px) { header span { font-size: 1.1rem; letter-spacing: .03em; } header img { width: 40px; height: 40px; } .hdr-link { padding: 7px 11px; font-size: .85rem; } }
.site-foot a[href^="tel:"] { white-space: nowrap; }

/* Promo code on the booking page and admin */
.promo-box { margin: 16px 0 6px; padding: 12px 14px; border: 1px dashed #b7cbbb; border-radius: var(--radius); background: #f6faf6; }
.promo-box label { margin-top: 0; }
.promo-row { display: flex; gap: 8px; }
.promo-row input { flex: 1; text-transform: uppercase; letter-spacing: .06em; }
.promo-row .chip { flex: none; }
.promo-ok { color: var(--green-dark); font-weight: 600; margin: 8px 0 0; }
#promoMsg:empty, #refMsg:empty { display: none; }
#promoMsg.error, #refMsg.error { margin: 8px 0 0; min-height: 0; }
.promo-table td, .promo-table th { vertical-align: middle; }
.notify-table .notify-who { text-align: center; white-space: nowrap; }
.notify-table input[type="checkbox"] { width: 22px; height: 22px; }
.promo-code { font: 600 1.05rem var(--head); letter-spacing: .06em; }
.tag-active { background: #e8f3e8; color: var(--green-dark); border-color: #b7d7b7; }
.tag-scheduled { background: #eef3fb; color: #2a4f86; border-color: #c4d4ee; }
.tag-expired, .tag-used-up { background: #f1f1f1; color: #666; }

/* Loyalty points box (booking page, member page, preferences) */
.loyalty-box { border-left: 5px solid var(--flag); background: #fff; }
.loyalty-box .points { font: 700 2rem/1 var(--head); color: var(--ink); }
.loyalty-box .bar { margin: 8px 0 12px; }
.ref-code { display: inline-block; font: 700 1.2rem var(--head); letter-spacing: .12em; padding: 4px 12px; border: 2px dashed var(--green); border-radius: 8px; background: #f6faf6; }
#loyaltyQ { text-transform: none; letter-spacing: normal; }
.signout-chip { margin-left: 6px; min-height: 34px; padding: 4px 12px; vertical-align: middle; }
.signed-in-note { text-align: center; margin: 0 0 24px; }
/* Very narrow screens: the name shrinks, the header button always fits */
header .in { min-width: 0; }
header span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hdr-link { flex: none; }
/* Sign-in page: members' button first, then the code sign-in for everyone else */
.signin-member { padding: 14px 16px; margin: 0 0 18px; border-radius: var(--radius); background: #f6faf6; border: 1px solid #cfe0d3; }
.signin-member h2, .signin-or { font-size: 1.05rem; margin: 0 0 4px; }
.signin-member p { margin: 0 0 10px; }
.signin-or { margin-top: 4px; }
#priceNote:empty { display: none; }

/* Settings: pricing */
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0 14px; align-items: end; }
.price-grid label { margin: 10px 0 0; }
.price-grid-btn { grid-column: 1 / -1; margin-top: 14px; }
.money-in { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-weight: 600; }
.money-in input { margin: 0; }
.day-picks { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 10px 0 0; }
.day-picks legend { font-weight: 600; padding: 0 4px; }
.day-check { display: inline-flex; align-items: center; gap: 4px; margin: 4px 12px 4px 0; font-weight: 500; }
.day-check input { width: 20px; min-height: 20px; height: 20px; }
.day-picks > .muted { display: block; margin-top: 8px; }
/* "Longer…" length stepper on the booking page */
.longer-box { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 14px; border: 2px solid var(--green); border-radius: var(--radius); background: #f6faf6; width: fit-content; max-width: 100%; }
.longer-box .chip { width: 48px; padding: 0; font-size: 1.4rem; line-height: 1; }
.longer-box output { min-width: 150px; text-align: center; font-family: var(--head); font-size: 1.15rem; }
.longer-box output small { display: block; font-family: var(--body); font-size: .85rem; color: var(--muted); }
.price-examples { grid-column: 1 / -1; margin: 10px 0 0; }
.times > .empty { grid-column: 1 / -1; }
.price-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.longer-note { margin: 8px 0 0; }

/* Become a member (/join) */
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.plan-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px; border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.plan-card strong { font: 600 1.15rem var(--head); text-transform: uppercase; letter-spacing: .03em; color: var(--ink); }
.plan-card:hover { border-color: var(--green); }
.plan-card[aria-pressed="true"] { border-color: var(--green-dark); box-shadow: 0 4px 14px rgba(64,119,64,.3); background: #f6faf6; }
.plan-price { font: 700 1.6rem var(--head); color: var(--green-dark); }
.plan-price small { font: 400 .85rem var(--body); color: var(--muted); }
.join-total { margin: 18px 0 6px; padding: 12px 14px; background: #f6faf6; border: 1px solid #cfe0d3; border-radius: var(--radius); }
.hero-cta { margin-top: 18px; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.8); box-shadow: none; }
.btn-outline-light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.ev-extra-other { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.ev-extra-other input { width: 4.5em; min-height: 36px; margin: 0; }
.pay-btn { all: unset; cursor: pointer; border-radius: 999px; }
.pay-btn:hover .st, .pay-btn:focus-visible .st { box-shadow: 0 0 0 2px var(--green); }
.pay-btn:focus-visible { outline: none; }
.pay-btn .st::after { content: " ▾"; font-size: .7em; }
.pay-dialog { max-width: 420px; }
/* Customers tab: open a customer by clicking their row or name */
.click-row { cursor: pointer; }
.click-row:hover td { background: #f4f8f5; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; }
.link-btn strong { color: inherit; }
/* Employee access: a tab (or the shared booking windows) a login can only view. Buttons that change
   things are hidden; form fields can't be used. The server refuses the changes anyway. */
.ro :is(button, .btn, input[type=file]):not([data-ro-ok], [data-ro-ok] *, .ev, .week-ev, .ev-line, .month-day, .week-head, .more, .link-btn, .pay-btn) { display: none !important; }
.ro [data-edit-only] { display: none !important; }
.ro form:not([data-ro-ok]) :is(input, select, textarea) { pointer-events: none; background: #f4f6f4; }
.ro .click-row, .ro tr.clickable { cursor: pointer; }
/* Settings → Employee access */
.access-person { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.access-person h3 { margin-bottom: 8px; }
.access-person h3 .muted { text-transform: none; font-family: var(--body); font-weight: 400; }
.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; margin-bottom: 10px; }
.access-grid label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.ro .pay-btn { pointer-events: none; }
/* Members list: who signed each member up */
.signup-pick { min-width: 150px; min-height: 38px; padding: 6px 8px; }
.signup-pick.saved { border-color: var(--green-dark); box-shadow: 0 0 0 2px var(--bg-soft); }
/* Calendar / Bookings: "updates by itself" line */
.live-note { margin: 4px 0 8px; font-size: .82rem; }

/* "Home" button back to golfers-den.com, before the page's own header button */
.hdr-home { margin-left: auto; }
.hdr-home + .hdr-link { margin-left: 0; }
@media (max-width: 420px) { header .in { gap: 8px; } }
@media (max-width: 420px) { header .hdr-name-wide { display: none; } }

/* Calendar: drag a booking to change its start */
.ev.ev-drag { cursor: grab; touch-action: pan-y; }
.ev.dragging { cursor: grabbing; z-index: 6; opacity: .9; box-shadow: 0 8px 20px rgba(0,0,0,.25); outline: 2px solid var(--green-dark); }

/* current time line on the day view */
.now-line { position: absolute; left: 52px; right: 0; height: 0; border-top: 2px solid #d62828; z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #d62828; }
.now-line span { position: absolute; right: 4px; top: -1px; transform: translateY(-50%); background: #d62828; color: #fff; font: 600 .7rem/1 var(--body); padding: 2px 5px; border-radius: 4px; }
.now-line[hidden] { display: none; }
.bay-col.drop-bay { background-color: rgba(46, 125, 50, .08); }
