/* Wheel to Wheel — modern mobile-first design system (light / dark) */
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4f0;
  --bg-elevated: #ffffff;
  --bg-tint: #eef3f1;
  --bg-dark: #0f1c1a;
  --bg-dark-2: #162824;
  --text: #14201e;
  --text-muted: #5c6b67;
  --border: #d9e0dc;
  --primary: #0d7a66;
  --primary-hover: #0a6353;
  --primary-soft: #d4efe8;
  --accent: #e8a317;
  --accent-soft: #fff3d6;
  --danger: #b42318;
  --success: #0f7a45;
  --info: #175cd3;
  --header-bg: rgba(246, 244, 240, 0.88);
  --input-bg: #ffffff;
  --card-bg: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 28, 26, 0.08);
  --shadow-sm: 0 2px 10px rgba(15, 28, 26, 0.06);
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --header-h: 4.25rem;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --theme-icon-sun-display: none;
  --theme-icon-moon-display: block;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1211;
  --bg-elevated: #151c1b;
  --bg-tint: #121a18;
  --bg-dark: #080d0c;
  --bg-dark-2: #0e1614;
  --text: #e8efec;
  --text-muted: #9aada6;
  --border: #2a3834;
  --primary: #3ecfad;
  --primary-hover: #62dfc0;
  --primary-soft: #163a32;
  --accent: #f0b429;
  --accent-soft: #3a2e10;
  --danger: #f97066;
  --success: #47cd89;
  --info: #84adff;
  --header-bg: rgba(12, 18, 17, 0.9);
  --input-bg: #1a2220;
  --card-bg: #151c1b;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.35);
  --theme-icon-sun-display: block;
  --theme-icon-moon-display: none;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
/*
  Leaflet tiles/markers are <img> elements. Global
  `img { max-width:100%; height:auto; display:block }` breaks tile layout
  (partial map fill / wrong squares per zoom / 1px gaps).
  Fully neutralize those rules inside Leaflet — do not set width/height:auto.
*/
.leaflet-container img,
.leaflet-container .leaflet-tile,
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-shadow {
  max-width: none !important;
  max-height: none !important;
}
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}

h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }

/* Progress bar for HTMX */
.page-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.htmx-request.page-progress,
.page-progress.htmx-request {
  opacity: 1;
  animation: progress 1s var(--ease) infinite;
}
@keyframes progress {
  0% { transform: scaleX(0.1); }
  50% { transform: scaleX(0.7); }
  100% { transform: scaleX(0.95); }
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}
.theme-toggle .icon-sun { display: var(--theme-icon-sun-display); }
.theme-toggle .icon-moon { display: var(--theme-icon-moon-display); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.site-header.scrolled {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: var(--header-h);
  gap: 1rem;
}
.header-inner .brand { flex-shrink: 0; }
.header-inner .site-nav { flex: 1; justify-content: flex-end; }
.header-inner .header-actions { flex-shrink: 0; order: 3; }
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.logo-mark {
  display: block;
  width: auto;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong { font-size: 0.95rem; }
.brand-text small { color: var(--text-muted); font-size: 0.72rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.25rem 0;
}
.site-nav a:hover,
.site-nav a.active { color: var(--primary); }
.nav-logout { display: inline; margin: 0; }
.site-nav .btn.nav-cta {
  margin-left: 0.25rem;
  padding: 0.32rem 1.5rem;
  white-space: nowrap;
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1200;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline-light {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.btn-outline-light:hover { background: rgba(255,255,255,0.08); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding-inline: 0.6rem;
}
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Flash */
.flash {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  padding: 0.75rem 0;
  transition: opacity 0.3s, transform 0.3s;
}
.flash-hide { opacity: 0; transform: translateY(-8px); }
.flash-success { background: #e8f8ef; color: var(--success); border-bottom: 1px solid #b7e4c7; }
.flash-error { background: #fef3f2; color: var(--danger); border-bottom: 1px solid #fecdca; }
.flash-info { background: #eff4ff; color: var(--info); border-bottom: 1px solid #b2ccff; }
.flash-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.flash-close {
  border: 0;
  background: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
}

/* Sections */
.section { padding: 3.5rem 0; }
.section-tint { background: var(--bg-tint); }
.section-dark {
  background: linear-gradient(160deg, var(--bg-dark), var(--bg-dark-2));
  color: #e8efec;
}
.section-dark .muted { color: #a8b8b3; }
.section-dark a { color: #7ddec8; }
[data-theme="dark"] .section-dark {
  background: linear-gradient(160deg, #060a09, #0c1412);
  border-block: 1px solid var(--border);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.section-head a { font-weight: 600; text-decoration: none; }
.page-hero {
  padding: 2.5rem 0 1rem;
}
.page-hero .lead { max-width: 40rem; color: var(--text-muted); font-size: 1.1rem; }
.lead { font-size: 1.125rem; color: var(--text-muted); }

/* Hero */
.hero {
  position: relative;
  padding: 2.5rem 0 3.5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
}
.hero-stats div {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}
.hero-stats dt {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.hero-stats dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
}
.hero-card {
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-elevated);
}
.hero-visual img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.about-photo img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.about-page-photo img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

/* Cards */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.service-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.service-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 0.75rem;
}
.text-link {
  font-weight: 600;
  text-decoration: none;
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-tint);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.tag-auto { background: #e8f0fe; color: #175cd3; }
.tag-truck { background: #fff3d6; color: #9a6700; }
.tag-industrial { background: #f4ebff; color: #6941c6; }
.tag-mobile { background: var(--primary-soft); color: var(--primary-hover); }

/* Promo */
.promo-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.promo-row-wide { grid-template-columns: 1fr; max-width: 40rem; }
.promo-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow: hidden;
}
.promo-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}
.promo-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: #7a4e00;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.promo-code {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 6px;
  font-family: ui-monospace, monospace;
}

/* About / features */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.feature-list li {
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-item {
  margin: 0;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-tint);
}
.gallery-item figcaption {
  padding: 0.85rem 1rem 1rem;
  display: grid;
  gap: 0.25rem;
}
.gallery-item-ba {
  grid-column: span 1;
}
.ba-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
}
.ba-pane {
  position: relative;
  min-width: 0;
}
.ba-pane img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.ba-chip {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(15, 28, 26, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ba-chip-after {
  background: rgba(13, 122, 102, 0.9);
}
.tag-ba {
  background: var(--accent-soft);
  color: #7a4e00;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.chip {
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Testimonials */
.testimonial-card .stars {
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.testimonial-card p { margin: 0 0 1rem; }
.testimonial-card footer { font-size: 0.9rem; }

/* Blog */
.blog-card h2, .blog-card h3 { font-size: 1.15rem; }
.blog-card a { color: inherit; text-decoration: none; }
.blog-card a:hover { color: var(--primary); }
.prose { max-width: 42rem; }
.prose .markdown-body h2 { margin-top: 1.75rem; }
.prose .markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.prose .markdown-body th,
.prose .markdown-body td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.video-embed {
  position: relative;
  aspect-ratio: 16/9;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Pricing */
.pricing-group { margin-bottom: 2.5rem; }
.pricing-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.pricing-row h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.pricing-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 7rem;
}
.pricing-price strong { font-size: 1.25rem; }

/* CTA band */
.cta-band {
  background: var(--primary-soft);
}
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Forms */
.field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.field > span {
  font-size: 0.875rem;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: var(--input-bg);
  color: var(--text);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}
.field-error {
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
}
.req-star {
  color: var(--danger);
  font-weight: 700;
}
.field-invalid > span:first-child,
.field.field-invalid > span:first-child {
  color: var(--danger);
}
.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--danger) !important;
  outline: 2px solid color-mix(in srgb, var(--danger) 25%, transparent);
  background: color-mix(in srgb, var(--danger) 6%, var(--input-bg));
}
.book-inline-error {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--danger) 12%, var(--bg-elevated));
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border));
  color: var(--danger);
  font-weight: 600;
  font-size: 0.92rem;
}
.book-inline-error[hidden] {
  display: none !important;
}
.book-validity-status {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.book-validity-status.is-incomplete {
  color: var(--text-muted);
}
.book-validity-status.is-ready {
  color: var(--success);
}
#book-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.promo-code-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.promo-code-row input {
  flex: 1;
}
#promo-status.promo-ok {
  color: var(--success);
  font-weight: 600;
}
#promo-status.promo-bad {
  color: var(--danger);
  font-weight: 600;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.stack { display: grid; gap: 0.75rem; }
.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}
fieldset {
  border: 0;
  margin: 0 0 1.5rem;
  padding: 0;
}
legend {
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

/* Booking */
.book-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}
.location-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.location-type-card {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.location-type-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.location-type-card input {
  margin-top: 0.2rem;
  accent-color: var(--primary);
}
.location-type-body {
  display: grid;
  gap: 0.2rem;
}
.location-type-body strong {
  font-size: 0.95rem;
}
.shop-address-card {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-tint);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.shop-address {
  margin: 0.35rem 0 0.25rem;
  font-weight: 600;
}
.location-panel[hidden] {
  display: none !important;
}
.mobile-fee-box {
  margin-top: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  background: var(--bg);
}
.book-address-row {
  align-items: stretch;
}
.book-address-row input {
  flex: 1;
  min-width: 0;
}
.book-map-wrap {
  margin: 0.5rem 0 1rem;
  width: 100%;
  min-width: 0; /* grid/flex: allow full column width */
}
.book-map-hint {
  margin: 0 0 0.4rem;
}
/*
  Shell owns a fixed layout size. Map host absolutely fills it so Leaflet
  always measures a non-zero box the first time Mobile is selected
  (panel was display:none → unhide is the classic partial-map failure).
*/
.book-map-shell {
  display: block;
  width: 100%;
  height: 18rem;
  min-height: 18rem;
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-tint);
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  /* Create a containing block with explicit size before JS runs */
  contain: layout;
}
#book-map.book-map,
#book-map.leaflet-container {
  position: absolute !important;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: var(--bg-tint);
  font: inherit;
  z-index: 0;
}
.book-form {
  min-width: 0; /* participate correctly in .book-layout grid */
}
/* Layer switcher: keep usable on small screens */
.book-map .leaflet-control-layers {
  font-size: 0.8rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.book-map .leaflet-control-layers-expanded {
  padding: 0.45rem 0.55rem;
  min-width: 9.5rem;
}
.book-map .leaflet-control-layers label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0;
  font-weight: 500;
  cursor: pointer;
}
#book-map-status {
  margin: 0.4rem 0 0;
  min-height: 1.1em;
}
@media (max-width: 600px) {
  .book-map-shell {
    height: 16rem;
    min-height: 16rem;
  }
  .book-address-row {
    flex-direction: column;
  }
}
.sticky-card { position: sticky; top: calc(var(--header-h) + 1rem); }
.steps {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}
.steps li { margin-bottom: 0.4rem; }

/* Customer self-service bookings */
.my-booking-stack {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.my-booking-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.my-booking-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.my-booking-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.my-booking-list a {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}
.my-booking-list a:hover {
  color: var(--primary);
}

.cal-widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.cal-title { margin: 0; font-size: 1rem; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}
.cal-dow {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.25rem 0;
}
.cal-day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  color: var(--text);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.cal-day:not(:disabled):hover {
  outline: 2px solid var(--primary-soft);
}
.cal-day:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.cal-day.available { background: var(--primary-soft); }
.cal-day.limited { background: var(--accent-soft); }
.cal-day.full { background: var(--bg-tint); color: var(--text-muted); }
.cal-day.selected {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
  background: var(--primary);
  color: #fff;
}
[data-theme="dark"] .cal-day.selected,
[data-theme="dark"] .time-slot.selected,
[data-theme="dark"] .chip.active,
[data-theme="dark"] .btn-primary {
  color: #06241c;
}
.cal-day.other-month { visibility: hidden; }
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  align-items: center;
}
.cal-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  margin-right: 0.25rem;
  vertical-align: middle;
}
.cal-dot.available { background: #0d7a66; }
.cal-dot.limited { background: var(--accent); }
.cal-dot.full { background: #bbb; }

.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.time-slot {
  border: 1px solid var(--border);
  background: var(--input-bg);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  color: var(--text);
}
.time-slot:hover { border-color: var(--primary); }
.time-slot.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Auth */
.auth-card {
  max-width: 26rem;
  margin-inline: auto;
}
.auth-card h1 { font-size: 1.75rem; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.contact-list strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #d5e0dc;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}
.site-footer a { color: #9fd9c9; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand { margin-bottom: 0.75rem; color: #fff; }
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  color: #8fa39c;
}

/* Animations (D3 / CSS fallback) */
[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-animate="fade-up"].is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .about-split,
  .book-layout,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .card-grid,
  .gallery-grid,
  .promo-row {
    grid-template-columns: 1fr 1fr;
  }
  .hero-stats { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow);
    z-index: 90;
  }
  .site-nav.open { display: flex; }
  .site-nav .btn { width: 100%; }
  .header-inner { position: relative; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 560px) {
  .card-grid,
  .gallery-grid,
  .promo-row,
  .field-row,
  .pricing-row,
  .location-type-grid {
    grid-template-columns: 1fr !important;
  }
  .pricing-price { align-items: flex-start; }
}

/* Shared app utilities (staff portal, account-style tables) */
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 800px) {
  .admin-grid-2 { grid-template-columns: 1fr; }
}
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th,
.table td {
  text-align: left;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.status-pending { background: #fff3d6; color: #9a6700; }
.status-confirmed { background: #e7f7f1; color: #0a6353; }
.status-completed { background: #e8f0fe; color: #175cd3; }
.status-cancelled { background: #fef3f2; color: #b42318; }
.detail-list {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 0;
}
.detail-list dt {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.detail-list dd { margin: 0.2rem 0 0; }
.detailer-swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.schedule-timeoff-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}
