/* Fliqshot Pickleball Courts — design tokens follow design-system/pd-pickleball-hub/MASTER.md,
   with the palette replaced by colours sampled from the Fliqshot logo (teal oval, lime ball). */
:root {
  /* Brand */
  --pd-blue: #276884;        /* Fliqshot logo teal */
  --pd-blue-700: #1d5169;
  --pd-blue-50: #e7f1f5;
  --pd-red: #c8384d;         /* errors, warnings and delete only */
  --pd-red-700: #a92b3f;
  --pd-lime: #b4f05a;        /* Fliqshot logo ball: buttons and stripes, dark text on it */
  --pd-lime-700: #98d83c;
  --pd-teal: #2e6f84;        /* interior wall band */
  --pd-court: #4fa8d8;       /* court surface */

  /* Semantic */
  --color-bg: #f4f7fa;
  --color-surface: #ffffff;
  --color-ink: #0f2a36;      /* header / dark bands */
  --color-ink-2: #163846;
  --color-text: #13202e;
  --color-text-muted: #4a5868;
  --color-text-on-dark: #ffffff;
  --color-text-on-dark-muted: #b9c6d3;
  --color-border: #dce3ea;
  --color-success: #0f7a4a;
  --color-focus: #ffb703;

  --color-primary: var(--pd-blue);
  --color-on-primary: #fff;
  --color-accent: var(--pd-lime);
  --color-on-accent: #0f2a36;

  /* Type */
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Space (4/8 rhythm) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 2px rgba(13, 27, 42, .06), 0 2px 8px rgba(13, 27, 42, .06);
  --shadow-2: 0 8px 28px rgba(13, 27, 42, .14);

  --container: 1120px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --dur: 200ms;

  --z-header: 40;
  --z-bar: 50;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pd-blue-700); }
a:hover { color: var(--pd-blue); }
button { font: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.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: var(--s-4); top: -100px; z-index: 100;
  background: var(--color-focus); color: #000; padding: var(--s-2) var(--s-4);
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-2); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-4); }
@media (min-width: 768px) { .container { padding-inline: var(--s-6); } }

/* ---------- Icons ---------- */
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5);
  font-family: var(--font-display); font-weight: 700; font-size: 1.125rem;
  letter-spacing: .04em; text-transform: uppercase; text-decoration: none;
  border: 2px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; touch-action: manipulation;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform 120ms var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover { background: var(--pd-lime-700); color: var(--color-on-accent); }
.btn-blue { background: var(--color-primary); color: #fff; }
.btn-blue:hover { background: var(--pd-blue-700); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn-ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-ghost:hover { border-color: var(--pd-blue); color: var(--pd-blue-700); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--color-ink);
  color: var(--color-text-on-dark);
  border-top: 4px solid var(--pd-blue);
  box-shadow: inset 0 4px 0 -0px transparent;
}
.site-header::before { /* red/blue brand stripe */
  content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 4px;
  background: linear-gradient(90deg, var(--pd-blue) 0 55%, var(--pd-lime) 55% 100%);
}
.header-inner { display: flex; align-items: center; gap: var(--s-4); min-height: 72px; padding-block: var(--s-3); }
.brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: inherit; min-width: 0; }
.brand-logo {
  background: var(--pd-blue); border-radius: var(--radius-sm); padding: 6px 8px;
  width: 112px; flex: none;
}
.brand-logo img { width: 100%; height: auto; }
.brand-text { display: none; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; color: #fff; }
.brand-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-3); font-size: .875rem; color: var(--color-text-on-dark-muted); }
.brand-meta span { display: inline-flex; align-items: center; gap: 4px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .02em;
  padding: 2px 10px; border-radius: 999px;
  background: rgba(255, 183, 3, .16); color: #ffd166;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.header-nav { display: none; margin-left: auto; }
.header-nav ul { list-style: none; display: flex; gap: var(--s-1); margin: 0; padding: 0; }
.header-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-3);
  color: var(--color-text-on-dark-muted); text-decoration: none; font-weight: 500; border-radius: var(--radius-sm);
}
.header-nav a:hover, .header-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }
.header-cta { margin-left: auto; }
.header-cta .btn { min-height: 44px; padding: 0 var(--s-4); font-size: 1rem; }
@media (min-width: 640px) { .brand-text { display: block; } }
@media (min-width: 1024px) {
  .header-nav { display: block; }
  .header-cta { margin-left: var(--s-3); }
  .brand-logo { width: 128px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--color-ink); isolation: isolate; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(13,27,42,.7) 0%, rgba(13,27,42,.25) 70%),
    linear-gradient(180deg, rgba(13,27,42,.35) 0%, rgba(13,27,42,.6) 45%, rgba(13,27,42,.94) 100%);
}
.hero-inner { min-height: min(78svh, 680px); display: flex; flex-direction: column; justify-content: flex-end; padding-block: var(--s-9) var(--s-7); }
.eyebrow {
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .14em;
  font-size: .9375rem; color: var(--pd-court);
}
.hero .eyebrow { color: #a9dbe9; }
.hero h1 {
  margin-top: var(--s-3);
  font-size: clamp(2.6rem, 8vw, 5.25rem); font-weight: 800; font-style: italic;
  text-transform: uppercase; letter-spacing: -.005em; max-width: 14ch;
}
.hero h1 .hl-red { color: var(--pd-lime); }
.hero-lede { margin-top: var(--s-4); font-size: 1.125rem; max-width: 56ch; color: #dbe5ee; }
.hero-actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero-facts {
  margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid rgba(255,255,255,.18);
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s-4);
}
.hero-facts div { display: flex; flex-direction: column; }
.hero-facts dt { font-size: .8125rem; text-transform: uppercase; letter-spacing: .1em; color: var(--color-text-on-dark-muted); order: 2; }
.hero-facts dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; line-height: 1.1; order: 1; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .hero-facts { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.render-note { position: absolute; right: var(--s-4); top: var(--s-4); font-size: .75rem; color: #dbe5ee; background: rgba(13,27,42,.6); padding: 2px 8px; border-radius: 999px; }

/* ---------- Sections ---------- */
.section { padding-block: var(--s-8); }
.section + .section { padding-top: 0; }
.section-intro { padding-bottom: var(--s-6); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-5); }
.section-title { font-size: clamp(2rem, 4.5vw, 2.75rem); font-weight: 800; font-style: italic; text-transform: uppercase; }
.section-sub { color: var(--color-text-muted); max-width: 60ch; margin-top: var(--s-2); }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--s-5); box-shadow: var(--shadow-1);
}
@media (min-width: 768px) { .card { padding: var(--s-6); } }
.label {
  font-family: var(--font-display); font-weight: 600; font-size: .9375rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--color-text-muted);
}

/* Intro */
.intro { display: grid; gap: var(--s-6); align-items: center; }
.intro p { font-size: 1.125rem; color: var(--color-text); max-width: 62ch; }
.intro p + p { margin-top: var(--s-4); }
.intro p.intro-address { margin-top: 4px; font-size: .8125rem; color: var(--color-text-muted); }
.intro.intro-text-only { grid-template-columns: minmax(0,1fr); }
.intro-figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-2); aspect-ratio: 4 / 3; }
.intro-figure img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .intro { grid-template-columns: 1.1fr 1fr; gap: var(--s-8); } }

/* Gallery */
.gallery { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0,1fr)); }
.gallery figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: #dfe7ee; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms var(--ease-out); }
.gallery .wide { grid-column: span 2; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s-5) var(--s-3) var(--s-2);
  color: #fff; font-weight: 600; font-size: .9375rem;
  background: linear-gradient(transparent, rgba(13,27,42,.85));
}
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .gallery .wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
}
.fineprint { margin-top: var(--s-3); font-size: .875rem; color: var(--color-text-muted); }

/* Pricing + hours */
.info-grid { display: grid; gap: var(--s-4); }
@media (min-width: 900px) { .info-grid { grid-template-columns: 1.4fr 1fr; } }
.price-row { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: var(--s-4); }
.price { border-radius: var(--radius); padding: var(--s-4); border: 1px solid var(--color-border); }
.price-row.is-single { grid-template-columns: 1fr; }
.price-amount { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.price-amount small { font-size: 1rem; font-weight: 600; color: var(--color-text-muted); }
.price-name { font-weight: 700; margin-top: var(--s-2); }
.price-when { font-size: .9375rem; color: var(--color-text-muted); }
.court-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s-3);
  border-radius: 999px; background: var(--pd-blue-50); color: var(--pd-blue-700);
  font-family: var(--font-display); font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.hours-list { margin: var(--s-4) 0 0; display: grid; gap: var(--s-2); }
.hours-list div { display: flex; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-2); border-bottom: 1px dashed var(--color-border); }
.hours-list dt { color: var(--color-text-muted); }
.hours-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.status-inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9375rem; color: #8a5a00; }
.status-inline::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e09b00; }

/* Amenities */
.amenities { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (min-width: 768px) { .amenities { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 1024px) { .amenities { grid-template-columns: repeat(5, minmax(0,1fr)); } }
.amenity {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3);
  border-radius: var(--radius); border: 1px solid var(--color-border); background: var(--color-surface);
}
.amenity-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--pd-blue-50); color: var(--pd-blue); flex: none; }
.amenity-name { font-weight: 600; line-height: 1.2; }
.amenity-state { display: block; font-size: .8125rem; font-weight: 500; color: var(--color-success); }
.amenity.is-off { background: transparent; border-style: dashed; }
.amenity.is-off .amenity-icon { background: #edf0f3; color: #7a8796; }
.amenity.is-off .amenity-name { color: var(--color-text-muted); }
.amenity.is-off .amenity-state { color: var(--color-text-muted); }

/* Terms */
.terms { border-left: 4px solid var(--pd-lime-700); }
.terms ul { margin: var(--s-4) 0 0; padding-left: 1.2em; display: grid; gap: var(--s-2); }
.terms li { max-width: 75ch; font-size: .875rem; line-height: 1.5; }
.terms ul { gap: 6px; }

/* Location + contact */
.loc-grid { display: grid; gap: var(--s-4); }
@media (min-width: 900px) { .loc-grid { grid-template-columns: 1.5fr 1fr; } }
.map-frame { border: 0; width: 100%; aspect-ratio: 16/10; border-radius: var(--radius); background: #dfe7ee; display: block; margin-top: var(--s-4); }
.address { font-style: normal; font-size: 1.125rem; margin-top: var(--s-3); }
.map-pic { aspect-ratio: auto; overflow: hidden; }
.map-pic img { display: block; width: 100%; height: auto; }
.map-link { font-weight: 700; color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.contact-list { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; gap: var(--s-4); }
.contact-list li { display: flex; gap: var(--s-3); align-items: center; }
.contact-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--pd-blue-50); color: var(--pd-blue); flex: none; }
.contact-k { display: block; font-size: .8125rem; text-transform: uppercase; letter-spacing: .1em; color: var(--color-text-muted); }
.contact-v { font-weight: 600; overflow-wrap: anywhere; }
.contact-v.is-tba { color: var(--color-text-muted); font-weight: 500; font-style: italic; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  background: var(--color-ink);
  padding-block: var(--s-8);
}
.cta-band::before, .cta-band::after { content: ""; position: absolute; top: 0; bottom: 0; width: 46%; transform: skewX(-18deg); z-index: 0; }
.cta-band::before { left: -14%; background: var(--pd-blue); opacity: .9; }
.cta-band::after { right: -14%; background: var(--pd-lime); opacity: .9; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band .cta-card { background: var(--color-ink); border-radius: var(--radius-lg); padding: var(--s-6) var(--s-5); max-width: 640px; margin-inline: auto; }
.cta-band h2 { font-size: clamp(2.2rem, 6vw, 3.5rem); font-weight: 800; font-style: italic; text-transform: uppercase; }
.cta-band p { color: var(--color-text-on-dark-muted); margin-top: var(--s-3); font-size: 1.125rem; }
.cta-band .btn { margin-top: var(--s-5); }

/* Footer */
.site-footer { padding-block: var(--s-6); color: var(--color-text-muted); font-size: .875rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; align-items: center; }
.footer-links, .footer-credit { font-size: .75rem; }
.footer-links a, .footer-credit a { color: inherit; }
.footer-credit { width: 100%; opacity: .85; }

/* Reveal motion (subtle) */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 350ms var(--ease-out), transform 350ms var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* =========================================================
   Booking page
   ========================================================= */
.subbar { background: var(--color-ink-2); color: var(--color-text-on-dark-muted); font-size: .9375rem; }
.subbar .container { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); justify-content: space-between; align-items: center; min-height: 44px; padding-block: var(--s-2); }
.subbar a { color: #9fd4f2; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.subbar a:hover { color: #fff; }

.demo-banner {
  display: flex; gap: var(--s-3); align-items: flex-start;
  background: #fff7e0; border: 1px solid #f1d58a; color: #5a4100;
  border-radius: var(--radius); padding: var(--s-3) var(--s-4); margin-top: var(--s-5);
}
.demo-banner strong { color: #3f2d00; }

.booking-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: var(--s-5); margin-top: var(--s-5); padding-bottom: var(--s-6); }
.booking-layout > * { min-width: 0; }
@media (min-width: 1024px) { .booking-layout { grid-template-columns: 300px minmax(0,1fr); align-items: start; } }

/* Calendar */
.calendar { padding: var(--s-4); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.cal-title { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); cursor: pointer;
  transition: border-color var(--dur), color var(--dur);
}
.icon-btn:hover:not([disabled]) { border-color: var(--pd-blue); color: var(--pd-blue); }
.icon-btn[disabled] { opacity: .4; cursor: not-allowed; }
.cal-grid { width: 100%; border-collapse: collapse; margin-top: var(--s-3); table-layout: fixed; }
.cal-grid th { font-size: .8125rem; font-weight: 700; color: var(--pd-blue-700); padding-bottom: var(--s-2); text-align: center; }
.cal-grid abbr { text-decoration: none; }
.cal-grid td { padding: 2px; text-align: center; }
.day-btn {
  width: 100%; aspect-ratio: 1; max-width: 44px; min-height: 36px; border-radius: 50%;
  border: 2px solid transparent; background: transparent; color: var(--color-text); cursor: pointer;
  font-variant-numeric: tabular-nums; font-weight: 500;
  transition: background-color var(--dur), color var(--dur), border-color var(--dur);
}
.day-btn:hover:not([disabled]) { background: var(--pd-blue-50); }
.day-btn.is-today { border-color: var(--pd-blue); }
/* Selected day: solid blue, and it stays blue even while hovered or just tapped on a phone. */
.day-btn[aria-pressed="true"], .day-btn[aria-pressed="true"]:hover:not([disabled]) { background: #0B64BB; border-color: #0B64BB; color: #fff; font-weight: 700; }
.day-btn[disabled] { color: #a9b4bf; cursor: not-allowed; }
.day-btn.is-outside { visibility: hidden; }
.cal-selected { margin-top: var(--s-3); text-align: center; color: var(--color-text-muted); font-size: .9375rem; }

/* Legend */
.legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin: var(--s-3) 0 0; padding: 0; list-style: none; font-size: .875rem; color: var(--color-text-muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 18px; height: 14px; border-radius: 4px; border: 1px solid var(--color-border); background: #fff; display: inline-block; }
.swatch.selected { background: var(--pd-blue); border-color: var(--pd-blue); }
.swatch.booked { background: repeating-linear-gradient(135deg, #c9d6e2 0 3px, #e3eaf1 3px 6px); }
.swatch.past { background: #eef1f4; border-style: dashed; }

/* Slot grid (desktop table) */
.grid-wrap { margin-top: var(--s-4); border: 1px solid var(--color-border); border-radius: var(--radius); overflow-x: auto; background: var(--color-surface); }
.slot-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; }
.slot-table thead th {
  background: var(--color-ink); color: #fff; font-size: .8125rem; font-weight: 600; white-space: nowrap;
  padding: var(--s-2) 4px; text-align: center; font-variant-numeric: tabular-nums;
}
.slot-table thead th:first-child { text-align: left; padding-left: var(--s-3); position: sticky; left: 0; z-index: 2; }
.slot-table tbody th {
  position: sticky; left: 0; z-index: 1; background: var(--color-surface);
  text-align: left; padding: var(--s-2) var(--s-3); border-top: 1px solid var(--color-border); min-width: 132px;
}
.court-name { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; text-transform: uppercase; display: block; }
.court-rate { font-size: .8125rem; color: var(--color-text-muted); font-weight: 500; }
.slot-table td { padding: 4px 3px; border-top: 1px solid var(--color-border); }

.slot {
  width: 100%; min-width: 52px; height: 44px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--color-border); background: #fff; color: var(--color-text);
  font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; position: relative;
  transition: background-color 150ms var(--ease-out), border-color 150ms var(--ease-out), color 150ms;
  touch-action: manipulation;
}
.slot:hover:not([disabled]) { border-color: var(--pd-blue); background: var(--pd-blue-50); }
.slot[aria-pressed="true"] { background: var(--pd-blue); border-color: var(--pd-blue-700); color: #fff; }
.slot[aria-pressed="true"]:hover { background: var(--pd-blue-700); }
.slot.is-booked { background: repeating-linear-gradient(135deg, #c9d6e2 0 4px, #e3eaf1 4px 8px); color: #4a5868; cursor: not-allowed; border-color: #c9d6e2; box-shadow: none; }
.slot.is-past { background: #eef1f4; border-style: dashed; color: #8a96a3; cursor: not-allowed; box-shadow: none; }
.slot .slot-txt { pointer-events: none; }

/* Mobile slot list */
.mobile-picker { display: block; margin-top: var(--s-4); }
.court-tabs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: var(--s-2); }
.court-tab {
  min-height: 48px; border-radius: var(--radius-sm); border: 2px solid var(--color-border); background: #fff; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--color-text);
}
.court-tab[aria-selected="true"] { border-color: var(--pd-blue); background: var(--pd-blue-50); color: var(--pd-blue-700); }
.slot-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--s-2); }
.slot-list .slot { height: auto; min-height: 56px; padding: var(--s-2); text-align: left; font-size: .9375rem; display: flex; flex-direction: column; justify-content: center; }
.slot-list .slot .slot-sub { font-size: .8125rem; font-weight: 500; opacity: .85; }
/* One court × hour table on every screen size: all courts visible at once, swipe sideways for more hours. */
.mobile-picker { display: none; }
.desktop-grid { display: block; }
.swipe-hint { display: none; }
@media (max-width: 767px) {
  .swipe-hint { display: flex; align-items: center; gap: 6px; margin-top: var(--s-3); font-size: .875rem; color: var(--color-text-muted); }
  .grid-wrap { margin-top: var(--s-2); }
  .slot-table { min-width: 0; width: auto; }
  .slot-table thead th { font-size: .75rem; padding: var(--s-2) 2px; min-width: 68px; }
  .slot-table thead th:first-child { padding-left: var(--s-2); min-width: 0; }
  .slot-table tbody th { min-width: 92px; max-width: 92px; padding: var(--s-2); box-shadow: 4px 0 6px -4px rgba(13,27,42,.18); }
  .court-name { font-size: 1rem; }
  .court-rate { font-size: .75rem; }
  .slot-table td { padding: 4px 2px; }
  .slot { min-width: 64px; height: 52px; font-size: .75rem; }
}
.grid-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }
.past-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-3); margin-top: var(--s-2); }
.link-btn { background: none; border: 0; padding: 0 var(--s-1); min-height: 44px; color: var(--pd-blue-700); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--pd-blue); }
.grid-date { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }

/* Phone: compact page so the calendar, courts and times show without scrolling */
.header-title { display: none; }
.booking-footer { padding-top: var(--s-8); padding-bottom: 112px; }
@media (max-width: 767px) {
  .header-inner { min-height: 56px; padding-block: 6px; }
  .brand-logo { width: 96px; padding: 4px 6px; }
  .header-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
  .header-title .ht-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1875rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-title .ht-sub { font-size: .8125rem; color: var(--color-text-on-dark-muted); }
  .booking-page .subbar { display: none; }
  .booking-layout { margin-top: var(--s-3); gap: var(--s-3); padding-bottom: var(--s-4); }
  .demo-banner { margin-top: var(--s-3); padding: var(--s-2) var(--s-3); font-size: .8125rem; }
  .booking-page .grid-toolbar { display: none; }
  .booking-page .past-row { margin-top: 0; }
  .booking-page .past-row .link-btn { min-height: 32px; }
  .booking-page .calendar { padding: var(--s-2) var(--s-3) var(--s-3); }
  .booking-page .cal-head .icon-btn { width: 36px; height: 36px; }
  .booking-page .cal-title { font-size: 1.25rem; }
  .booking-page .cal-grid { margin-top: var(--s-1); }
  .booking-page .cal-grid th { padding-bottom: 2px; font-size: .75rem; }
  .booking-page .cal-grid td { padding: 1px; }
  .booking-page .day-btn { aspect-ratio: auto; width: 34px; height: 34px; min-height: 0; max-width: none; }
  .booking-page .cal-selected { margin-top: 2px; font-size: .75rem; }
  .booking-page .legend { margin-top: var(--s-2); font-size: .75rem; gap: 4px var(--s-3); }
  .booking-page .swipe-hint { margin-top: 0; font-size: .75rem; }
  .booking-page .booking-layout { gap: var(--s-2); }
  .booking-page .grid-wrap { margin-top: 4px; }
  .booking-page .slot { height: 46px; }
  .booking-page .slot-table tbody th { padding-block: 4px; }
  .booking-page .past-row:has(#past-note:empty):has(#past-toggle[hidden]) { display: none; }
}

/* Summary bar */
.summary {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-bar);
  background: var(--color-surface); border-top: 1px solid var(--color-border); box-shadow: 0 -8px 24px rgba(13,27,42,.1);
  padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom));
}
.summary-inner { max-width: var(--container); margin-inline: auto; display: flex; align-items: center; gap: var(--s-3); }
.summary-text { flex: 1; min-width: 0; }
.summary-count { font-weight: 700; }
.summary-detail { font-size: .875rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-total { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.summary .btn { flex: none; }
@media (min-width: 768px) { .summary { padding-inline: var(--s-6); } }

/* Dialog */
dialog.sheet {
  border: 0; padding: 0; border-radius: var(--radius-lg); width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 32px); box-shadow: var(--shadow-2); color: var(--color-text);
}
dialog.sheet::backdrop { background: rgba(13,27,42,.6); }
dialog.sheet[open] { animation: sheet-in 220ms var(--ease-out); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--color-border); }
.sheet-head h2 { font-size: 1.75rem; font-weight: 800; font-style: italic; text-transform: uppercase; }
.sheet-body { padding: var(--s-5); display: grid; gap: var(--s-4); }
.sheet-foot { padding: 0 var(--s-5) var(--s-5); display: flex; gap: var(--s-3); flex-wrap: wrap; }
.sheet-foot .btn { flex: 1 1 160px; }
.btn .btn-arrow { margin-left: 6px; stroke-width: 2.5; }
.recap { list-style: none; margin: 0; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius); }
.recap li { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-3); font-variant-numeric: tabular-nums; }
.recap li + li { border-top: 1px solid var(--color-border); }
.recap .nw { white-space: nowrap; }
@media (max-width: 480px) { .recap li { font-size: .9375rem; } }
.recap .recap-newday { border-top: 2px solid var(--color-border-strong, #b8c4cf); }
.recap .recap-total { font-weight: 700; background: var(--color-bg); }

.field { display: grid; gap: 6px; }
.field label { font-weight: 600; }
.field .req { color: var(--pd-red-700); }
.field .opt { font-weight: 400; color: var(--color-text-muted); }
.field input {
  min-height: 48px; padding: 0 var(--s-3); border-radius: var(--radius-sm); font-size: 1rem;
  border: 1.5px solid #b8c4cf; background: #fff; color: var(--color-text);
}
.field input:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 1px; border-color: var(--pd-blue); }
.field input[aria-invalid="true"] { border-color: var(--pd-red); }
.field-help { font-size: .875rem; color: var(--color-text-muted); }
.field-error { font-size: .875rem; color: var(--pd-red-700); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.field-error:empty { display: none; }
.success { text-align: center; padding: var(--s-6) var(--s-5); display: grid; gap: var(--s-3); justify-items: center; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #e3f5ec; color: var(--color-success); }
.success h2 { font-size: 2rem; font-weight: 800; font-style: italic; text-transform: uppercase; }
.success p { color: var(--color-text-muted); max-width: 40ch; }
.success h2 { line-height: 1.05; }
.receipt { width: 100%; margin: var(--s-2) 0 0; text-align: left; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg); }
.receipt-row { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: var(--s-3); padding: 10px var(--s-3); }
.receipt-row + .receipt-row { border-top: 1px solid var(--color-border); }
.receipt dt { font-size: .875rem; color: var(--color-text-muted); }
.receipt dd { margin: 0; font-weight: 600; color: var(--color-text); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.receipt-runs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.receipt-total { font-size: 1.25rem; color: var(--pd-blue-700); }
.receipt-status { color: #8a5a00; }
.success-icon.is-wait { background: var(--pd-blue-50); color: var(--pd-blue); }
.success-icon.is-bad { background: #fdf1f3; color: var(--pd-red-700); }
.success-logo { width: 120px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--pd-blue); }
.success-logo img { display: block; width: 100%; height: auto; }
.success h2 .title-check { width: 1em; height: 1em; margin-right: 8px; vertical-align: -0.12em; color: var(--color-success); stroke-width: 3; }
.success p.done-small { font-size: .875rem; font-style: italic; }
.receipt-status.is-ok { color: var(--color-success); }
/* How to pay */
.pay-choice { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.pay-choice legend { padding: 0; margin-bottom: var(--s-2); }
.pay-opt { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border: 2px solid var(--color-border); border-radius: var(--radius); cursor: pointer; background: #fff; }
.pay-opt:has(input:checked) { border-color: var(--pd-blue); background: var(--pd-blue-50); }
.pay-opt input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; accent-color: var(--pd-blue); flex: none; }
.pay-opt-title { display: block; font-weight: 700; }
.pay-opt-sub { display: block; font-size: .875rem; color: var(--color-text-muted); }
.pay-online-note { font-size: .9375rem; color: var(--color-text-muted); margin: 0; }
.success .receipt-note { font-size: .875rem; color: var(--pd-red); font-weight: 600; }
@media (max-width: 480px) {
  #review-done-view.success { padding: var(--s-4) var(--s-3); gap: var(--s-2); }
  #review-done-view .success-icon { width: 44px; height: 44px; }
  #review-done-view h2 { font-size: 1.625rem; }
  #review-done-view p { font-size: .9375rem; }
  .receipt-row { grid-template-columns: minmax(0, 36%) minmax(0, 1fr); gap: var(--s-2); padding: 7px var(--s-3); }
  .receipt dt { font-size: .8125rem; }
  .receipt dd { font-size: .9375rem; }
  .receipt-total { font-size: 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* GCash payment: upload + QR (booking review form) */
.field-label { font-weight: 600; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.proof-pick { position: relative; }
.upload-btn {
  display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 64px; padding: var(--s-3) var(--s-4);
  border: 2px dashed var(--pd-blue); border-radius: var(--radius); background: var(--pd-blue-50); color: var(--pd-blue-700);
  cursor: pointer; text-align: left; transition: background .15s, border-color .15s;
}
.upload-btn:hover { background: #dceafb; border-color: var(--pd-blue-700); }
.upload-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--pd-blue); color: #fff; }
.upload-text { display: grid; gap: 2px; }
.upload-title { font-weight: 700; font-size: 1.0625rem; }
.upload-sub { font-size: .8125rem; color: var(--color-text-muted); }
.file-input:focus-visible + .upload-btn { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.file-input[aria-invalid="true"] + .upload-btn { border-color: var(--pd-red); background: #fdf1f3; }
.proof-chosen { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg); }
.proof-chosen img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; }
.proof-name { flex: 1; min-width: 0; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-qr { margin-top: var(--s-2); padding: var(--s-3); border-radius: var(--radius); background: #eef4fd; border: 1px solid #cfe0f7; text-align: center; }
.pay-qr-text { margin: 0 0 var(--s-3); font-size: .875rem; line-height: 1.45; color: var(--color-text-muted); }
.pay-qr-text strong { color: var(--color-text); }
.pay-qr img { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; border-radius: 12px; box-shadow: 0 1px 4px rgba(13,27,42,.15); }
