:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #1c2430;
  --muted: #5b6573;
  --line: #e4ddd2;
  --brand: #1f4d3a;
  --brand-2: #2f6b52;
  --accent: #c9a227;
  --badge: #8b4513;
  --badge-bg: #fff3e0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 36, 48, 0.08);
  --max: 1080px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
}
.brand-text small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.72rem;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
}
.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}
.nav a.active, .nav a:hover { color: var(--brand); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-secondary {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
.btn-accent { background: var(--accent); color: #1c2430; }
.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--line);
}
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  filter: none;
}

main { flex: 1; }
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.1rem 2.5rem;
}

.hero {
  background: linear-gradient(160deg, #e8f2ec 0%, #f7f4ef 55%, #f3efe6 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.4rem 1.1rem 2.8rem;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 800px) {
  .hero-inner { grid-template-columns: 1.3fr 1fr; align-items: center; }
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.hero h1 {
  margin: 0.7rem 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero p { margin: 0; color: var(--muted); font-size: 1.05rem; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.25rem; }
.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.25rem;
}
.hero-card h2 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.hero-card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.hero-card li { margin: 0.35rem 0; }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 1rem;
}
.section-title h2 { margin: 0; font-size: 1.25rem; }
.section-title span { color: var(--muted); font-size: 0.9rem; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 4px 16px rgba(28,36,48,0.04);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.card h3 { margin: 0; font-size: 1.02rem; }
.card .meta { color: var(--muted); font-size: 0.9rem; }
.card .phone { font-weight: 600; }
.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--badge-bg);
  color: var(--badge);
  border: 1px solid #efd8b5;
}
.badge-sample { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }

.map-page { padding: 0; }
.map-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: calc(100vh - 120px);
}
@media (min-width: 900px) {
  .map-layout { grid-template-columns: 340px 1fr; }
}
.map-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 64px);
}
.map-filters {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
}
.map-filters label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.map-filters select, .form input, .form select, .form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.list-panel {
  overflow: auto;
  padding: 0.75rem;
  display: grid;
  gap: 0.65rem;
}
.list-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  cursor: pointer;
  background: #fff;
}
.list-item:hover, .list-item.active {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 2px rgba(47,107,82,0.12);
}
.list-item h3 { margin: 0 0 0.25rem; font-size: 0.98rem; }
#map {
  min-height: 420px;
  height: 100%;
  width: 100%;
  background: #dfe8e2;
}
.leaflet-popup-content { margin: 0.7rem 0.85rem; }
.popup-card h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.popup-card .meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.45rem; }
.popup-card .actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.55rem; }
.popup-card .btn { padding: 0.4rem 0.75rem; font-size: 0.82rem; }

.page-header { margin-bottom: 1.25rem; }
.page-header h1 { margin: 0.35rem 0; font-size: clamp(1.5rem, 3vw, 2rem); }
.page-header p { margin: 0; color: var(--muted); }

.detail {
  display: grid;
  gap: 1rem;
}
@media (min-width: 800px) {
  .detail { grid-template-columns: 1.4fr 1fr; }
}
.detail-card, .form-card, .stub-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.detail-card h1 { margin: 0.4rem 0 0.5rem; }
.detail-meta {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
}
.detail-meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.4rem;
  font-size: 0.95rem;
}
.detail-meta span { color: var(--muted); }
.form { display: grid; gap: 0.8rem; }
.form label { display: grid; gap: 0.3rem; font-weight: 650; font-size: 0.9rem; }
.form textarea { min-height: 110px; resize: vertical; }
.form .hint { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.alert {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #eef6f1;
  border: 1px solid #c7e0d2;
  color: var(--brand);
  font-weight: 600;
}
.alert.warn {
  background: #fff8e8;
  border-color: #efd8b5;
  color: #7a5a10;
}
.alert.hidden { display: none; }

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem;
  display: grid;
  gap: 0.35rem;
}
.site-footer strong { color: var(--ink); }

.marker-pin {
  background: var(--brand);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  width: 22px;
  height: 22px;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}
@media (min-width: 560px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
}
.directions-block { display: inline-flex; }
.directions-sheet {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(28, 36, 48, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
}
.directions-sheet[hidden] { display: none !important; }
.directions-sheet-panel {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px 18px 14px 14px;
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  display: grid;
  gap: 0.55rem;
}
.directions-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.directions-app { width: 100%; }
@media (min-width: 700px) {
  .directions-sheet { align-items: center; }
  .directions-sheet-panel { border-radius: 16px; }
}
body.sheet-open { overflow: hidden; }

.hours-fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem 1rem;
  display: grid;
  gap: 0.7rem;
  margin: 0;
}
.hours-fieldset legend {
  padding: 0 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
}
.hours-details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.hours-grid {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
}
@media (min-width: 560px) {
  .hours-grid { grid-template-columns: 1fr 1fr; }
}

/* Business Join sandbox plans */
.plans {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.1rem;
  margin-bottom: 1.25rem;
}
.plans-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}
.plans-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.plans-head .hint { margin: 0; }
.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 700px) {
  .plan-grid { grid-template-columns: repeat(3, 1fr); }
}
.plan-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: #fff;
}
.plan-card-featured {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 2px rgba(47, 107, 82, 0.12);
}
.plan-badge {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}
.plan-card h3 {
  margin: 0.15rem 0 0;
  font-size: 1rem;
}
.plan-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}
.plan-amount {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.plan-interval {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.plan-card .meta { margin: 0; }
.plan-cta {
  margin-top: 0.55rem;
  width: 100%;
}
.plans-footnote { margin: 0.9rem 0 0; }
.plan-summary {
  margin: 0.75rem 0 1rem;
  padding-left: 1.1rem;
  color: var(--muted);
}
.plan-summary li { margin: 0.3rem 0; }
.plan-summary strong { color: var(--ink); }
.plan-card-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.28);
}
