:root {
  --ink: #1F2A44;
  --muted: #5B6478;
  --bg: #FFF8EF;
  --surface: #FFFFFF;
  --line: #EEE3D3;
  --coral: #FF6B4A;
  --sun: #FFC93C;
  --teal: #17A398;
  --header-h: 72px;
  --footer-h: 44px;
  --radius: 18px;
  --shadow: 0 18px 48px rgba(31, 42, 68, .24), 0 2px 6px rgba(31, 42, 68, .10);
  --font-display: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------------------------------------------------------------- header */

.site-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

.site-header::after { /* confetti stripe */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 4px;
  background: linear-gradient(90deg, var(--coral) 0 33.3%, var(--sun) 33.3% 66.6%, var(--teal) 66.6%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.brand-name span { color: var(--coral); }

.tagline {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0 0 0 auto;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: 800 .9rem var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 3px 0 rgba(31, 42, 68, .18);
}

.suggest-btn svg { width: 18px; height: 18px; }

.suggest-btn:hover { background: #2E3D62; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- layout */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  height: calc(100vh - var(--header-h) - var(--footer-h));
  height: calc(100dvh - var(--header-h) - var(--footer-h));
  min-height: 560px;
}

.map-wrap {
  position: relative;
  overflow: hidden;
  min-width: 0;
}

#map {
  position: absolute;
  inset: 0;
  background: #E9EEF0;
  font-family: var(--font-body);
}

/* soften the basemap a touch so the venue logos stand out */
.leaflet-tile-pane { filter: saturate(.72) brightness(1.03); }

.map-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  margin: 0;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(31, 42, 68, .25);
  pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}

.map-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, -8px);
}

.hint-touch { display: none; }

@media (hover: none) {
  .hint-desktop { display: none; }
  .hint-touch { display: inline; }
}

.reset-view {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 900;
  padding: 8px 14px;
  border: 2px solid rgba(31, 42, 68, .14);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 800 .85rem var(--font-body);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(31, 42, 68, .12);
}

.reset-view:hover { border-color: var(--coral); }

.reset-view:focus-visible,
.suggest-btn:focus-visible,
.suggest-cta:focus-visible,
.suggest-alt a:focus-visible,
.copy-btn:focus-visible,
.venue-item:focus-visible,
.card-close:focus-visible,
.btn:focus-visible,
.card-contact a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

/* --------------------------------------------------------------- markers */

.vm-icon { overflow: visible; }

.vm {
  position: absolute;
  left: 0;
  top: 0;
  --size: 68px;
  --dx: 0px;
  --dy: -50px;
  --len: 30px;
  --ang: -90deg;
}

.vm-dot {
  position: absolute;
  left: -7px;
  top: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.vm-leader {
  position: absolute;
  left: 0;
  top: -2px;
  height: 4px;
  width: var(--len);
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 0 1.5px #fff;
  transform-origin: 0 50%;
  transform: rotate(var(--ang));
  transition: width .3s ease, transform .3s ease;
}

.vm-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(var(--dx), var(--dy)) scale(var(--s, 1));
  transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), filter .2s ease;
  filter: drop-shadow(0 4px 6px rgba(31, 42, 68, .32));
}

.vm-logo img {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-user-drag: none;
  user-select: none;
}

.vm-logo:focus { outline: none; }

.vm-logo:focus-visible {
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--coral);
}

.vm-rank {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 12px;
  background: var(--ink);
  border: 2px solid #fff;
  color: #fff;
  font: 700 12px/20px var(--font-display);
  text-align: center;
}

.vm.is-active .vm-logo,
.vm-logo:hover { --s: 1.16; filter: drop-shadow(0 10px 14px rgba(31, 42, 68, .38)); }

.vm.is-highlight .vm-logo { --s: 1.16; }

.vm.is-highlight .vm-logo::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid var(--c);
  animation: pulse 1.1s ease-out infinite;
}

@keyframes pulse {
  from { opacity: .9; transform: scale(.92); }
  to { opacity: 0; transform: scale(1.3); }
}

/* ------------------------------------------------------------ venue card */

.venue-card {
  position: fixed;
  z-index: 1100;
  width: 340px;
  max-height: calc(100vh - 20px);
  display: flex;
  transition: opacity .15s ease;
}

.venue-card[hidden] { display: none; }

.venue-card:focus { outline: none; }

.venue-card:focus-visible .card-body { box-shadow: var(--shadow), 0 0 0 3px var(--coral); }

.venue-card.is-dim { opacity: 0; pointer-events: none; }

.card-body {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 18px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  border-top: 6px solid var(--c);
  box-shadow: var(--shadow);
  animation: card-in .18s ease-out;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.card-arrow {
  position: absolute;
  top: var(--arrow-y, 50%);
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: var(--surface);
  transform: rotate(45deg);
  box-shadow: -2px 2px 4px rgba(31, 42, 68, .08);
  z-index: 1;
}

.venue-card[data-side="right"] .card-arrow { left: -7px; }
.venue-card[data-side="left"] .card-arrow { right: -7px; box-shadow: 2px -2px 4px rgba(31, 42, 68, .08); }

.card-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.card-close:hover { background: #F3EEE6; color: var(--ink); }

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 26px;
}

.card-head img { flex: none; width: 76px; height: 76px; }

.card-rank {
  display: inline-block;
  margin: 0 0 2px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--c);
  color: var(--on-c);
  font: 600 .75rem var(--font-display);
  letter-spacing: .02em;
}

.card-head h2 {
  margin: 0;
  font: 700 1.3rem/1.15 var(--font-display);
}

.card-cat {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

/* Google rating: five grey stars with a gold layer clipped to the score */
.stars {
  position: relative;
  display: inline-block;
  font-size: 1em;
  line-height: 1;
  letter-spacing: 1px;
  color: #DDD5C8;
  white-space: nowrap;
}

.stars::before { content: "\2605\2605\2605\2605\2605"; }

.stars::after {
  content: "\2605\2605\2605\2605\2605";
  position: absolute;
  left: 0;
  top: 0;
  width: var(--fill);
  overflow: hidden;
  color: #F4A51C;
}

.card-rating {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin-top: 6px;
  color: var(--ink);
  font-size: .86rem;
  text-decoration: none;
}

.card-rating:hover .rating-count { text-decoration: underline; }

.card-rating:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
  border-radius: 4px;
}

.rating-num { font-weight: 800; }

.rating-count {
  color: var(--muted);
  font-weight: 700;
}

.card-desc { margin: 14px 0 10px; font-size: .95rem; }

.card-highlights {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  font-weight: 600;
}

.card-highlights li {
  position: relative;
  padding-left: 22px;
  margin: 4px 0;
}

.card-highlights li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .3em;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: var(--c);
  transform: rotate(45deg) scale(.72);
}

.card-contact {
  margin: 0 0 16px;
  padding: 12px 0 0;
  border-top: 1px dashed var(--line);
  list-style: none;
  font-size: .88rem;
}

.card-contact li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 5px 0;
  overflow-wrap: anywhere;
}

.card-contact svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--muted);
}

.card-contact a { text-decoration: none; }
.card-contact a:hover { text-decoration: underline; }

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  padding: 10px 14px;
  border-radius: 12px;
  font: 800 .92rem var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--c);
  color: var(--on-c);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .18);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn-ghost {
  border: 2px solid var(--line);
  color: var(--ink);
}

.btn-ghost:hover { border-color: var(--c); }

/* bottom sheet on narrow maps */
.venue-card.is-sheet {
  left: 8px !important;
  right: 8px;
  top: auto !important;
  bottom: 8px;
  width: auto;
  max-width: 520px;
  margin: 0 auto;
  max-height: 72vh;
}

.venue-card.is-sheet .card-arrow { display: none; }

/* ------------------------------------------------------------ venue list */

.venue-list {
  overflow-y: auto;
  padding: 22px 18px 24px;
  background: var(--surface);
  border-left: 1px solid var(--line);
}

.venue-list h1 {
  margin: 4px 0 6px;
  font: 700 1.45rem/1.2 var(--font-display);
}

.list-intro {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .95rem;
}

#venue-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.venue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 6px;
  padding: 8px 10px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.venue-item:hover { background: #FBF5EC; }

.venue-item.is-active {
  background: #FBF5EC;
  border-color: var(--c);
}

.venue-item img { flex: none; width: 52px; height: 52px; }

.vi-text { display: flex; flex-direction: column; min-width: 0; }

.vi-name {
  font: 600 1.02rem/1.25 var(--font-display);
}

.vi-rank { color: var(--coral); }

.vi-meta {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.vi-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 5px;
  margin-top: 1px;
  font-size: .8rem;
  font-weight: 800;
}

.vi-rating .stars { font-size: .95em; }

.suggest {
  position: relative; /* keeps the hidden copy-status text inside the scrolling list */
  margin: 16px 0 0;
  padding: 16px 16px 14px;
  border: 2px dashed #F3B3A2;
  border-radius: 16px;
  background: #FFF4F0;
}

.suggest h2 {
  margin: 0 0 4px;
  font: 700 1.1rem/1.25 var(--font-display);
}

.suggest p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .9rem;
}

.suggest-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #C93D22;
  color: #fff;
  font: 800 .95rem var(--font-body);
  text-decoration: none;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .18);
}

.suggest-cta svg { width: 18px; height: 18px; }

.suggest-cta:hover { background: #B23219; }

.suggest .suggest-alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 12px 0 0;
  font-size: .82rem;
}

.suggest-alt a {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.copy-btn {
  padding: 2px 10px;
  border: 1.5px solid #E6C9BE;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 800 .75rem var(--font-body);
  cursor: pointer;
}

.copy-btn:hover { border-color: #C93D22; }

.copy-btn.is-done {
  border-color: var(--teal);
  background: #E6F6F4;
  color: #0B6B62;
}

.data-note {
  margin: 14px 4px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFF3DB;
  color: #6B5A3A;
  font-size: .82rem;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--footer-h);
  padding: 8px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}

.site-footer p { margin: 0; }

.leaflet-container a.leaflet-control-zoom-in,
.leaflet-container a.leaflet-control-zoom-out { color: var(--ink); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 900px) {
  :root { --header-h: auto; --footer-h: auto; }

  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 12px;
    height: auto;
    padding: 12px 16px;
  }

  .brand-name { font-size: 1.35rem; }

  .brand { grid-area: 1 / 1; }
  .suggest-btn { grid-area: 1 / 2; }

  .tagline {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    font-size: .9rem;
    white-space: normal;
  }

  .layout {
    display: block;
    height: auto;
    min-height: 0;
  }

  .map-wrap {
    height: 70vh;
    height: 70svh;
    min-height: 440px;
  }

  .venue-list {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 16px 24px;
    overflow: visible;
  }

  .map-hint { font-size: .8rem; top: 60px; }
}

@media (max-width: 520px) {
  .brand img { width: 36px; height: 36px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 1.25rem; }

  .suggest-btn {
    width: 42px;
    height: 42px;
    padding: 0;
  }

  .suggest-btn svg { width: 20px; height: 20px; }
  .suggest-label { display: none; }
}
