:root {
  color-scheme: light;
  --m-bg: #edf5f2;
  --m-surface: #ffffff;
  --m-surface-soft: #f5faf8;
  --m-surface-raised: #ffffff;
  --m-ink: #10201f;
  --m-muted: #647c78;
  --m-faint: #8da09d;
  --m-line: rgba(16, 32, 31, 0.12);
  --m-line-strong: rgba(16, 32, 31, 0.22);
  --m-green: #2b8b7e;
  --m-green-deep: #1f6c62;
  --m-green-soft: #dceee9;
  --m-coral: #e07b68;
  --m-coral-soft: #f7e2dd;
  --m-blue: #2f6f8f;
  --m-header: rgba(246, 251, 249, 0.92);
  --m-nav: rgba(255, 255, 255, 0.94);
  --m-map-filter: rgba(255, 255, 255, 0.94);
  --m-shadow: 0 16px 44px rgba(16, 32, 31, 0.14);
  --m-shadow-soft: 0 8px 24px rgba(16, 32, 31, 0.09);
  --m-radius: 16px;
  --m-radius-small: 11px;
  --m-topbar-height: 58px;
  --m-bottom-nav-height: 74px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --m-bg: #0d1b1a;
  --m-surface: #152826;
  --m-surface-soft: #192e2c;
  --m-surface-raised: #1d3331;
  --m-ink: #f2faf7;
  --m-muted: #a8bfba;
  --m-faint: #7f9a95;
  --m-line: rgba(242, 250, 247, 0.11);
  --m-line-strong: rgba(242, 250, 247, 0.2);
  --m-green: #35a497;
  --m-green-deep: #2b8b7e;
  --m-green-soft: rgba(43, 139, 126, 0.2);
  --m-coral: #ec8a76;
  --m-coral-soft: rgba(224, 123, 104, 0.16);
  --m-blue: #77adc9;
  --m-header: rgba(13, 27, 26, 0.9);
  --m-nav: rgba(21, 40, 38, 0.95);
  --m-map-filter: rgba(21, 40, 38, 0.96);
  --m-shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  --m-shadow-soft: 0 9px 28px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 280px;
  background: var(--m-bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 280px;
  min-height: 100dvh;
  margin: 0;
  color: var(--m-ink);
  background: var(--m-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.is-sheet-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

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

svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.m-main {
  min-height: calc(100dvh - var(--m-topbar-height));
  padding-bottom: calc(var(--m-bottom-nav-height) + env(safe-area-inset-bottom) + 16px);
}

.m-topbar {
  position: sticky;
  top: 0;
  z-index: 600;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  height: calc(var(--m-topbar-height) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  background: var(--m-header);
  border-bottom: 1px solid var(--m-line);
  backdrop-filter: blur(18px) saturate(150%);
}

.m-brand {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.m-topbar-context {
  min-width: 0;
  padding-left: 2px;
  color: var(--m-muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
}

.m-topbar-context span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--m-ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.m-icon-button:active {
  background: var(--m-green-soft);
}

.m-bottom-nav {
  position: fixed;
  z-index: 650;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  height: calc(var(--m-bottom-nav-height) + env(safe-area-inset-bottom));
  padding: 7px max(16px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(16px, env(safe-area-inset-right));
  background: var(--m-nav);
  border-top: 1px solid var(--m-line);
  box-shadow: 0 -12px 36px rgba(8, 22, 20, 0.08);
  backdrop-filter: blur(20px) saturate(150%);
}

.m-bottom-nav > a {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-height: 55px;
  color: var(--m-faint);
  font-size: 10px;
  font-weight: 760;
}

.m-bottom-nav > a svg {
  width: 22px;
  height: 22px;
}

.m-bottom-nav > a.active {
  color: var(--m-green);
}

.m-bottom-nav .m-nav-create {
  align-self: start;
  margin-top: -27px;
  color: var(--m-ink);
}

.m-nav-create > span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fff;
  background: var(--m-green);
  border: 5px solid var(--m-surface);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(43, 139, 126, 0.34);
}

.m-nav-create > span svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.7;
}

.m-nav-create b {
  font-size: 10px;
  line-height: 1;
}

.m-sheet-backdrop {
  position: fixed;
  z-index: 890;
  inset: 0;
  background: rgba(4, 13, 12, 0.58);
  opacity: 0;
  transition: opacity 180ms ease;
  backdrop-filter: blur(2px);
}

.m-sheet-backdrop.is-visible {
  opacity: 1;
}

.m-account-sheet {
  position: fixed;
  z-index: 900;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(86dvh, 760px);
  padding: 9px 18px calc(22px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--m-surface);
  border: 1px solid var(--m-line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.28);
  transform: translateY(104%);
  transition: transform 220ms cubic-bezier(.22, .8, .3, 1);
}

.m-account-sheet.is-visible{
  transform: translateY(0);
}

.m-sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 12px;
  background: var(--m-line-strong);
  border-radius: 99px;
}

.m-account-sheet > header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0 16px;
  border-bottom: 1px solid var(--m-line);
}

.m-account-sheet > header div{
  display: grid;
  gap: 2px;
}

.m-account-sheet > header small{
  color: var(--m-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.m-account-sheet > header strong {
  font-size: 22px;
  letter-spacing: -.03em;
}

.m-sheet-profile-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 4px;
  padding: 12px;
  background: var(--m-green-soft);
  border-radius: var(--m-radius-small);
  font-size: 12px;
}

.m-sheet-profile-action form {
  margin: 0;
}

.m-sheet-links {
  display: grid;
  margin: 10px 0;
}

.m-sheet-links > a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  min-height: 68px;
  border-bottom: 1px solid var(--m-line);
}

.m-sheet-links > a > svg:first-child {
  color: var(--m-green);
}

.m-sheet-links > a > svg:last-child {
  width: 16px;
  color: var(--m-faint);
}

.m-sheet-links span {
  display: grid;
  gap: 2px;
}

.m-sheet-links b {
  font-size: 14px;
}

.m-sheet-links small {
  color: var(--m-muted);
  font-size: 11px;
}

.m-sheet-logout {
  margin: 18px 0 0;
}

.m-sheet-logout button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  color: var(--m-coral);
  background: var(--m-coral-soft);
  border: 0;
  border-radius: var(--m-radius-small);
  font-weight: 780;
}

.m-messages {
  position: fixed;
  z-index: 850;
  top: calc(var(--m-topbar-height) + env(safe-area-inset-top) + 10px);
  right: 12px;
  left: 12px;
  display: grid;
  gap: 7px;
  pointer-events: none;
}

.m-message {
  margin: 0;
  padding: 11px 13px;
  color: var(--m-ink);
  background: var(--m-surface-raised);
  border: 1px solid var(--m-line-strong);
  border-left: 4px solid var(--m-green);
  border-radius: 10px;
  box-shadow: var(--m-shadow-soft);
  font-size: 12px;
  font-weight: 700;
}

.m-message.error {
  border-left-color: var(--m-coral);
}

.m-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: var(--m-radius-small);
  font-weight: 780;
  line-height: 1.1;
}

.m-button-primary {
  color: #fff;
  background: var(--m-green);
  border-color: var(--m-green);
  box-shadow: 0 8px 20px rgba(43, 139, 126, 0.18);
}

.m-button-soft {
  color: var(--m-ink);
  background: var(--m-surface-soft);
  border-color: var(--m-line);
}

.m-button-danger {
  color: #fff;
  background: var(--m-coral);
  border-color: var(--m-coral);
}

.m-button-full {
  width: 100%;
}

/* Mobile landing */

/* Vertical timeline */

.m-timeline-intro p,
.m-step-intro p,
.m-page-intro p,
.m-trip-summary > p,
.m-trip-story > p,
.m-trip-gallery > header p,
.m-trip-activities > header p {
  margin: 0 0 4px;
  color: var(--m-green);
  font-size: 10px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.m-vertical-timeline {
  position: relative;
  display: grid;
  gap: 24px;
  margin: 10px 0 0;
  padding: 10px 16px 20px 0;
  list-style: none;
}

.m-vertical-timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 31px;
  width: 1px;
  content: "";
  background: linear-gradient(180deg, var(--m-coral), var(--m-green) 12%, color-mix(in srgb, var(--m-green) 46%, transparent) 88%, transparent);
}

/* Full-screen mobile map */

.m-map-body {
  overflow: hidden;
}

.m-map-body .m-main {
  height: calc(100dvh - var(--m-topbar-height) - env(safe-area-inset-top));
  min-height: 0;
  padding: 0;
}

.m-map-page,
#mobile-travel-map {
  position: relative;
  width: 100%;
  height: 100%;
}

#mobile-travel-map {
  z-index: 1;
  background: #d8e7e5;
}

/* Mobile trip detail */

#mobile-trip-detail-map {
  width: 100%;
  height: 100%;
}

/* Auth and simple forms */

.m-auth-page,
.m-simple-page {
  width: min(100% - 28px, 520px);
  margin: 0 auto;
  padding: 32px 0;
}

.m-auth-page > header,
.m-page-intro {
  margin-bottom: 24px;
}

.m-auth-page > header h1,
.m-page-intro h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(35px, 11vw, 48px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.05em;
}

.m-auth-page > header span,
.m-page-intro > span {
  display: block;
  max-width: 360px;
  margin-top: 10px;
  color: var(--m-muted);
  font-size: 12px;
}

.m-social-auth {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.m-social-auth form,
.m-account-connection form {
  margin: 0;
}

.m-social-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--m-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.m-social-auth-divider::before,
.m-social-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--m-line);
}

.m-google-auth-button {
  color: #1f1f1f;
  background: #fff;
  border-color: #747775;
  box-shadow: none;
}

.m-google-auth-button:active {
  background: #f8f9fa;
}

.google-mark {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.m-form-card {
  display: grid;
  gap: 17px;
  padding: 18px;
  background: var(--m-surface);
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  box-shadow: var(--m-shadow-soft);
}

.m-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.m-field > span,
.m-fieldset > legend {
  color: var(--m-ink);
  font-size: 10px;
  font-weight: 790;
  letter-spacing: .02em;
}

.m-field > span small {
  color: var(--m-faint);
  font-size: 9px;
  font-weight: 600;
}

.m-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.m-field textarea,
.m-field select,
.m-inline-add input,
.m-activity-editor input {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  color: var(--m-ink);
  background: var(--m-surface-soft);
  border: 1px solid var(--m-line-strong);
  border-radius: 10px;
  outline: 0;
  font-size: 14px;
}

.m-field textarea {
  min-height: 110px;
  resize: vertical;
}

.m-field input:focus,
.m-field textarea:focus,
.m-field select:focus,
.m-inline-add input:focus,
.m-activity-editor input:focus {
  border-color: var(--m-green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--m-green) 16%, transparent);
}

.m-field > small,
.m-field .helptext,
.m-fieldset > p {
  margin: 0;
  color: var(--m-muted);
  font-size: 9px;
  line-height: 1.45;
}

.m-field ul,
.m-wizard-errors ul,
.m-form-card > ul.errorlist,
.m-photo-uploader > ul {
  margin: 0;
  padding: 8px 10px;
  color: var(--m-coral);
  background: var(--m-coral-soft);
  border-radius: 8px;
  font-size: 9px;
  list-style: none;
}

.m-account-connection {
  margin-top: 16px;
}

.m-account-connection > div > p {
  margin: 0 0 4px;
  color: var(--m-green);
  font-size: 9px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.m-account-connection h2 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 500;
}

.m-account-connection > div > span {
  display: block;
  color: var(--m-muted);
  font-size: 11px;
  line-height: 1.5;
}

.m-connection-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--m-green);
  font-size: 12px;
  font-weight: 800;
}

.m-connection-status svg {
  width: 17px;
  height: 17px;
}

.m-form-preview {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--m-radius-small);
}

.m-confirm-page {
  display: grid;
  justify-items: center;
  width: min(100% - 32px, 430px);
  margin: 0 auto;
  padding: 54px 0 30px;
  text-align: center;
}

.m-confirm-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  color: var(--m-coral);
  background: var(--m-coral-soft);
  border-radius: 50%;
}

.m-confirm-icon svg {
  width: 27px;
  height: 27px;
}

.m-confirm-page > p {
  margin: 0 0 4px;
  color: var(--m-coral);
  font-size: 9px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.m-confirm-page h1 {
  margin: 0;
  font-size: 31px;
  line-height: 1;
  letter-spacing: -.05em;
}

.m-confirm-page > span {
  margin-top: 9px;
  color: var(--m-muted);
  font-size: 12px;
}

.m-confirm-page form {
  display: grid;
  gap: 9px;
  width: 100%;
  margin-top: 28px;
  padding: 18px;
  background: var(--m-surface);
  border: 1px solid var(--m-line);
  border-radius: var(--m-radius);
  box-shadow: var(--m-shadow-soft);
}

.m-confirm-page form p {
  margin: 0 0 10px;
  color: var(--m-muted);
  font-size: 11px;
}

/* Mobile create/edit wizard */

/* Leaflet refinements for touch */

.leaflet-control-zoom a {
  color: #16322f !important;
}

.leaflet-control-attribution {
  font-size: 7px !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
}

@media (min-width: 600px) {
  .m-vertical-timeline {
    width: min(100%, 720px);
    margin-right: auto;
    margin-left: auto;
  }

  

  

  

  

  

  
}

@media (max-height: 650px) {
  

  

  

  
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
