/* ══════════════════════════════════════════════════════════════════════
   CH BABYSITTERS & PLAYGROUPS — "Storybook Neighborhood" — BASE stylesheet
   The site opens like a children's book about Crown Heights: a drawn sky
   with sun/clouds (moon and lit windows at night), a brownstone skyline,
   cards with striped awnings, house-shaped map pins, a grassy footer hill.
   Fonts: Fredoka (display) · Quicksand (UI/body)

   Loaded on every screen. The browser then applies exactly ONE device
   sheet on top by viewport width — mobile.css (≤819.98px) or desktop.css
   (≥820px). Both device sheets are screen-scoped, so print uses base only
   and the @media print block at the bottom of this file still governs it.
   ══════════════════════════════════════════════════════════════════════ */

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

:root {
  --bg: #fff9f0;
  --surface: #ffffff;
  --text: #3a342e;
  --text-soft: #6e6558;
  --text-faint: #9a9083;
  --line: rgba(58, 52, 46, 0.14);

  --sky-top: #bfe0f6;
  --sky-bottom: #e9f5fc;

  /* Neighborhood accents: -fill passes 4.5:1 with white text,
     -deep is small text on cream, -tint is soft chip backgrounds */
  --brick: #b5573e;
  --brick-fill: #b5573e;
  --brick-deep: #a84b33;
  --brick-tint: #b5573e16;
  --leaf: #57a863;
  --leaf-fill: #417f53;
  --leaf-deep: #38754a;
  --leaf-tint: #57a8631c;
  --berry: #d65d8c;
  --berry-fill: #bc4478;
  --berry-deep: #b03a6e;
  --berry-tint: #d65d8c18;
  --denim: #6e8fbf;
  --denim-fill: #4471aa;
  --denim-deep: #3a67a0;
  --denim-tint: #6e8fbf1f;
  --sun: #f2c14e;
  --sun-fill: #8a6200;
  --sun-deep: #8a6200;
  --sun-tint: #f2c14e2b;

  --shadow-soft: 0 6px 20px -8px rgba(58, 52, 46, 0.22);
  --shadow-pop: 0 14px 30px -10px rgba(58, 52, 46, 0.3);
}

[data-theme="dark"] {
  --bg: #241f1b;
  --surface: #2f2822;
  --text: #f3ece1;
  --text-soft: #c4b8a8;
  --text-faint: #94897a;
  --line: rgba(243, 236, 225, 0.14);

  --sky-top: #1c2240;
  --sky-bottom: #2a3054;

  --brick-deep: #e5a08c;
  --leaf-deep: #8fc9a0;
  --berry-deep: #e894bb;
  --denim-deep: #93b6e3;
  --sun-deep: #e7c069;
  --brick-tint: #b5573e2b;
  --leaf-tint: #57a8632b;
  --berry-tint: #d65d8c2b;
  --denim-tint: #6e8fbf2e;
  --sun-tint: #f2c14e26;

  --shadow-soft: 0 6px 20px -8px rgba(0, 0, 0, 0.55);
  --shadow-pop: 0 14px 30px -10px rgba(0, 0, 0, 0.65);
}

/* Rotating per-listing accent */
.accent-0 {
  --acc: var(--brick);
  --acc-fill: var(--brick-fill);
  --acc-deep: var(--brick-deep);
  --acc-tint: var(--brick-tint);
}
.accent-1 {
  --acc: var(--leaf);
  --acc-fill: var(--leaf-fill);
  --acc-deep: var(--leaf-deep);
  --acc-tint: var(--leaf-tint);
}
.accent-2 {
  --acc: var(--berry);
  --acc-fill: var(--berry-fill);
  --acc-deep: var(--berry-deep);
  --acc-tint: var(--berry-tint);
}
.accent-3 {
  --acc: var(--denim);
  --acc-fill: var(--denim-fill);
  --acc-deep: var(--denim-deep);
  --acc-tint: var(--denim-tint);
}
.accent-4 {
  --acc: var(--sun);
  --acc-fill: var(--sun-fill);
  --acc-deep: var(--sun-deep);
  --acc-tint: var(--sun-tint);
}

html {
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

body {
  font-family: "Quicksand", sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  transition:
    background 0.2s,
    color 0.2s;
}

::selection {
  background: var(--berry-fill);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--denim-fill);
  outline-offset: 2px;
  border-radius: 8px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1,
h2,
h3 {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  line-height: 1.15;
}

/* ─── HERO (the sky + skyline scene) ───────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 3rem 0 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
}

.hero > .wrap {
  position: relative;
  z-index: 2;
  padding-bottom: 2.25rem;
}

.sky-decor {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.moon-g {
  display: none;
}

[data-theme="dark"] .sun-g {
  display: none;
}

[data-theme="dark"] .moon-g {
  display: block;
}

[data-theme="dark"] .cloud-g {
  opacity: 0.14;
}

.skyline {
  position: relative;
  z-index: 1;
  margin-top: 0.5rem;
}

.skyline svg {
  display: block;
  width: 100%;
  height: clamp(110px, 13vw, 190px);
}

.win {
  fill: #fff6e8;
}

[data-theme="dark"] .win {
  fill: #ffd98a;
}

.bsd {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 12px;
  color: var(--text-soft);
  direction: rtl;
  user-select: none;
  z-index: 3;
}

[data-theme="dark"] .bsd {
  color: #c9c2da;
}

.hero-actions {
  position: absolute;
  top: 18px;
  left: 16px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.icon-btn {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  box-shadow: var(--shadow-soft);
  transition:
    color 0.15s,
    transform 0.15s;
}

.icon-btn:hover {
  color: var(--berry-deep);
  transform: translateY(-1px);
}

.hero-tag {
  display: inline-block;
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--denim-deep);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 18px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.9rem;
}

[data-theme="dark"] .hero-tag {
  color: #93b6e3;
}

.hero h1 {
  font-size: clamp(2.3rem, 6.5vw, 4.2rem);
  font-weight: 700;
  color: var(--text);
}

[data-theme="dark"] .hero h1 {
  color: #f3ece1;
}

.hero h1 .w1 {
  color: #a84b33;
}

.hero h1 .amp {
  color: #b03a6e;
  font-weight: 500;
  padding: 0 0.05em;
}

.hero h1 .w2 {
  color: #38754a;
}

[data-theme="dark"] .hero h1 .w1 {
  color: #e5a08c;
}

[data-theme="dark"] .hero h1 .amp {
  color: #e894bb;
}

[data-theme="dark"] .hero h1 .w2 {
  color: #8fc9a0;
}

.hero-sub {
  max-width: 520px;
  margin: 0.5rem auto 1.4rem;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-soft);
}

[data-theme="dark"] .hero-sub {
  color: #c9c2da;
}

.stat-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-pill {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 7px 16px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.stat-pill b {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 15px;
  margin-right: 2px;
}

.stat-pill.violet b {
  color: var(--berry-deep);
}
.stat-pill.pink b {
  color: var(--brick-deep);
}
.stat-pill.teal b {
  color: var(--leaf-deep);
}
.stat-pill.orange b {
  color: var(--sun-deep);
}

.dateline {
  margin-top: 1.1rem;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
}

[data-theme="dark"] .dateline {
  color: #b3abc7;
}

/* ─── CONTROLS ─────────────────────────────────────────────────────── */

main.wrap {
  padding-top: 1.5rem;
}

.controls {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.controls-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.controls-row + .controls-row {
  margin-top: 0.9rem;
}

.search-wrap {
  position: relative;
  flex: 1 1 230px;
}

.search-wrap svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

#search {
  width: 100%;
  padding: 12px 16px 12px 42px;
  font-family: "Quicksand", sans-serif;
  /* 16px minimum: iOS Safari auto-zooms the page on inputs smaller than that */
  font-size: 16px;
  font-weight: 500;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

#search:focus {
  border-color: var(--denim-fill);
}

#search::placeholder {
  color: var(--text-faint);
}

.ctl-label {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-right: 4px;
  white-space: nowrap;
}

.pill-btn {
  font-family: "Quicksand", sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  transition:
    color 0.12s,
    border-color 0.12s,
    background 0.12s,
    transform 0.12s;
}

.pill-btn:hover {
  transform: translateY(-1px);
}

.pill-btn.violet:hover {
  border-color: var(--berry-fill);
  color: var(--berry-deep);
}
.pill-btn.pink:hover {
  border-color: var(--brick-fill);
  color: var(--brick-deep);
}
.pill-btn.teal:hover {
  border-color: var(--leaf-fill);
  color: var(--leaf-deep);
}
.pill-btn.orange:hover {
  border-color: var(--sun-fill);
  color: var(--sun-deep);
}
.pill-btn.sky:hover {
  border-color: var(--denim-fill);
  color: var(--denim-deep);
}

.pill-btn.violet[aria-pressed="true"] {
  background: var(--berry-fill);
  border-color: var(--berry-fill);
  color: #fff;
}
.pill-btn.pink[aria-pressed="true"] {
  background: var(--brick-fill);
  border-color: var(--brick-fill);
  color: #fff;
}
.pill-btn.teal[aria-pressed="true"] {
  background: var(--leaf-fill);
  border-color: var(--leaf-fill);
  color: #fff;
}
.pill-btn.orange[aria-pressed="true"] {
  background: var(--sun-fill);
  border-color: var(--sun-fill);
  color: #fff;
}
.pill-btn.sky[aria-pressed="true"] {
  background: var(--denim-fill);
  border-color: var(--denim-fill);
  color: #fff;
}

.view-toggle {
  display: inline-flex;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  margin-left: auto;
  gap: 2px;
}

.view-toggle button {
  font-family: "Quicksand", sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.view-toggle button[aria-pressed="true"] {
  background: var(--brick-fill);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.clear-btn {
  background: none;
  border: none;
  font-family: "Quicksand", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.clear-btn:hover {
  color: var(--berry-deep);
}

.clear-btn svg {
  vertical-align: -1px;
}

.result-line {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-faint);
  margin: 0 6px 0.8rem;
}

.result-line strong {
  color: var(--brick-deep);
}

/* ─── CARD GRID (houses with awnings) ──────────────────────────────── */

.grid {
  display: grid;
  /* min(305px, 100%) not a bare 305px: on a 320px phone the padded content
     box is only ~273px, and a hard 305px minimum forces the column — and so
     the whole document — wider than the viewport, scrolling the page
     sideways. min() caps the minimum at whatever room actually exists, and
     is identical to the old value on anything wider. */
  grid-template-columns: repeat(auto-fill, minmax(min(305px, 100%), 1fr));
  gap: 16px;
  padding-bottom: 2rem;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 1.75rem 1.15rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-soft);
  transition:
    box-shadow 0.18s,
    transform 0.18s;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-pop);
}

/* Striped awning: solid band + scalloped edge */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: var(--acc);
}

.card::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 8px;
  background-image: radial-gradient(
    circle at 8px 0,
    var(--acc) 7px,
    transparent 8px
  );
  background-size: 16px 8px;
  background-repeat: repeat-x;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Round "window" avatar */
.avatar {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--acc-fill);
  border: 3px solid var(--surface);
  outline: 1.5px solid var(--line);
  color: #fff;
  font-family: "Fredoka", sans-serif;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-name {
  font-size: 1.16rem;
  font-weight: 600;
  line-height: 1.2;
}

.card-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.age-range {
  font-family: "Fredoka", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--acc-deep);
  background: var(--acc-tint);
  border-radius: 999px;
  padding: 3px 12px;
}

.dist {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--denim-deep);
}

.sticker {
  display: inline-block;
  margin: 2px 4px 2px 0;
  font-family: "Fredoka", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  border-radius: 8px;
  padding: 3px 9px;
  transform: rotate(-2deg);
  box-shadow: var(--shadow-soft);
}

.sticker.teal {
  background: var(--leaf-fill);
}

.sticker.orange {
  background: var(--sun-fill);
}

.sticker + .sticker {
  transform: rotate(1.5deg);
}

.row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  line-height: 1.45;
}

.row-ic {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -1px;
}

.row-ic.sky {
  background: var(--denim-tint);
  color: var(--denim-deep);
}
.row-ic.violet {
  background: var(--berry-tint);
  color: var(--berry-deep);
}
.row-ic.orange {
  background: var(--sun-tint);
  color: var(--sun-deep);
}
.row-ic.pink {
  background: var(--brick-tint);
  color: var(--brick-deep);
}
.row-ic.teal {
  background: var(--leaf-tint);
  color: var(--leaf-deep);
}

.row b {
  color: var(--text);
  font-weight: 700;
}

.card-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1.5px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.organizer {
  font-size: 13.5px;
  font-weight: 700;
}

.contact-actions {
  display: flex;
  gap: 6px;
}

.reveal-btn,
.call-btn,
.wa-btn {
  font-family: "Quicksand", sans-serif;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  border: none;
  white-space: nowrap;
  color: #fff;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.12s,
    box-shadow 0.12s;
}

.reveal-btn:hover,
.call-btn:hover,
.wa-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-pop);
}

.reveal-btn,
.call-btn {
  background: var(--acc-fill, var(--brick-fill));
}

.wa-btn {
  background: #128c5e;
  padding: 8px 10px;
}

.print-phone {
  display: none;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  background: var(--surface);
  border: 2px dashed var(--line);
  border-radius: 18px;
  padding: 3rem 1rem;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 600;
}

.empty svg {
  display: block;
  margin: 0 auto 0.75rem;
  color: var(--text-faint);
}

/* ─── LIST VIEW ────────────────────────────────────────────────────── */

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 2rem;
}

table.register {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 780px;
}

table.register th {
  font-family: "Fredoka", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--text-faint);
  padding: 12px;
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap;
}

table.register td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--text-soft);
  font-weight: 500;
}

table.register tr:last-child td {
  border-bottom: none;
}

td.no .mini-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--acc-fill);
  color: #fff;
  font-family: "Fredoka", sans-serif;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

td.who .g-name {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  display: block;
  line-height: 1.25;
}

td.who .g-org {
  font-size: 12.5px;
}

td.ages {
  white-space: nowrap;
}

td.ages .age-range {
  font-size: 12px;
}

td.hours-col {
  font-size: 12.5px;
  white-space: nowrap;
}

/* ─── MAP (house-shaped pins) ──────────────────────────────────────── */

.map-section {
  margin-bottom: 1.75rem;
}

.map-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  position: relative;
  font-family: "Fredoka", sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: var(--denim-fill);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    border-radius 0.2s;
}

.map-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-pop);
}

.map-toggle-btn.open {
  border-radius: 18px 18px 0 0;
  transform: none;
}

.map-chevron {
  position: absolute;
  right: 18px;
  transition: transform 0.25s ease;
}

.map-toggle-btn.open .map-chevron {
  transform: rotate(180deg);
}

.map-container {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.map-container.open {
  grid-template-rows: 1fr;
}

.map-container > .map-inner {
  overflow: hidden;
  border-radius: 0 0 18px 18px;
}

.map-container.open > .map-inner {
  border: 2px solid var(--denim-fill);
  border-top: none;
}

#map {
  width: 100%;
  height: 440px;
  display: block;
  background: var(--bg);
}

/* Little house pins: square body + roof triangle */
.pin {
  position: relative;
  width: 24px;
  height: 19px;
  margin-top: 9px;
  border-radius: 3px;
  background: var(--acc-fill, var(--brick-fill));
  color: #fff;
  font-family: "Fredoka", sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.pin::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-bottom: 9px solid var(--acc-fill, var(--brick-fill));
}

[data-theme="dark"] .leaflet-tile-pane {
  filter: invert(100%) hue-rotate(180deg) brightness(90%) contrast(88%);
}

[data-theme="dark"] .leaflet-container {
  background: #241f1b;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--surface);
  color: var(--text);
}

.leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
}

.popup-card {
  min-width: 150px;
  max-width: 210px;
  font-family: "Quicksand", sans-serif;
  line-height: 1.45;
}

.popup-no {
  font-size: 11px;
  font-weight: 700;
  color: var(--brick-deep);
}

.popup-name {
  font-family: "Fredoka", sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 3px;
}

.popup-detail {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
}

.popup-detail svg {
  vertical-align: -1.5px;
  margin-right: 1px;
  color: var(--text-faint);
}

/* ─── SUBMIT CTA + FOOTER ──────────────────────────────────────────── */

.submit-cta {
  position: relative;
  overflow: hidden;
  background: var(--leaf-fill);
  border-radius: 22px;
  text-align: center;
  padding: 2rem 1.25rem 2.2rem;
  margin-bottom: 0;
  box-shadow: var(--shadow-pop);
}

.submit-cta h2 {
  font-size: 1.7rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.submit-cta p {
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.1rem;
}

.cta-btn {
  font-family: "Fredoka", sans-serif;
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--leaf-deep);
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s;
}

[data-theme="dark"] .cta-btn {
  color: #38754a;
}

.cta-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.cta-dots {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.16;
  background: #fff;
}

/* Grassy footer hill */
footer {
  text-align: center;
  margin-top: 2.5rem;
  padding: 2.2rem 1.25rem 2.5rem;
  background: #ddefd8;
  border-radius: 100% 100% 0 0 / 44px 44px 0 0;
}

[data-theme="dark"] footer {
  background: #24301f;
}

.foot-date {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
}

.foot-note {
  max-width: 620px;
  margin: 0.6rem auto 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-faint);
  font-weight: 500;
}

/* ─── MODAL ────────────────────────────────────────────────────────── */

dialog.modal {
  background: var(--surface);
  color: var(--text);
  border: none;
  border-radius: 22px;
  box-shadow: var(--shadow-pop);
  padding: 0;
  width: calc(100% - 2rem);
  max-width: 560px;
  max-height: 90vh;
  margin: auto;
}

dialog.modal::backdrop {
  background: rgba(40, 34, 28, 0.6);
}

body:has(dialog[open]) {
  overflow: hidden;
}

.modal-body {
  padding: 1.9rem;
  position: relative;
}

.modal-body h2 {
  font-size: 1.55rem;
  text-align: center;
}

.modal-sub {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-soft);
  text-align: center;
  margin: 0.15rem 0 1.4rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
}

.modal-close:hover {
  color: var(--berry-deep);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-soft);
}

.form-group input,
.form-group textarea {
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-family: "Quicksand", sans-serif;
  /* 16px minimum: iOS Safari auto-zooms the page on inputs smaller than that */
  font-size: 16px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--denim-fill);
}

.form-group textarea {
  resize: vertical;
  min-height: 72px;
}

.age-pair {
  display: flex;
  align-items: center;
  gap: 8px;
}

.age-pair input {
  width: 76px;
  text-align: center;
}

.age-pair span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.check-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.check-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border: 2px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  user-select: none;
  transition:
    color 0.12s,
    border-color 0.12s,
    background 0.12s;
}

.check-pill input {
  display: none;
}

.check-pill.checked {
  background: var(--leaf-fill);
  border-color: var(--leaf-fill);
  color: #fff;
}

.form-submit {
  width: 100%;
  margin-top: 1.2rem;
  padding: 13px;
  font-family: "Fredoka", sans-serif;
  font-size: 16px;
  font-weight: 600;
  background: var(--brick-fill);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s;
}

.form-submit:hover {
  transform: translateY(-1px);
}

.form-note {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-faint);
  text-align: center;
  margin-top: 0.7rem;
}

#form-success {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

#form-success .big {
  font-family: "Fredoka", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--leaf-deep);
  margin: 0.3rem 0 0.2rem;
}

#form-success p {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-soft);
}

#form-success .form-submit {
  width: auto;
  padding: 11px 24px;
}

/* ─── TOAST ────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: var(--bg);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0;
  transition: all 0.3s;
  z-index: 4000;
  white-space: nowrap;
  box-shadow: var(--shadow-pop);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── FLOATING "BACK TO FILTERS" BUTTON ────────────────────────────── */
/* Painted for every screen so it is never animation- or JS-only; app.js
   toggles [hidden] once the filter panel scrolls off the top. Denim is the
   documented 4.5:1-on-white fill, and it stays clear of the rotating card
   accents so the control never reads as part of a listing. */

.filters-fab {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "Fredoka", sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  padding: 13px 22px;
  border: none;
  border-radius: 999px;
  background: var(--denim-fill);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-pop);
  z-index: 60;
  transition: transform 0.15s;
}

.filters-fab:hover {
  transform: translateX(-50%) translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .filters-fab {
    transition: none;
  }
}

.fab-badge {
  background: #fff;
  color: var(--denim-deep);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* ─── PRINT ────────────────────────────────────────────────────────── */

@media print {
  .hero-actions,
  .sky-decor,
  .skyline,
  .filters-fab,
  .controls,
  .result-line,
  .map-section,
  .submit-cta,
  .contact-actions,
  .toast,
  dialog,
  .foot-note {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12px;
  }

  .hero {
    background: white;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .card {
    break-inside: avoid;
    border: 1px solid #999;
    box-shadow: none !important;
    transform: none !important;
    padding: 0.6rem 0.7rem;
  }

  .card::before,
  .card::after {
    display: none;
  }

  .print-phone {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: #333;
  }

  .table-wrap {
    overflow: visible;
    border-color: #999;
    box-shadow: none;
  }

  table.register {
    min-width: 0;
  }

  footer {
    background: white;
    border-radius: 0;
  }
}
