:root {
  --ink: #14261f;
  --ink-soft: #3d5a4c;
  --paper: #f3f7f5;
  --sand: #dce8e3;
  --sea: #0b6b6b;
  --sea-deep: #074747;
  --coral: #c45c26;
  --mist: rgba(243, 247, 245, 0.94);
  --shadow: 0 18px 50px rgba(20, 38, 31, 0.16);
  --radius: 18px;
  --font-display: "Literata", Georgia, serif;
  --font-body: "Be Vietnam Pro", sans-serif;
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  overflow-x: hidden;
  min-width: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ——— Site header ——— */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  min-height: var(--header-h);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding:
    max(0px, env(safe-area-inset-top))
    max(clamp(0.85rem, 3vw, 2.5rem), env(safe-area-inset-right))
    0
    max(clamp(0.85rem, 3vw, 2.5rem), env(safe-area-inset-left));
  background: rgba(20, 38, 31, 0.35);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f3f7f5;
  animation: headerIn 0.8s ease both;
}

@keyframes headerIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.header-account {
  display: flex;
  align-items: center;
  gap: 0.45rem 0.65rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  flex-shrink: 0;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  margin-right: 0.15rem;
}

.lang-switcher select {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(8, 42, 40, 0.55);
  color: #f4faf8;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.35rem 1.55rem 0.35rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239fd4d0' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.lang-switcher select:hover,
.lang-switcher select:focus {
  border-color: rgba(159, 212, 208, 0.7);
  outline: none;
}

.lang-switcher select option {
  color: #123;
  background: #fff;
}

.admin-page .lang-switcher select,
.auth-page .lang-switcher select {
  border-color: rgba(13, 110, 110, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: #0d3d3a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230d6e6e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.auth-page .lang-switcher {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 20;
}

.header-link {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: #d7ebe7;
  cursor: pointer;
  padding: 0.2rem 0.15rem;
}

.header-link:hover {
  color: #fff;
}

.header-user {
  font-size: 0.82rem;
  color: #9fd4d0;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.add-spot-hint {
  margin: 0.45rem 0 0.15rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 0;
}

.site-nav a {
  opacity: 0.88;
  transition: opacity 0.2s;
}

.site-nav a:hover {
  opacity: 1;
}

.header-cta {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #f3f7f5;
  color: var(--sea-deep);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.2s, background 0.2s;
}

.header-cta:hover {
  transform: translateY(-1px);
  background: #fff;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  color: #f3f7f5;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 28, 24, 0.35) 0%, rgba(10, 28, 24, 0.55) 45%, rgba(10, 28, 24, 0.88) 100%),
    url("https://images.unsplash.com/photo-1528127269322-539801943592?w=1800&q=80") center / cover no-repeat;
  transform: scale(1.04);
  animation: heroZoom 12s ease-out both;
}

@keyframes heroZoom {
  from {
    transform: scale(1.12);
  }
  to {
    transform: scale(1.04);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  padding: 0 clamp(1.25rem, 5vw, 3.5rem) clamp(3.5rem, 9vh, 5.5rem);
  animation: riseIn 0.9s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.9rem;
}

.hero-lead {
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  line-height: 1.65;
  max-width: 36rem;
  color: rgba(243, 247, 245, 0.88);
  margin-bottom: 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--coral);
  color: #fff;
}

.btn-primary:hover {
  background: #d4682e;
}

.btn-ghost {
  background: transparent;
  color: #f3f7f5;
  border: 1px solid rgba(243, 247, 245, 0.45);
}

.btn-ghost:hover {
  background: rgba(243, 247, 245, 0.1);
}

/* ——— Shared section heads ——— */
.section-head {
  width: min(760px, 100%);
  margin-bottom: 2.25rem;
}

.section-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sea);
  margin-bottom: 0.65rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-lead {
  font-size: 1.02rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ——— Intro ——— */
.intro {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3.5rem);
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(11, 107, 107, 0.1), transparent 55%),
    linear-gradient(180deg, #eaf3f0 0%, var(--paper) 100%);
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
}

.intro-block h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.55rem;
  color: var(--sea-deep);
}

.intro-block p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ——— Map section ——— */
.map-section {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2rem) clamp(3rem, 6vw, 4.5rem);
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(196, 92, 38, 0.08), transparent 50%),
    #e7f0ec;
}

.map-section-head {
  padding-inline: clamp(0.25rem, 2vw, 1.5rem);
}

.app {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  height: min(90vh, 920px);
  height: min(90dvh, 920px);
  min-height: 560px;
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--mist);
  animation: mapReveal 0.8s ease both;
  isolation: isolate;
}

@keyframes mapReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.35rem 1.15rem 1rem;
  background: var(--mist);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(20, 38, 31, 0.08);
  z-index: 20;
  overflow: hidden;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--sea);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: 0.3rem;
}

.brand-sub {
  margin-top: 0.55rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.search-wrap input {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(20, 38, 31, 0.12);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-wrap input:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(11, 107, 107, 0.15);
}

.search-wrap input::placeholder {
  color: #8a9a90;
}

.need-filters {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.need-filters-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0 0.15rem;
}

.need-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.need-chip {
  appearance: none;
  border: 1px solid rgba(20, 38, 31, 0.14);
  background: #fff;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.need-chip:hover {
  border-color: var(--sea);
  color: var(--sea-deep);
  transform: translateY(-1px);
}

.need-chip[aria-pressed="true"] {
  background: var(--sea);
  border-color: var(--sea);
  color: #f7f3eb;
}

.need-chip[aria-pressed="true"]:hover {
  background: var(--sea-deep);
  border-color: var(--sea-deep);
  color: #fff;
}

.region-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-right: 0.2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--sand) transparent;
}

.region-group {
  margin: 0.75rem 0 0.15rem;
  padding: 0 0.45rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sea);
}

.region-group:first-child {
  margin-top: 0.15rem;
}

.region-btn {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.62rem 0.75rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.region-btn:hover,
.region-btn.active {
  background: rgba(11, 107, 107, 0.1);
}

.region-btn.active {
  transform: translateX(2px);
}

.region-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--coral);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.2);
}

.region-btn-text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.region-btn-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.region-btn-meta {
  font-size: 0.72rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-foot {
  font-size: 0.72rem;
  color: var(--ink-soft);
  padding-top: 0.45rem;
  border-top: 1px solid rgba(20, 38, 31, 0.08);
}

.map-stage {
  position: relative;
  min-height: 0;
}

#map {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, #d7ebe4 0%, #b7d4cb 45%, #8eb8ad 100%);
  cursor: default;
}

#map.leaflet-container {
  cursor: default !important;
}

#map .leaflet-grab,
#map .leaflet-dragging .leaflet-grab {
  cursor: pointer !important;
}

.island-insets {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-42%);
  z-index: 550;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: min(156px, 36vw);
  pointer-events: none;
}

.island-inset {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.22rem;
  padding: 0.5rem 0.55rem 0.45rem;
  border: 1.5px solid #1f3d36;
  border-radius: 10px;
  background: #f7f3eb;
  color: #143026;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 28px rgba(20, 38, 31, 0.22);
  transition: background 0.2s, transform 0.2s, border-color 0.2s, color 0.2s;
}

.island-inset:hover {
  background: #fff;
  transform: translateY(-2px);
  border-color: #0d6e6e;
}

.island-inset.active {
  background: #c45c26;
  border-color: #9a3f14;
  color: #fffaf5;
}

.island-inset-label {
  font-family: var(--font-display, Georgia, serif);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.island-inset-svg {
  width: 100%;
  height: 54px;
  display: block;
  background: rgba(13, 110, 110, 0.1);
  border-radius: 6px;
}

.island-inset-svg path,
.island-inset-svg circle {
  fill: #0d6e6e;
  stroke: #0a5555;
  stroke-width: 0.35;
}

.island-inset.active .island-inset-svg {
  background: rgba(255, 255, 255, 0.18);
}

.island-inset.active .island-inset-svg path,
.island-inset.active .island-inset-svg circle {
  fill: #fffaf5;
  stroke: rgba(255, 250, 245, 0.5);
}

.island-inset-meta {
  font-size: 0.62rem;
  opacity: 0.72;
  letter-spacing: 0.02em;
}

.island-inset.active .island-inset-meta {
  opacity: 0.9;
}

.map-hint {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  padding: 0.5rem 1rem;
  background: rgba(20, 38, 31, 0.85);
  color: #f3f7f5;
  font-size: 0.78rem;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.4s, transform 0.4s;
}

.map-hint.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

.menu-toggle {
  display: none;
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 600;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: var(--mist);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.vn-tooltip {
  background: rgba(20, 38, 31, 0.9) !important;
  border: none !important;
  color: #f3f7f5 !important;
  font-family: var(--font-body) !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  padding: 0.35rem 0.65rem !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(20, 38, 31, 0.25) !important;
}

.vn-tooltip::before {
  border-top-color: rgba(20, 38, 31, 0.9) !important;
}

.leaflet-interactive {
  cursor: pointer;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow) !important;
  border-radius: 12px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--mist) !important;
  color: var(--ink) !important;
  border-bottom-color: rgba(20, 38, 31, 0.08) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-size: 15px !important;
}

.leaflet-control-attribution {
  display: none !important;
}

/* ——— Detail panel ——— */
.detail-panel {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: min(360px, calc(100% - 1.8rem));
  max-height: calc(100% - 1.8rem);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 700;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px) scale(0.98);
  transition: opacity 0.35s, transform 0.35s, visibility 0.35s;
}

.detail-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

.detail-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.detail-hero {
  height: 140px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 38, 31, 0.5), transparent 60%);
}

.detail-body {
  padding: 1.1rem 1.2rem 1.35rem;
  overflow-y: auto;
}

.detail-region {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sea);
  margin-bottom: 0.3rem;
}

.detail-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.45rem;
}

.detail-desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

.spots-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 0.65rem;
}

.spots {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.spot {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f4f8f6, #faf7f2);
  border: 1px solid rgba(20, 38, 31, 0.06);
}

.spot-btn {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.spot-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--sand);
}

.spot-btn-body {
  min-width: 0;
  flex: 1;
}

.spot-btn:hover {
  border-color: rgba(11, 107, 107, 0.35);
  box-shadow: 0 6px 18px rgba(20, 38, 31, 0.08);
  transform: translateY(-1px);
}

.spot-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.spot-address {
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0.2rem 0 0.35rem;
}

.spot-open {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sea);
}

.spot-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--coral);
  letter-spacing: 0.02em;
}

.back-btn {
  border: none;
  background: transparent;
  color: var(--sea);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 0.75rem;
}

.back-btn:hover {
  text-decoration: underline;
}

.info-block {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(20, 38, 31, 0.08);
}

.info-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sea);
  margin-bottom: 0.3rem;
}

.info-value {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink);
}

#spotTag {
  display: inline-block;
  margin: 0.3rem 0 0.2rem;
}

/* ——— Add spot form ——— */
.add-spot {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(20, 38, 31, 0.15);
}

.add-spot-toggle {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px dashed rgba(11, 107, 107, 0.45);
  border-radius: 12px;
  background: rgba(11, 107, 107, 0.06);
  color: var(--sea);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.add-spot-toggle:hover {
  background: rgba(11, 107, 107, 0.12);
  border-color: var(--sea);
}

.add-spot-form {
  margin-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.add-spot-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field em {
  color: var(--coral);
  font-style: normal;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(20, 38, 31, 0.14);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ink);
  outline: none;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 3px rgba(11, 107, 107, 0.12);
}

.field input.invalid,
.field textarea.invalid {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.12);
}

.form-error {
  font-size: 0.8rem;
  color: var(--coral);
  font-weight: 500;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-save,
.btn-cancel {
  flex: 1;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.btn-save {
  background: var(--sea);
  color: #fff;
}

.btn-save:hover {
  background: var(--sea-deep);
}

.btn-cancel {
  background: transparent;
  border: 1px solid rgba(20, 38, 31, 0.14);
  color: var(--ink-soft);
}

.spot-empty {
  list-style: none;
  padding: 0.85rem 0.2rem 0.4rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.spot-row {
  position: relative;
}

.spot-row .spot-btn {
  padding-right: 2.4rem;
}

.spot-delete {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(196, 92, 38, 0.1);
  color: var(--coral);
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1;
}

.spot-delete:hover {
  background: rgba(196, 92, 38, 0.2);
}

.spot-custom-badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--sea);
  letter-spacing: 0.02em;
}

.overlay {
  display: none;
}

/* ——— Seasons ——— */
.seasons {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3.5rem);
  background:
    radial-gradient(ellipse 55% 45% at 100% 0%, rgba(196, 92, 38, 0.08), transparent 50%),
    linear-gradient(180deg, #f3f7f5 0%, #e8f1ed 100%);
}

.season-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.season-tab {
  padding: 0.65rem 1.15rem;
  border: 1px solid rgba(20, 38, 31, 0.12);
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.season-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 107, 107, 0.35);
}

.season-tab.active {
  background: var(--sea);
  border-color: var(--sea);
  color: #fff;
}

.season-note {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 1.35rem;
  max-width: 40rem;
  line-height: 1.6;
}

.season-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.season-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(20, 38, 31, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s;
  animation: riseIn 0.45s ease both;
}

.season-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.season-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--sand);
}

.season-card-body {
  padding: 1rem 1.05rem 1.15rem;
}

.season-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin-bottom: 0.3rem;
}

.season-card-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sea);
  margin-bottom: 0.4rem;
}

.season-card-body p {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ——— Random ——— */
.random-section {
  padding: clamp(3.5rem, 8vw, 5.5rem) clamp(1.25rem, 5vw, 3.5rem);
  background:
    linear-gradient(145deg, #0a3d3d 0%, #0b6b6b 45%, #0f4f4a 100%);
  color: #f3f7f5;
}

.random-inner {
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
}

.random-head {
  margin-left: auto;
  margin-right: auto;
}

.random-section .section-kicker {
  color: #9fd4d0;
}

.random-section .section-head h2,
.random-section .section-lead {
  color: #fff;
}

.random-section .section-lead {
  opacity: 0.88;
}

.btn-random {
  margin: 0.25rem 0 1.5rem;
  padding: 0.95rem 1.6rem;
  border: none;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  animation: pulseSoft 2.2s ease-in-out infinite;
}

.btn-random:hover {
  background: #d4682e;
  transform: translateY(-2px) scale(1.02);
  animation: none;
}

@keyframes pulseSoft {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(196, 92, 38, 0.45);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(196, 92, 38, 0);
  }
}

.random-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  text-align: left;
  background: #fff;
  color: var(--ink);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: riseIn 0.45s ease both;
}

.random-card img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  background: var(--sand);
}

.random-card-body {
  padding: 1.2rem 1.3rem 1.35rem;
}

.random-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.35rem;
}

.random-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.random-place {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sea);
  margin-bottom: 0.55rem;
}

.random-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.random-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.random-actions .btn-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex: 1;
  min-width: 140px;
}

.random-actions .btn-cancel {
  flex: 1;
  min-width: 120px;
}

/* ——— Why section ——— */
.why {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3.5rem);
  background:
    linear-gradient(160deg, #0b6b6b 0%, #074747 55%, #0a3d3d 100%);
  color: #f3f7f5;
}

.why .section-kicker {
  color: #9fd4d0;
}

.why .section-head h2 {
  color: #fff;
}

.why-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}

.why-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #7ec8c3;
  margin-bottom: 0.55rem;
}

.why-item h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.45rem;
}

.why-item p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(243, 247, 245, 0.82);
}

/* ——— Footer ——— */
.site-footer {
  padding: 2.5rem clamp(1.25rem, 5vw, 3.5rem);
  background: #0a2a24;
  color: rgba(243, 247, 245, 0.85);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.footer-note {
  flex: 1;
  font-size: 0.88rem;
}

.site-footer a {
  font-size: 0.88rem;
  font-weight: 600;
  color: #9fd4d0;
}

.site-footer a:hover {
  color: #fff;
}

/* ——— Responsive ——— */
@media (max-width: 1100px) {
  .site-nav {
    gap: 1rem;
    font-size: 0.84rem;
  }

  .app {
    grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .season-grid {
    grid-template-columns: 1fr 1fr;
  }

  .why-list {
    grid-template-columns: 1fr 1fr;
  }

  .site-header {
    height: auto;
    min-height: var(--header-h);
    flex-wrap: wrap;
    padding-top: max(0.55rem, env(safe-area-inset-top));
    padding-bottom: 0.55rem;
    row-gap: 0.45rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .site-nav {
    order: 3;
    flex: 1 0 100%;
    width: 100%;
    gap: 0.85rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.1rem;
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.82rem;
  }

  .header-account .header-cta {
    display: none;
  }

  .header-user {
    max-width: 88px;
  }

  .hero-content {
    padding-top: 0.5rem;
    padding-bottom: max(3rem, env(safe-area-inset-bottom));
  }

  html {
    scroll-padding-top: 7.25rem;
  }

  .intro,
  .map-section,
  .seasons,
  .random-section,
  .why {
    scroll-margin-top: 7.25rem;
  }
}

@media (max-width: 860px) {
  .map-section {
    padding-inline: clamp(0.65rem, 2.5vw, 1rem);
  }

  .app {
    grid-template-columns: minmax(0, 1fr);
    height: min(78vh, 760px);
    height: min(78dvh, 760px);
    min-height: 480px;
    border-radius: 18px;
  }

  .sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(320px, 88vw);
    max-width: 100%;
    transform: translateX(-105%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 40;
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: flex;
  }

  .overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(20, 38, 31, 0.4);
    z-index: 30;
    border: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
  }

  .overlay[hidden] {
    display: none;
  }

  .detail-panel {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-height: min(72%, 560px);
    border-radius: 18px 18px 0 0;
    transform: translateY(110%);
    opacity: 1;
    visibility: hidden;
  }

  .detail-panel.open {
    transform: translateY(0);
    visibility: visible;
  }

  .detail-hero {
    height: 110px;
  }

  .island-insets {
    right: 0.5rem;
    top: auto;
    bottom: 3.75rem;
    transform: none;
    width: min(118px, 34vw);
    gap: 0.4rem;
  }

  .island-inset {
    padding: 0.4rem 0.42rem 0.35rem;
  }

  .island-inset-label {
    font-size: 0.66rem;
  }

  .island-inset-svg {
    height: 40px;
  }

  .island-inset-meta {
    font-size: 0.56rem;
  }

  .map-hint {
    bottom: 0.75rem;
    font-size: 0.68rem;
    white-space: normal;
    text-align: center;
    max-width: min(92%, 280px);
    line-height: 1.35;
    border-radius: 12px;
    padding: 0.45rem 0.75rem;
  }

  .why-list {
    grid-template-columns: 1fr;
  }

  .season-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .season-tabs::-webkit-scrollbar {
    display: none;
  }

  .season-tab {
    flex: 0 0 auto;
  }
}

@media (max-width: 720px) {
  .season-grid {
    grid-template-columns: 1fr;
  }

  .random-card {
    grid-template-columns: 1fr;
  }

  .random-card img {
    min-height: 180px;
    height: 180px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .footer-note {
    flex: none;
  }
}

@media (max-width: 560px) {
  :root {
    --header-h: 3.6rem;
  }

  .logo {
    font-size: 1rem;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .lang-switcher select {
    font-size: 0.72rem;
    padding: 0.3rem 1.35rem 0.3rem 0.45rem;
  }

  .header-link {
    font-size: 0.78rem;
  }

  .header-account .header-link#adminLink {
    display: none;
  }

  .header-cta {
    display: none;
  }

  .hero-content {
    padding:
      calc(var(--header-h) + 1.5rem)
      clamp(1rem, 4vw, 1.5rem)
      max(2.5rem, env(safe-area-inset-bottom));
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    min-height: 46px;
  }

  .intro,
  .seasons,
  .random-section,
  .why {
    padding-inline: clamp(1rem, 4vw, 1.35rem);
  }

  .map-section {
    padding-inline: 0.5rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }

  .app {
    height: min(82dvh, 680px);
    min-height: 420px;
    border-radius: 14px;
  }

  .sidebar {
    width: 100%;
    max-width: none;
    border-right: 0;
  }

  .menu-toggle {
    top: 0.65rem;
    left: 0.65rem;
    width: 44px;
    height: 44px;
  }

  .detail-panel {
    max-height: min(78%, 640px);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .detail-body {
    padding: 1rem 1rem max(1.25rem, env(safe-area-inset-bottom));
  }

  .island-insets {
    display: none;
  }

  .need-chip {
    min-height: 36px;
    padding: 0.5rem 0.7rem;
  }

  .field input,
  .field textarea,
  .field select,
  .search-wrap input {
    font-size: 16px;
  }

  .map-section-head {
    padding-inline: 0.35rem;
  }

  .map-section-head h2 {
    font-size: clamp(1.25rem, 6vw, 1.7rem);
  }

  html {
    scroll-padding-top: 6.75rem;
  }
}

@media (max-width: 380px) {
  .header-user {
    display: none;
  }
}

@media (min-width: 861px) and (max-height: 720px) {
  .app {
    height: min(88vh, 640px);
    min-height: 480px;
  }

  .detail-hero {
    height: 110px;
  }
}

/* —— Itineraries / Saved / Onboarding / Trust —— */
.itineraries,
.saved-section {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
  max-width: 1120px;
  margin-inline: auto;
}

.itin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.itin-card {
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(232, 244, 240, 0.88));
  border: 1px solid rgba(20, 80, 70, 0.12);
}

.itin-days {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sea-deep, #0f5c4c);
  font-weight: 600;
}

.itin-card h3 {
  margin: 0 0 0.4rem;
  font-family: Literata, Georgia, serif;
  font-size: 1.15rem;
}

.itin-card > p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft, #3d4a45);
  font-size: 0.92rem;
  line-height: 1.45;
}

.itin-stops {
  margin: 0 0 0.9rem;
  padding-left: 1.1rem;
  color: var(--ink, #1a2420);
  font-size: 0.9rem;
}

.itin-stops a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.itin-open {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 600;
  color: var(--sea-deep, #0f5c4c);
  text-decoration: none;
}

.saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 1.35rem;
}

.saved-empty {
  color: var(--ink-soft, #3d4a45);
  margin: 1rem 0 0;
}

.saved-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(20, 80, 70, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.saved-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 50, 40, 0.08);
}

.saved-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.saved-card strong {
  display: block;
  font-size: 0.95rem;
}

.saved-card span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  color: var(--ink-soft, #3d4a45);
}

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  justify-content: center;
  padding: 1rem clamp(1rem, 4vw, 2rem) 0;
  max-width: 900px;
  margin: 0 auto 0.5rem;
  font-size: 0.86rem;
  color: var(--ink-soft, #3d4a45);
}

.trust-bar span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.trust-bar span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sea-deep, #0f5c4c);
}

.onboard {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(12, 28, 24, 0.55);
  backdrop-filter: blur(6px);
  animation: onboardFade 0.35s ease;
}

.onboard[hidden] {
  display: none !important;
}

@keyframes onboardFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.onboard-card {
  width: min(420px, 100%);
  padding: 1.5rem 1.35rem 1.35rem;
  border-radius: 18px;
  background: linear-gradient(165deg, #f7fbf9, #e7f3ee);
  box-shadow: 0 24px 48px rgba(8, 30, 24, 0.28);
  animation: onboardUp 0.4s ease;
}

@keyframes onboardUp {
  from {
    transform: translateY(12px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.onboard-card h2 {
  margin: 0 0 1rem;
  font-family: Literata, Georgia, serif;
  font-size: 1.35rem;
}

.onboard-step {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sea-deep, #0f5c4c);
}

.onboard-langs,
.onboard-needs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.onboard-langs button,
.onboard-needs button {
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 80, 70, 0.2);
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.onboard-langs button.active,
.onboard-needs button.active {
  background: var(--sea-deep, #0f5c4c);
  color: #fff;
  border-color: transparent;
}

.onboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}

.onboard-skip {
  opacity: 0.85;
}
