/* ═══════════════════════════════════════════
   KangCamp — Main Stylesheet
   ═══════════════════════════════════════════ */

:root {
  --green:      #2d6a4f;
  --green-dark: #1b4332;
  --green-light:#52b788;
  --amber:      #e9c46a;
  --orange:     #f4a261;
  --red:        #e76f51;
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-500:   #64748b;
  --gray-700:   #334155;
  --gray-900:   #0f172a;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,.10);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.07);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', 'Noto Sans Thai', system-ui, sans-serif;
  color: var(--gray-700);
  background: var(--gray-50);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

/* ── Container ───────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container-narrow {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navbar ─────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--green-dark);
  height: 60px;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.navbar-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}

.navbar-brand {
  color: var(--white);
  font-size: 1.4rem; font-weight: 700;
  display: flex; align-items: center; gap: .5rem;
}

.navbar-brand span { color: var(--amber); }

.navbar-links {
  display: flex; gap: 1.5rem; list-style: none;
}

.navbar-links a {
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  transition: color .2s;
}

.navbar-links a:hover,
.navbar-links a.active { color: var(--amber); }

/* ── Hamburger ───────────────────────────── */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--white); font-size: 1.45rem;
  padding: .3rem .4rem; border-radius: 6px;
  line-height: 1; transition: background .15s;
  flex-shrink: 0;
}
.nav-toggle:hover { background: rgba(255,255,255,.12); }

@media (max-width: 768px) {
  /* ── Mobile nav: toggle LEFT · brand CENTER · user RIGHT ── */
  .navbar-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 1fr;
    align-items: center;
    gap: 0;
    position: relative;
  }
  .nav-toggle {
    display: flex; align-items: center;
    order: 1; grid-column: 1;
  }
  .navbar-brand {
    order: 2; grid-column: 2;
    justify-self: center; text-align: center;
  }
  #navUser {
    order: 3; grid-column: 3;
    justify-self: end;
  }
  .navbar-links {
    display: none;
    order: 4;
    position: absolute; top: 60px; left: 0; right: 0; z-index: 200;
    background: var(--green-dark);
    flex-direction: column; gap: 0;
    box-shadow: 0 6px 18px rgba(0,0,0,.22);
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .navbar-links.open { display: flex; }
  .navbar-links li { border-bottom: 1px solid rgba(255,255,255,.06); }
  .navbar-links a { display: block; padding: .85rem 1.5rem; font-size: 1rem; }

  /* ── Mobile user dropdown ── */
  .nav-user-name { display: none; }
  #navUser { gap: 0; }
  .nav-user-caret { display: none; }

  /* dropdown opens upward or downward – keep right-aligned */
  .nav-user-dropdown { right: 0; left: auto; min-width: 160px; }

  .season-score-grid { grid-template-columns: repeat(4, minmax(54px, 1fr)); }
  .outdoor-module-grid { grid-template-columns: 1fr; }
  .section-headline { flex-direction: column; align-items: stretch; }
  .detail-section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .season-score-grid { grid-template-columns: repeat(3, 1fr); }
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Hero ────────────────────────────────── */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(27,67,50,.9) 0%, rgba(45,106,79,.78) 60%, rgba(82,183,136,.68) 100%),
    url('https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
  overflow: hidden;
  padding: 3rem 1.5rem;
}

.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.18));
}

.hero-content { position: relative; color: var(--white); max-width: 700px; }

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-title span { color: var(--amber); }

.hero-sub {
  font-size: 1.15rem;
  opacity: .9;
  margin-bottom: 2rem;
}

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: 8px;
  font-size: .95rem; font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-dark); }

.btn-amber {
  background: var(--amber);
  color: var(--gray-900);
}
.btn-amber:hover { background: var(--orange); }

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,.15); }

.btn-sm { padding: .4rem 1rem; font-size: .85rem; }

/* ── Search bar ──────────────────────────── */
.search-bar {
  display: flex; gap: .5rem; flex-wrap: wrap;
  background: var(--white);
  padding: .75rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
}

.search-bar input,
.search-bar select {
  flex: 1 1 140px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: .55rem .9rem;
  font-size: .9rem;
  font-family: inherit;
  color: var(--gray-700);
  background: var(--gray-50);
  outline: none;
  transition: border-color .2s;
}

.search-bar input:focus,
.search-bar select:focus { border-color: var(--green-light); }

/* ── Section ─────────────────────────────── */
.section { padding: 3.5rem 0; }
.section.container { padding: 3.5rem 1.5rem; }

.section-title {
  font-size: 1.6rem; font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: .6rem;
}

.section-headline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section-headline .section-title { margin-bottom: .25rem; }
.section-kicker {
  color: var(--gray-500);
  font-size: .95rem;
}

/* ── Category chips ──────────────────────── */
.chips {
  display: flex; gap: .6rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.chip {
  padding: .4rem .9rem;
  border-radius: 20px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}

.chip:hover,
.chip.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

/* ── Card grid ───────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ── Popular mini grid (4 compact cards) ─── */
.popular-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}
@media (max-width: 768px) {
  .popular-mini-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .popular-mini-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
}
.pop-mini-card {
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
  transition: transform .15s, box-shadow .15s;
}
.pop-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.pop-mini-img {
  position: relative;
  height: 90px;
  background: #c8e6c9 center/cover no-repeat;
}
.pop-mini-cat {
  position: absolute;
  bottom: .3rem; left: .4rem;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.pop-mini-body { padding: .5rem .6rem .6rem; }
.pop-mini-name {
  font-size: .82rem;
  font-weight: 700;
  color: var(--gray-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: .2rem;
}
.pop-mini-meta {
  display: flex;
  gap: .5rem;
  font-size: .72rem;
  color: var(--gray-500);
}

/* ── btn-text-link ───────────────────────── */
.btn-text-link {
  font-size: .82rem;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
  white-space: nowrap;
}
.btn-text-link:hover { text-decoration: underline; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}

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

.card-img {
  width: 100%; height: 180px;
  object-fit: cover;
  background: var(--gray-200);
}

.card-body { padding: 1rem 1.1rem; }

.card-category {
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--green-light);
  margin-bottom: .25rem;
}

.card-title {
  font-size: 1.05rem; font-weight: 700;
  color: var(--gray-900);
  margin-bottom: .35rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  min-height: 1.45rem;
  margin-bottom: .55rem;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  color: var(--green-dark);
  background: #f0fdf4;
  font-size: .72rem;
  font-weight: 700;
  padding: .1rem .5rem;
}

.card-meta {
  display: flex; gap: .75rem; flex-wrap: wrap;
  font-size: .82rem;
  color: var(--gray-500);
  margin-bottom: .6rem;
}

.card-meta span { display: flex; align-items: center; gap: .25rem; }

.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 12px;
  font-size: .75rem; font-weight: 600;
}

.badge-easy     { background: #d1fae5; color: #065f46; }
.badge-moderate { background: #fef3c7; color: #92400e; }
.badge-hard     { background: #fee2e2; color: #991b1b; }
.badge-extreme  { background: #ede9fe; color: #4c1d95; }

.stars { color: var(--amber); letter-spacing: .05em; }

.card-bottom,
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}

.status-row {
  margin-top: .55rem;
  padding-top: .55rem;
  border-top: 1px solid var(--gray-100);
  color: var(--gray-500);
  font-size: .78rem;
}

.weather-row { justify-content: flex-start; border-top: none; margin-top: .35rem; padding-top: 0; }
.weather-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: .18rem .58rem; font-size: .75rem; font-weight: 800; }
.weather-pill.good { background: #dcfce7; color: #166534; }
.weather-pill.ok { background: #fef9c3; color: #854d0e; }
.weather-pill.avoid { background: #fee2e2; color: #991b1b; }
.weather-pill.unknown { background: #f1f5f9; color: #475569; }

/* ── Detail page ─────────────────────────── */
.detail-hero {
  height: 420px;
  background: var(--gray-200) center/cover no-repeat;
  position: relative;
}

.detail-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 60%);
  display: flex; align-items: flex-end;
  padding: 2rem;
  color: var(--white);
}

.detail-hero-title { font-size: 2rem; font-weight: 800; }
.detail-hero-sub   { font-size: 1rem; opacity: .85; margin-top: .3rem; }

.detail-body { margin: 2rem auto; padding-bottom: 4rem; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.info-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.info-box .icon { font-size: 1.5rem; }
.info-box .label { font-size: .78rem; color: var(--gray-500); margin: .3rem 0 .1rem; }
.info-box .value { font-size: 1.1rem; font-weight: 700; color: var(--gray-900); }

.outdoor-detail-panel {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.detail-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .85rem;
}

.detail-section-head h2 {
  color: var(--green-dark);
  font-size: 1.1rem;
  font-weight: 800;
}

.mini-tag.activity {
  background: #eff6ff;
  color: #1d4ed8;
}

.outdoor-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .85rem;
}

.module-card {
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  background: var(--gray-50);
  padding: .9rem;
}

.module-card h3 {
  color: var(--gray-900);
  font-size: .95rem;
  margin-bottom: .55rem;
}

.module-row {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  border-top: 1px solid var(--gray-200);
  padding: .45rem 0;
  font-size: .86rem;
}

.module-row:first-of-type { border-top: 0; }
.module-row span { color: var(--gray-500); }
.module-row strong { color: var(--gray-900); text-align: right; }

.signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: .75rem;
  margin-top: .85rem;
}

.signal-card {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  background: #f8fafc;
  padding: .8rem;
}

.signal-card strong { color: var(--green-dark); }
.signal-card span { font-weight: 700; color: var(--gray-900); }
.signal-card small { color: var(--gray-500); }

.season-score-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(54px, 1fr));
  gap: .45rem;
}

.season-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 10px;
  padding: .55rem .25rem;
  border: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.season-pill span { font-size: .78rem; color: var(--gray-500); }
.season-pill strong { color: var(--gray-900); }
.season-pill.good { background: #dcfce7; border-color: #bbf7d0; }
.season-pill.fair { background: #fef9c3; border-color: #fde68a; }
.season-pill.low { background: #fee2e2; border-color: #fecaca; }

.empty-state.compact {
  padding: 1rem;
  text-align: left;
}

/* ── Reviews ─────────────────────────────── */
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
}

.review-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .5rem;
  font-size: .9rem;
}

.review-user { font-weight: 600; color: var(--gray-900); }
.review-date { color: var(--gray-500); font-size: .8rem; }

/* ── Map page ────────────────────────────── */
#map { height: calc(100vh - 60px); width: 100%; }

.map-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  width: 300px;
  overflow-y: auto;
}

.sidebar-title { font-weight: 700; margin-bottom: .75rem; }

.place-list-item {
  display: flex; gap: .7rem;
  padding: .6rem .5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}

.place-list-item:hover { background: var(--gray-100); }

.place-list-img {
  width: 54px; height: 54px;
  border-radius: 8px; object-fit: cover; flex-shrink: 0;
  background: var(--gray-200);
}

/* .place-list-info styles — map page uses .place-list-name/.place-list-sub in map.css */
.place-list-info .name,
.place-list-name { font-weight: 600; font-size: .9rem; }
.place-list-info .sub,
.place-list-sub  { font-size: .78rem; color: var(--gray-500); }

/* ── Planner page ────────────────────────── */
.planner-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  margin: 2rem auto;
}

@media (max-width: 768px) {
  .planner-layout { grid-template-columns: 1fr; }
  .section-headline { flex-direction: column; align-items: stretch; }
  .season-score-grid { grid-template-columns: repeat(4, minmax(54px, 1fr)); }
  .detail-section-head { align-items: flex-start; flex-direction: column; }
}

.trip-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: .4rem; }

.form-group label {
  font-size: .85rem; font-weight: 600;
  color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  padding: .55rem .9rem;
  font-size: .9rem;
  font-family: inherit;
  color: var(--gray-700);
  outline: none;
  transition: border-color .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--green-light); }

.trip-stop-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: .75rem;
  position: relative;
}

.trip-stop-card .stop-img {
  width: 60px; height: 60px;
  border-radius: 8px; object-fit: cover; flex-shrink: 0;
  background: var(--gray-200);
}

.stop-info .stop-name { font-weight: 700; font-size: .95rem; }
.stop-info .stop-meta { font-size: .8rem; color: var(--gray-500); }

.stop-day-badge {
  background: var(--green);
  color: var(--white);
  border-radius: 8px;
  padding: .2rem .5rem;
  font-size: .75rem; font-weight: 700;
  flex-shrink: 0;
}

.remove-stop {
  position: absolute; top: .5rem; right: .75rem;
  background: none; border: none;
  cursor: pointer;
  color: var(--gray-500);
  font-size: 1.1rem;
  transition: color .2s;
}

.remove-stop:hover { color: var(--red); }

/* ── Misc ────────────────────────────────── */
.loading {
  text-align: center; padding: 3rem;
  color: var(--gray-500);
}

.empty-state {
  text-align: center; padding: 3rem;
  color: var(--gray-500);
  font-size: .95rem;
}

.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  background: var(--green-dark);
  color: var(--white);
  padding: .75rem 1.2rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: .9rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all .3s;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ── Features section ───────────────────────── */
.features-section {
  background: var(--green-dark);
  color: var(--white);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.features-inner {
  max-width: 860px;
  margin: 0 auto;
}
.features-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: .4rem;
}
.features-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: .4rem;
  line-height: 1.25;
}
.features-sub {
  font-size: .875rem;
  opacity: .7;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.75rem;
}
.feature-item {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
  transition: background .2s;
}
.feature-item:hover { background: rgba(255,255,255,.1); }
.feature-icon {
  font-size: 2rem;
  margin-bottom: .65rem;
}
.feature-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .4rem;
}
.feature-desc {
  opacity: .72;
  font-size: .875rem;
  line-height: 1.65;
}

/* ── Footer ─────────────────────────────────── */
.site-footer {
  background: #0f1f17;
  color: rgba(255,255,255,.55);
  font-size: .82rem;
  text-align: center;
  padding: 1.5rem 1rem;
}
.footer-inner { display: none; }
.footer-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
}
.footer-logo span { color: var(--amber); }
.footer-tagline {
  margin: .2rem 0 .75rem;
  opacity: .5;
  font-size: .8rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem .75rem;
  margin-bottom: .75rem;
}
.footer-nav-head {
  width: 100%;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  margin: .4rem 0 .1rem;
}
.footer-nav-group {
  display: contents;
}
.footer-nav-group a {
  color: var(--amber);
  text-decoration: none;
}
.footer-nav-group a:hover { text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: .75rem;
  margin-top: .25rem;
  font-size: .75rem;
  opacity: .4;
}

/* ═══════════════════════════════════════════
   Auth — Navbar User Area
   ═══════════════════════════════════════════ */
#navUser {
  display: flex; align-items: center; gap: .5rem;
}

.nav-user-link {
  display: flex; align-items: center; gap: .5rem;
  color: var(--white);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 8px;
  transition: background .15s;
}
.nav-user-link:hover { background: rgba(255,255,255,.1); }

.nav-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.5);
}

.nav-user-name {
  font-weight: 600;
  font-size: .9rem;
  color: var(--white);
}

.nav-logout-btn {
  font-size: .8rem;
  padding: .25rem .65rem;
  border-radius: 8px;
}

/* ── Nav User Dropdown ───────────────────── */
.nav-user-dropdown-wrap {
  position: relative;
}
.nav-user-toggle {
  display: flex; align-items: center; gap: .45rem;
  background: none; border: none; cursor: pointer;
  color: var(--white);
  padding: .25rem .5rem; border-radius: 8px;
  transition: background .15s;
}
.nav-user-toggle:hover { background: rgba(255,255,255,.1); }
.nav-user-caret {
  font-size: .75rem; opacity: .7; margin-left: .1rem;
  transition: transform .2s;
}
.nav-user-dropdown-wrap.open .nav-user-caret { transform: rotate(180deg); }
.nav-user-dropdown {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 180px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.16);
  overflow: hidden;
  z-index: 300;
}
.nav-user-dropdown-wrap.open .nav-user-dropdown { display: block; }
.nav-user-dropdown a,
.nav-user-dropdown button {
  display: flex; align-items: center; gap: .6rem;
  width: 100%;
  padding: .7rem 1rem;
  color: var(--gray-700);
  font-size: .9rem; font-weight: 600;
  text-decoration: none;
  background: none; border: none; cursor: pointer;
  transition: background .12s;
  font-family: inherit;
}
.nav-user-dropdown a:hover,
.nav-user-dropdown button:hover { background: var(--gray-50); }
.nav-user-dropdown .dropdown-divider {
  height: 1px; background: var(--gray-200); margin: .25rem 0;
}

/* ── Buttons extra sizes ────────────────── */
.btn-sm { padding: .3rem .75rem; font-size: .82rem; }

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.5);
  color: var(--white);
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s, border-color .15s;
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.8);
}

.btn-amber {
  background: var(--amber);
  color: var(--gray-900);
  font-weight: 700;
  border-radius: 8px;
  transition: filter .15s;
}
.btn-amber:hover { filter: brightness(1.08); }

/* ═══════════════════════════════════════════
   Auth Pages — Login / Register
   ═══════════════════════════════════════════ */
.auth-page {
  min-height: calc(100vh - 60px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #d8f3dc 0%, #b7e4c7 50%, #95d5b2 100%);
}

.auth-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
  animation: fadeUp .35s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  font-size: 3rem;
  text-align: center;
  margin-bottom: .5rem;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  color: var(--green-dark);
  margin-bottom: .25rem;
}

.auth-sub {
  text-align: center;
  color: var(--gray-500);
  font-size: .9rem;
  margin-bottom: 1.5rem;
}

.auth-error {
  background: #fff0ed;
  border: 1px solid #fbc4b4;
  color: #c0392b;
  border-radius: 10px;
  padding: .7rem 1rem;
  font-size: .88rem;
  margin-bottom: 1rem;
}

.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: .35rem; }

.form-group label {
  font-weight: 600;
  font-size: .88rem;
  color: var(--gray-700);
}

.form-group input {
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: .65rem .9rem;
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: var(--gray-50);
  width: 100%;
}
.form-group input:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(82,183,136,.15);
  background: var(--white);
}

/* Eye-toggle wrapper */
.input-eye-wrap { position: relative; }
.input-eye-wrap input { padding-right: 2.8rem; }

.eye-btn {
  position: absolute; right: .65rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  font-size: 1rem; padding: .2rem;
  line-height: 1;
  opacity: .6;
  transition: opacity .15s;
}
.eye-btn:hover { opacity: 1; }

/* Password strength */
.pw-strength {
  display: flex; align-items: center; gap: .6rem;
  margin-top: -.25rem;
}

.pw-strength-bar {
  height: 5px; border-radius: 3px;
  background: var(--gray-200);
  transition: width .3s ease, background .3s;
  flex: 0 0 auto;
  min-width: 0;
}

.pw-strength span {
  font-size: .78rem; font-weight: 600;
  white-space: nowrap;
}

.auth-submit-btn {
  margin-top: .5rem;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: .75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
  width: 100%;
}
.auth-submit-btn:hover  { background: var(--green-dark); }
.auth-submit-btn:active { transform: scale(.98); }
.auth-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.auth-divider {
  text-align: center;
  color: var(--gray-500);
  font-size: .85rem;
  margin: 1.25rem 0;
  position: relative;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--gray-200);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; padding: .75rem 1.25rem;
  background: var(--white); color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  font-family: inherit;
  transition: background .15s, box-shadow .15s;
  margin-bottom: .5rem;
}
.btn-google:hover { background: var(--gray-50); box-shadow: var(--shadow-sm); }

.auth-switch {
  text-align: center;
  font-size: .9rem;
  color: var(--gray-500);
}
.auth-switch a {
  color: var(--green);
  font-weight: 700;
}
.auth-switch a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════
   Profile Page
   ═══════════════════════════════════════════ */
.profile-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  padding: 2.5rem 1.5rem 3rem;
  color: var(--white);
}

.profile-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
}

.profile-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,.6);
  flex-shrink: 0;
}

.profile-info { display: flex; flex-direction: column; gap: .2rem; }

.profile-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
}

.profile-email {
  font-size: .9rem;
  opacity: .8;
}

.profile-joined {
  font-size: .85rem;
  opacity: .65;
}

/* Stats grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.stat-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  transition: transform .15s, box-shadow .15s;
}
.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: .2rem;
}

.stat-label {
  font-size: .82rem;
  color: var(--gray-500);
}

/* Trip list items on profile page */
.trip-list-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: .6rem;
  cursor: pointer;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .1s;
}
.trip-list-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.trip-list-item .trip-name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--green-dark);
  margin-bottom: .2rem;
}
.trip-list-item .trip-sub {
  font-size: .83rem;
  color: var(--gray-500);
}

/* ═══════════════════════════════════════════
   Reviews
   ═══════════════════════════════════════════ */
.review-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-100);
  margin-bottom: 2rem;
}

.review-form textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: .65rem .9rem;
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: var(--gray-50);
}
.review-form textarea:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(82,183,136,.15);
  background: var(--white);
}

/* Star select */
.star-select { display: flex; gap: .3rem; font-size: 1.6rem; cursor: pointer; margin-bottom: .75rem; }
.star-select span { color: var(--gray-200); transition: color .15s; user-select: none; }
.star-select span.active { color: var(--amber); }

/* Avg rating block */
.avg-rating-wrap {
  display: flex; align-items: center; gap: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.avg-big {
  font-size: 2.5rem; font-weight: 800;
  color: var(--green-dark); line-height: 1;
}
.avg-stars { font-size: 1.4rem; color: var(--amber); }
.avg-total { font-size: .85rem; color: var(--gray-500); }

/* Review card */
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}

.review-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gray-200);
}
.review-user { font-weight: 700; font-size: .9rem; }
.review-date { font-size: .78rem; color: var(--gray-500); }
.review-stars { font-size: 1.1rem; color: var(--amber); margin-bottom: .4rem; }
.review-body  { font-size: .92rem; line-height: 1.65; color: var(--gray-700); }

.review-img {
  margin-top: .75rem;
  max-width: 100%; max-height: 260px;
  border-radius: 10px; object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--gray-100);
  transition: opacity .15s;
}
.review-img:hover { opacity: .9; }

/* Delete button on own review */
.btn-delete-review {
  background: none; border: none; cursor: pointer;
  color: var(--gray-500); font-size: 1rem;
  padding: .2rem .4rem; border-radius: 6px;
  transition: background .15s, color .15s;
  line-height: 1;
}
.btn-delete-review:hover { background: #fee2e2; color: #dc2626; }

/* Upload wrap */
.upload-wrap { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ═══════════════════════════════════════════
   Safety Check-in
   ═══════════════════════════════════════════ */
.btn-safety {
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: .55rem 1.1rem;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
  transition: background .15s, transform .1s;
}
.btn-safety:hover  { background: #e86e2a; }
.btn-safety:active { transform: scale(.97); }

/* Active check-in badge on detail page */
.active-checkin-badge {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: .75rem;
  background: #fff8f0;
  border: 1.5px solid var(--orange);
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  margin: .5rem 0 1.5rem;
}

.btn-outline-danger {
  background: transparent;
  border: 1.5px solid #dc2626;
  color: #dc2626;
  border-radius: 8px;
  padding: .3rem .75rem;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-outline-danger:hover { background: #fee2e2; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fadeBg .2s;
}
@keyframes fadeBg { from { opacity:0 } to { opacity:1 } }

.modal-card {
  background: var(--white);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  width: 100%; max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0,0,0,.2);
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform:translateY(20px); opacity:0 } to { transform:translateY(0); opacity:1 } }

.modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.modal-title {
  font-size: 1.25rem; font-weight: 800;
  color: var(--green-dark);
}
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.2rem; color: var(--gray-500);
  border-radius: 6px; padding: .2rem .5rem;
  transition: background .15s;
}
.modal-close:hover { background: var(--gray-100); }

/* Active check-in alert on profile */
.active-checkin-alert {
  background: #fff8f0;
  border: 1.5px solid var(--orange);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.aci-header {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .75rem;
}
.aci-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--orange);
  animation: pulse 1.4s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1) }
  50%      { opacity:.5; transform:scale(1.4) }
}
.aci-item {
  background: var(--white);
  border-radius: 10px;
  padding: .85rem 1rem;
  margin-bottom: .6rem;
  border: 1px solid var(--gray-100);
}
.aci-place { font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.aci-place a { color: var(--green); }
.aci-province { font-weight: 400; color: var(--gray-500); font-size: .85rem; margin-left: .25rem; }
.aci-meta { font-size: .82rem; color: var(--gray-500); margin-bottom: .6rem; }

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

/* ═══════════════════════════════════════════
   User Reports
   ═══════════════════════════════════════════ */
.report-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .6rem;
  margin-bottom: 1rem;
}
.report-type-btn {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .65rem .5rem;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  font-family: inherit; font-size: .82rem; font-weight: 600;
  color: var(--gray-700);
  transition: all .18s;
  text-align: center;
}
.report-type-btn:hover { border-color: var(--green-light); background: #f0fdf4; }
.report-type-btn.selected {
  border-color: var(--green);
  background: #f0fdf4;
  color: var(--green-dark);
}
.report-type-btn .rt-icon { font-size: 1.4rem; }

.report-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: .85rem;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}
.report-card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: .75rem;
  margin-bottom: .45rem;
}
.report-card-title { font-weight: 700; font-size: .95rem; color: var(--gray-900); }
.report-card-meta { font-size: .78rem; color: var(--gray-500); margin-bottom: .4rem; }
.report-card-body { font-size: .9rem; line-height: 1.6; color: var(--gray-700); }
.report-type-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  font-size: .73rem; font-weight: 700;
  background: #eff6ff; color: #1d4ed8;
  flex-shrink: 0;
}
.report-type-badge.road     { background: #fef3c7; color: #92400e; }
.report-type-badge.weather  { background: #eff6ff; color: #1d4ed8; }
.report-type-badge.signal   { background: #f5f3ff; color: #6d28d9; }
.report-type-badge.facility { background: #ecfdf5; color: #065f46; }
.report-type-badge.safety   { background: #fff0f0; color: #991b1b; }
.report-type-badge.status   { background: #f0fdf4; color: #166534; }
.report-type-badge.other    { background: var(--gray-100); color: var(--gray-700); }

/* ── Photo Spots ────────────────────────────────────── */
.photo-spots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.photo-spot-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.spot-name {
  font-weight: 700;
  font-size: .97rem;
  color: var(--gray-900);
  margin-bottom: .35rem;
}
.spot-desc {
  font-size: .86rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: .5rem;
}
.spot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.spot-time, .spot-diff {
  font-size: .76rem;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 999px;
}
.spot-time { background: #eff6ff; color: #1d4ed8; }
.spot-diff { background: #fef3c7; color: #92400e; }
.spot-map-link {
  font-size: .78rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.spot-map-link:hover { text-decoration: underline; }

/* ── Review Tabs ─────────────────────────────────────── */
.review-tab-bar {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--gray-100);
  padding-bottom: .5rem;
}
.review-tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: .45rem .9rem;
  border-radius: 8px 8px 0 0;
  font-family: inherit;
  font-size: .93rem;
  font-weight: 600;
  color: var(--gray-500);
  transition: all .15s;
}
.review-tab-btn:hover { background: var(--gray-50); color: var(--gray-700); }
.review-tab-btn.active { background: var(--green-light); color: var(--green-dark); }
.review-tab-panel { display: none; }
.review-tab-panel.active { display: block; }

/* ── External Review Box ─────────────────────────────── */
.ext-review-box {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
}
.ext-review-box p { color: var(--gray-600); font-size: .9rem; margin-bottom: 1rem; }
.ext-review-links { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ── Place Social Link Buttons ───────────────────────── */
.place-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.place-link-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .85rem;
  border-radius: 8px;
  font-size: .87rem; font-weight: 600;
  text-decoration: none;
  transition: opacity .15s;
}
.place-link-btn:hover { opacity: .82; }
.place-link-website { background: #f8fafc; color: #1e293b; border: 1px solid #cbd5e1; }
.place-link-facebook { background: #1877f2; color: #fff; }
.place-link-google { background: #fff; color: #1a73e8; border: 1px solid #dadce0; }
.place-link-maps { background: #34a853; color: #fff; }

/* ── Park Fees ───────────────────────────────────── */
.park-fees-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: .5rem;
}
.park-fees-head {
  font-weight: 800;
  font-size: .95rem;
  color: #92400e;
  margin-bottom: .75rem;
}
.park-fees-body {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.fee-group { flex: 1; min-width: 180px; }
.fee-group-title {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #b45309;
  margin-bottom: .4rem;
  border-bottom: 1px solid #fde68a;
  padding-bottom: .2rem;
}
.fee-row {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin-bottom: .3rem;
  font-size: .88rem;
  flex-wrap: wrap;
}
.fee-label { color: var(--gray-700); flex: 1; min-width: 140px; }
.fee-price { color: #b45309; font-size: .95rem; }
.fee-free {
  background: #d1fae5;
  color: #065f46;
  font-size: .75rem;
  font-weight: 700;
  padding: .1rem .45rem;
  border-radius: 999px;
}
.fee-note { color: var(--gray-400); font-size: .8rem; }
