:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --text: #2f2a26;
  --muted: #6f665f;
  --primary: #7d8f76;
  --primary-soft: #eef2ea;
  --gold: #b48a5a;
  --nav: #4a4038;
  --border: #e7ded2;
  --container: 1180px;
  --itinerary-container: 1280px;
  --gutter: 20px;
}

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

html {
  margin: 0;
  min-width: 320px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
}

html[lang="zh-CN"] body {
  font-family: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Heiti SC", sans-serif;
}

html[lang="zh-CN"] .brand span {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: 1.48rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

html[lang="zh-CN"] .main-nav {
  gap: clamp(18px, 2.4vw, 34px);
}

html[lang="zh-CN"] .main-nav a {
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1;
}

html[lang="zh-CN"] .about-page {
  letter-spacing: 0;
}

html[lang="zh-CN"] .about-fleet-visual figcaption strong {
  font-weight: 760;
  line-height: 1.22;
}

html[lang="zh-CN"] .about-fleet-visual figcaption > span,
html[lang="zh-CN"] .about-intro-copy p,
html[lang="zh-CN"] .about-advantage-card p,
html[lang="zh-CN"] .about-planner-content p {
  font-weight: 500;
  line-height: 1.78;
}

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

img {
  max-width: 100%;
}

button,
.button,
.button-outline,
.button-primary,
.button-secondary {
  font: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.site-header {
  position: sticky;
  top: 0;
  background: var(--nav);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 28px;
  z-index: 10;
  box-shadow: 0 14px 36px rgba(74, 64, 56, 0.2);
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.25vw, 22px);
  flex-wrap: nowrap;
  width: min(1320px, calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

.topbar-left {
  flex: 0 1 auto;
  min-width: 0;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.9vw, 14px);
  color: rgba(255, 255, 255, 0.86);
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.topbar-right .lang-switch,
.topbar-right > .button-outline {
  flex: 0 0 auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: max-content;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.92rem;
  font-weight: 750;
}

.lang-switch button {
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font: inherit;
  cursor: pointer;
}

.lang-switch button:hover,
.lang-switch button.active {
  color: #f2d6b0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: clamp(210px, 24vw, 360px);
  white-space: nowrap;
  font-size: 1.55rem;
  font-weight: 800;
  color: #fbf8f3;
}

.brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.main-nav {
  display: flex;
  flex: 1 1 540px;
  justify-content: center;
  gap: clamp(12px, 1.55vw, 26px);
  flex-wrap: nowrap;
  margin: 0 0 0 clamp(16px, 2vw, 34px);
  min-width: 0;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #f2d6b0;
}

.plan-trip-menu {
  position: relative;
  flex: 0 0 auto;
}

.plan-trip-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  list-style: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.plan-trip-menu > summary::-webkit-details-marker {
  display: none;
}

.plan-trip-menu > summary::marker,
.user-chip::marker {
  content: "";
}

.plan-trip-menu > summary::after {
  content: "▾";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: #e6c990;
  font-size: 0.78em;
  line-height: 1;
  transition: transform 0.2s ease;
}

.plan-trip-menu[open] > summary,
.plan-trip-menu > summary:hover {
  color: #f2d6b0;
}

.plan-trip-menu[open] > summary::after {
  transform: rotate(180deg);
}

.plan-trip-menu-list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 13px);
  left: 50%;
  display: none;
  width: max-content;
  min-width: 178px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #4a4038;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
  transform: translateX(-50%);
}

.plan-trip-menu[open] .plan-trip-menu-list {
  display: grid;
  gap: 2px;
}

.plan-trip-menu-list a {
  padding: 9px 10px;
  border-radius: 8px;
}

.plan-trip-menu-list a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.site-header .button-outline {
  min-width: 86px;
  min-height: 42px;
  justify-content: center;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
}

.site-header .button-outline:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.56);
}

.site-main {
  width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
  padding: 20px 0 42px;
}

/* Public pages share the standard content container. The itinerary opts into
   the only wider desktop container through an explicit main-element class. */
@media (min-width: 901px) {
  .site-main.site-main-itinerary {
    width: min(var(--itinerary-container), calc(100% - (var(--gutter) * 2)));
  }
}

.message-list {
  display: grid;
  gap: 10px;
  width: min(100%, 760px);
  margin: 0 auto 18px;
}

.site-message {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(125, 143, 118, 0.28);
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 750;
  text-align: center;
  box-shadow: 0 10px 26px rgba(74, 64, 56, 0.07);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.site-message.is-dismissing {
  opacity: 0;
  transform: translateY(-6px);
}

.site-message.error {
  border-color: rgba(154, 79, 53, 0.28);
  background: #fff7ed;
}

.message-close {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.message-close:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.hero-row {
  padding-bottom: 26px;
}

.hero-copy {
  max-width: 780px;
  margin-bottom: 16px;
}

.hero-copy .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--primary);
  margin: 0 0 14px;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  font-weight: 680;
  line-height: 1.16;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--text), var(--nav) 48%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  overflow: visible;
  overflow-wrap: normal;
  padding: 0.06em 0 0.12em;
}

.hero-copy p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 12px 0 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 16px auto 0;
  position: relative;
  z-index: 3;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  height: clamp(500px, 54vw, 580px);
  width: 100%;
  box-shadow: 0 32px 80px rgba(23, 36, 51, 0.16);
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.75s ease;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-actions .button {
  width: 210px;
  min-height: 52px;
  white-space: nowrap;
  box-shadow: 0 16px 36px rgba(74, 64, 56, 0.16);
}

.hero-actions .button-primary {
  background: var(--primary);
  color: #ffffff;
}

.hero-actions .button-secondary {
  background: #ffffff;
  color: var(--primary);
  border-color: rgba(180, 138, 90, 0.45);
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(74, 64, 56, 0.18);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.carousel-control:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.04);
}

.carousel-prev {
  left: 22px;
}

.carousel-next {
  right: 22px;
}

.carousel-dots {
  position: absolute;
  left: 28px;
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.carousel-dot {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  box-shadow: 0 1px 8px rgba(74, 64, 56, 0.2);
  transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dot.active {
  background: #ffffff;
  transform: scaleX(1.12);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 26px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px 28px;
  color: var(--text);
  box-shadow: 0 18px 45px rgba(74, 64, 56, 0.08);
  display: grid;
  gap: 14px;
  transform: translateY(0);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(180, 138, 90, 0.42);
  box-shadow: 0 26px 60px rgba(74, 64, 56, 0.14);
  transform: translateY(-4px);
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.feature-copy {
  color: var(--muted);
  line-height: 1.55;
}

.popular-routes,
.how-it-works,
.page-placeholder {
  background: var(--surface);
  border-radius: 32px;
  padding: 36px;
  box-shadow: 0 24px 60px rgba(74, 64, 56, 0.06);
  margin-bottom: 32px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.tab-list {
  display: flex;
  gap: 12px;
}

.tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f6efe6;
  padding: 10px 20px;
  color: var(--text);
}

.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

.route-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.route-card {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 14px;
  padding: 24px;
  border-radius: 28px;
  background: #fffaf3;
  border: 1px solid rgba(180, 138, 90, 0.2);
  min-height: 390px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.route-card:hover {
  border-color: rgba(180, 138, 90, 0.38);
  box-shadow: 0 20px 44px rgba(74, 64, 56, 0.12);
  transform: translateY(-3px);
}

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

.route-card-image {
  min-height: 180px;
  border-radius: 22px;
  background: linear-gradient(135deg, #f2eadf, #d9c2a5);
  overflow: hidden;
}

.route-card-image img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
}

.route-card h3 {
  margin: 0;
  line-height: 1.25;
}

.route-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.route-duration {
  color: var(--primary);
  font-weight: 750;
  line-height: 1.35;
}

.route-line {
  font-size: 0.92rem;
  font-weight: 700;
}

.route-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

.route-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(125, 143, 118, 0.22);
  border-radius: 999px;
  background: rgba(125, 143, 118, 0.08);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.popular-routes-page {
  width: 100%;
  max-width: none;
  margin: 36px auto 0;
}

.popular-routes-list {
  margin-top: 10px;
}

.popular-routes-list .route-card {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  text-align: center;
  justify-items: center;
}

.popular-routes-list .route-card h3,
.popular-routes-list .route-card p {
  max-width: 100%;
}

.popular-routes-list .route-line {
  max-width: 36rem;
  overflow-wrap: anywhere;
  word-break: normal;
}

.route-card-action {
  width: fit-content;
  min-height: 42px;
  padding: 10px 18px;
  align-self: end;
  border-color: rgba(125, 143, 118, 0.32);
  color: var(--primary);
  background: rgba(125, 143, 118, 0.08);
}

.popular-routes-list .route-card-action {
  justify-self: center;
}

.destinations-page {
  width: 100%;
  max-width: none;
}

.destinations-hero {
  position: relative;
  min-height: clamp(380px, 48vw, 540px);
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(74, 64, 56, 0.16);
  isolation: isolate;
}

.destinations-hero img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  object-position: center;
}

.destinations-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(47, 42, 38, 0.76), rgba(47, 42, 38, 0.34) 58%, rgba(47, 42, 38, 0.06));
}

.destinations-hero-content {
  position: absolute;
  left: clamp(24px, 5vw, 58px);
  bottom: clamp(24px, 5vw, 58px);
  z-index: 2;
  width: min(650px, calc(100% - 48px));
  color: #ffffff;
}

.destinations-hero-content .summary-kicker {
  color: #f4dbc0;
}

.destinations-hero-content h1 {
  margin: 10px 0 12px;
  font-size: clamp(2.35rem, 5.8vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.destinations-hero-content p {
  margin: 0;
  max-width: 590px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.65;
}

.destinations-panel {
  display: grid;
  gap: 24px;
}

.destinations-header h2 {
  margin: 6px 0 0;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  line-height: 1.2;
}

.destination-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.destination-card {
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
  min-height: 390px;
  padding: 24px;
  border: 1px solid rgba(180, 138, 90, 0.2);
  border-radius: 28px;
  background: #fffaf3;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.destination-card:hover,
.destination-card.is-expanded {
  border-color: rgba(180, 138, 90, 0.4);
  box-shadow: 0 24px 52px rgba(74, 64, 56, 0.13);
}

.destination-card:hover {
  transform: translateY(-3px);
}

.destination-card.is-expanded {
  transform: none;
}

.destination-card[hidden],
.destination-empty[hidden] {
  display: none;
}

.destination-card-toggle {
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.destination-card-toggle:focus-visible {
  outline: 3px solid rgba(125, 143, 118, 0.36);
  outline-offset: 6px;
  border-radius: 24px;
}

.destination-card-image {
  min-height: 180px;
  min-width: 0;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #f2eadf, #d9c2a5);
}

.destination-card-image img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
}

.destination-card-body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 14px;
  padding: 0;
  justify-items: center;
  text-align: center;
}

.destination-highlights {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: center;
  text-align: center;
}

.destination-section-label,
.destination-detail-block span,
.destination-detail-row span {
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.destination-card-title {
  display: grid;
  gap: 5px;
  justify-items: center;
  text-align: center;
}

.destination-card-title span {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.destination-card-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.22;
}

.destination-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.destination-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  align-content: start;
}

.destination-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(125, 143, 118, 0.2);
  border-radius: 999px;
  background: rgba(125, 143, 118, 0.09);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
}

.destination-card-action {
  align-self: end;
  justify-self: center;
  width: fit-content;
  margin-top: auto;
}

.destination-detail-source {
  display: none;
}

.destination-row-detail {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(180, 138, 90, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(125, 143, 118, 0.08), rgba(180, 138, 90, 0.08)),
    #fffaf3;
  box-shadow: 0 24px 52px rgba(74, 64, 56, 0.11);
  text-align: left;
  justify-items: stretch;
}

.destination-row-detail[hidden] {
  display: none;
}

.destination-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(125, 143, 118, 0.08);
}

.destination-detail-row strong {
  color: var(--text);
  font-size: 0.98rem;
}

.destination-detail-block {
  display: grid;
  gap: 7px;
}

.destination-detail-block p,
.destination-detail-block ul {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.destination-detail-block ul {
  display: grid;
  gap: 12px;
  padding-left: 18px;
}

.destination-detail-block li {
  color: var(--muted);
}

.destination-detail-block li strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
}

.destination-detail-block li p {
  margin: 0;
}

.destination-attraction-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 8px;
}

.destination-attraction-price {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.25;
}

.destination-attraction-free {
  background: rgba(125, 143, 118, 0.14);
  color: #59664f;
  letter-spacing: 0.08em;
}

.destination-official-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(180, 138, 90, 0.28);
  border-radius: 999px;
  background: #fffaf3;
  color: var(--nav);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(74, 64, 56, 0.08);
}

.destination-official-link:hover {
  border-color: rgba(180, 138, 90, 0.46);
  background: #ffffff;
  color: var(--primary);
}

.destination-detail-block li::marker {
  color: var(--primary);
}

.destination-add-button {
  width: fit-content;
}

.destination-empty {
  grid-column: 1 / -1;
  min-height: 240px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 34px;
  border: 1px dashed rgba(180, 138, 90, 0.46);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(125, 143, 118, 0.1), rgba(180, 138, 90, 0.12)),
    #fffaf3;
  text-align: center;
}

.destination-empty h3 {
  margin: 0;
  font-size: 1.35rem;
}

.destination-empty p {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
}

.how-it-works .eyebrow {
  margin-bottom: 12px;
}

.how-it-works h2 {
  margin: 0 0 28px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.step-card {
  border: 1px solid rgba(180, 138, 90, 0.24);
  border-radius: 24px;
  padding: 28px;
  background: linear-gradient(180deg, #fffaf3 0%, #f7efe5 100%);
  box-shadow: 0 16px 36px rgba(74, 64, 56, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
  border-color: rgba(180, 138, 90, 0.38);
  box-shadow: 0 22px 46px rgba(74, 64, 56, 0.12);
  transform: translateY(-3px);
}

.step-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 16px;
}

.step-card h3 {
  margin: 0 0 10px;
}

.step-card p {
  color: var(--muted);
  line-height: 1.75;
}

.page-placeholder {
  text-align: center;
}

.page-placeholder h1 {
  font-size: 2.5rem;
  line-height: 1.16;
  margin-bottom: 16px;
  overflow: visible;
  padding: 0.06em 0 0.12em;
}

.page-placeholder p {
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto 26px;
  line-height: 1.8;
}

.placeholder-actions {
  display: flex;
  justify-content: center;
}

.about-page {
  display: grid;
  gap: clamp(34px, 5vw, 58px);
  width: 100%;
  margin: 34px auto 0;
  color: #342820;
}

.about-section {
  display: grid;
  gap: 24px;
}

.about-introduction,
.about-planner-feature,
.about-contact-section {
  padding: clamp(30px, 4vw, 46px);
  border: 1px solid rgba(113, 94, 78, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 252, 246, 0.96), rgba(241, 234, 223, 0.86)),
    #fff8ed;
  box-shadow: 0 24px 58px rgba(52, 40, 32, 0.1);
}

.about-introduction {
  grid-template-columns: minmax(280px, 0.46fr) minmax(0, 0.72fr);
  align-items: start;
  gap: clamp(24px, 4vw, 46px);
  border-top: 4px solid rgba(125, 143, 118, 0.34);
}

.about-section-heading {
  display: grid;
  gap: 12px;
  max-width: 920px;
}

.about-section-heading h1,
.about-section-heading h2,
.about-advantage-card h3,
.about-social-card h3 {
  margin: 0;
  color: #342820;
  line-height: 1.18;
  letter-spacing: 0;
}

.about-section-heading h1 {
  max-width: 860px;
  font-size: clamp(2.15rem, 3.25vw, 3rem);
  line-height: 1.12;
}

.about-section-heading h2 {
  max-width: 920px;
  font-size: clamp(1.65rem, 2.5vw, 2.25rem);
}

.about-section-heading p,
.about-intro-copy p,
.about-advantage-card p,
.about-planner-content p {
  margin: 0;
  color: #6f665d;
  line-height: 1.72;
}

.about-intro-copy {
  display: grid;
  gap: 12px;
  max-width: 900px;
  padding-top: 3px;
  padding-left: clamp(22px, 3vw, 34px);
  border-left: 1px solid rgba(125, 143, 118, 0.24);
}

.about-fleet-section {
  gap: 18px;
}

.about-fleet-heading {
  display: grid;
  gap: 8px;
}

.about-fleet-heading h2 {
  margin: 0;
  color: #342820;
  font-size: clamp(1.75rem, 2.7vw, 2.4rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.about-fleet-visual {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(113, 94, 78, 0.16);
  background: #efe5d6;
  box-shadow: 0 30px 78px rgba(52, 40, 32, 0.18);
}

.about-fleet-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(52, 40, 32, 0.72), rgba(52, 40, 32, 0.22) 46%, rgba(52, 40, 32, 0.03)),
    linear-gradient(180deg, rgba(52, 40, 32, 0.08), rgba(52, 40, 32, 0.26));
  pointer-events: none;
}

.about-fleet-visual img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  object-position: center;
}

.about-fleet-visual figcaption {
  position: absolute;
  left: clamp(22px, 4vw, 44px);
  bottom: clamp(22px, 4vw, 44px);
  z-index: 1;
  display: grid;
  gap: 12px;
  max-width: 560px;
  color: #fffaf3;
}

.about-fleet-visual figcaption strong {
  font-size: clamp(1.55rem, 3vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.about-fleet-visual figcaption > span {
  max-width: 520px;
  color: rgba(255, 250, 243, 0.86);
  line-height: 1.6;
}

.about-fleet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.about-fleet-chips span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 250, 243, 0.28);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.14);
  color: #fffaf3;
  font-size: 0.86rem;
  font-weight: 850;
}

.about-why-section {
  gap: 20px;
}

.about-advantages {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 22px;
}

.about-advantage-card {
  display: grid;
  gap: 15px;
  align-content: start;
  grid-template-rows: auto auto 1fr;
  min-height: 272px;
  padding: 30px;
  border: 1px solid rgba(113, 94, 78, 0.2);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(239, 232, 220, 0.94)),
    #fff8ed;
  box-shadow: 0 22px 52px rgba(52, 40, 32, 0.11);
}

.about-card-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(125, 143, 118, 0.2), rgba(180, 138, 90, 0.14)),
    #f8f2e9;
  color: #59664f;
  font-size: 0.95rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(125, 143, 118, 0.16);
}

.about-advantage-card h3 {
  font-size: clamp(1.18rem, 1.8vw, 1.45rem);
  min-height: 3.1em;
}

.about-planner-feature {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  border-color: rgba(125, 143, 118, 0.28);
  background:
    linear-gradient(135deg, rgba(125, 143, 118, 0.16), rgba(180, 138, 90, 0.11)),
    #f7efe3;
}

.about-planner-content {
  display: grid;
  gap: 12px;
  max-width: 860px;
}

.about-planner-feature .button {
  justify-self: end;
}

.about-contact-card {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(113, 94, 78, 0.17);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(239, 232, 220, 0.88)),
    #fff8ed;
  box-shadow: 0 22px 56px rgba(52, 40, 32, 0.09);
}

.about-contact-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.about-contact-details div,
.about-social-card {
  border: 1px solid rgba(113, 94, 78, 0.14);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 14px 34px rgba(52, 40, 32, 0.06);
}

.about-contact-details div {
  display: grid;
  gap: 7px;
  padding: 16px 18px;
}

.about-contact-details span {
  color: #59664f;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-contact-details strong {
  color: #342820;
  font-size: 1.02rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.about-social-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.about-social-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 18px;
  text-align: center;
}

.about-social-card h3 {
  font-size: 1.08rem;
}

.about-social-card img {
  width: min(100%, 184px);
  aspect-ratio: 1;
  display: block;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(113, 94, 78, 0.12);
  box-shadow: 0 18px 42px rgba(52, 40, 32, 0.14);
}

.about-contact-section > .button {
  justify-self: start;
}

.trip-page {
  display: grid;
  gap: 24px;
}

.trip-heading {
  max-width: 760px;
}

.trip-heading .eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.trip-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.16;
  overflow: visible;
  padding: 0.06em 0 0.12em;
}

.trip-heading p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.travel-form {
  display: grid;
  gap: 22px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 22px 56px rgba(74, 64, 56, 0.08);
}

.form-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.form-step {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
}

.form-card-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.15;
}

.form-card-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-wide {
  grid-column: 1 / -1;
}

.field-group {
  display: grid;
  gap: 8px;
  text-align: left;
}

.field-group label {
  color: var(--text);
  font-weight: 800;
  font-size: 0.92rem;
}

.field-group label span,
.field-group small {
  color: var(--muted);
  font-weight: 600;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffdf9;
  color: var(--text);
  padding: 13px 16px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(125, 143, 118, 0.16);
}

.field-group textarea {
  min-height: 130px;
  resize: vertical;
}

.field-group .errorlist {
  margin: 0;
  padding: 0;
  color: #9a4f35;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.field-help {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.password-live-feedback {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.password-live-feedback.is-valid {
  color: #237447;
}

.password-live-feedback.is-invalid {
  color: #9a4f35;
}

.auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, color 0.2s ease;
}

.password-toggle:hover,
.password-toggle.is-visible {
  background: var(--primary-soft);
  color: var(--primary);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.checkbox-group > div,
.checkbox-group ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checkbox-group li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffdf9;
  color: var(--text);
  font-weight: 700;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.form-actions .button {
  min-width: 190px;
}

.form-alert {
  border: 1px solid rgba(154, 79, 53, 0.28);
  border-radius: 18px;
  background: #fff4ed;
  color: #783b27;
  padding: 16px 18px;
  text-align: left;
}

.form-alert pre {
  margin: 10px 0 0;
  overflow-x: auto;
  white-space: pre-wrap;
}

.quick-generate-page {
  gap: 16px;
  max-width: 760px;
  margin: 36px auto 0;
}

.quick-heading {
  max-width: 540px;
  text-align: center;
  margin: 0 auto;
}

.quick-heading h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  font-weight: 680;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--text), var(--nav) 48%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.quick-heading p {
  margin-top: 8px;
  font-size: 0.98rem;
}

.quick-card {
  padding: 24px 26px;
  border-radius: 22px;
  box-shadow: 0 16px 42px rgba(74, 64, 56, 0.08);
}

.quick-input-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.quick-region {
  gap: 12px;
}

.quick-region-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.quick-option {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  position: relative;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffdf9;
  color: var(--text);
  font-size: 0.95rem;
  box-shadow: 0 8px 20px rgba(74, 64, 56, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.quick-option:hover {
  border-color: rgba(180, 138, 90, 0.48);
  box-shadow: 0 16px 34px rgba(74, 64, 56, 0.1);
  transform: translateY(-2px);
}

.quick-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 10px;
  height: 10px;
  min-height: 0;
}

.quick-radio-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 1px solid rgba(74, 64, 56, 0.42);
  border-radius: 50%;
  background: #ffffff;
}

.quick-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text);
  box-shadow: 0 14px 30px rgba(74, 64, 56, 0.09);
}

.quick-option:has(input:checked) .quick-radio-dot {
  border-color: var(--primary);
  background: radial-gradient(circle, var(--primary) 45%, #ffffff 48%);
}

.quick-duration {
  display: grid;
  grid-template-columns: minmax(130px, 0.3fr) minmax(280px, 320px);
  gap: 14px;
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.quick-duration label,
.quick-duration small,
.quick-duration .errorlist {
  grid-column: 1;
}

.quick-duration select {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.quick-duration select {
  width: 100%;
  max-width: 320px;
  min-height: 52px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  background: #fffdf9;
}

.quick-actions {
  justify-content: center;
}

.plan-trip-page {
  width: 100%;
  max-width: none;
  margin: 36px auto 0;
  gap: 18px;
}

.plan-heading {
  max-width: 860px;
}

.plan-heading h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  font-weight: 680;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, var(--text), var(--nav) 48%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan-heading p {
  white-space: nowrap;
  font-size: 0.98rem;
}

.plan-trip-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  gap: 20px;
  align-items: start;
}

.plan-trip-workspace > .plan-form {
  grid-column: 1;
  min-width: 0;
}

.plan-trip-workspace > .ai-trip-planner {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.plan-trip-workspace .plan-card,
.plan-trip-workspace input,
.plan-trip-workspace select,
.plan-trip-workspace textarea {
  max-width: 100%;
}

.ai-trip-planner {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(145deg, #fffdf8, #f5eee3);
  box-shadow: 0 16px 38px rgba(74, 64, 56, 0.09);
}

.ai-trip-planner-kicker {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-trip-planner h2 {
  margin: 0;
  color: var(--nav);
  font-size: 1.35rem;
}

.ai-trip-planner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.ai-trip-conversation {
  display: grid;
  gap: 9px;
  max-height: 310px;
  padding: 4px 2px;
  overflow-y: auto;
}

.ai-trip-message {
  width: fit-content;
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.84rem;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.ai-trip-message-assistant {
  justify-self: start;
  border: 1px solid rgba(126, 139, 111, 0.28);
  border-bottom-left-radius: 4px;
  background: rgba(238, 243, 234, 0.84);
  color: var(--text);
}

.ai-trip-message-user {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: #6f7e64 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(47, 39, 33, 0.14);
}

.ai-trip-message-user * {
  color: #ffffff !important;
}

.ai-trip-message-loading {
  color: var(--muted);
}

.ai-trip-contact-link {
  display: inline-flex;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.ai-trip-contact-link:hover,
.ai-trip-contact-link:focus-visible {
  background: var(--olive);
}

.ai-trip-planner textarea {
  width: 100%;
  min-height: 124px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.9);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  padding: 12px 13px;
}

.ai-trip-planner textarea:focus {
  outline: 2px solid rgba(159, 119, 20, 0.28);
  outline-offset: 1px;
}

.ai-trip-prompts {
  display: grid;
  gap: 7px;
}

.ai-trip-prompt {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ai-trip-prompt:hover,
.ai-trip-prompt:focus-visible {
  border-color: var(--olive);
  background: #fffdf9;
}

.ai-trip-plan-button {
  width: 100%;
  min-height: 46px;
}

.ai-trip-planner-status {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.ai-trip-planner-status.is-error {
  color: #9b3b2e;
}

.ai-trip-planner-status.is-loading::before {
  content: "";
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  margin-right: 0.4rem;
  border: 2px solid rgba(111, 126, 100, 0.3);
  border-top-color: var(--olive);
  border-radius: 50%;
  vertical-align: -0.08rem;
  animation: ai-trip-spin 0.8s linear infinite;
}

.ai-trip-planner-result {
  padding: 11px 12px;
  border: 1px solid rgba(126, 139, 111, 0.35);
  border-radius: 12px;
  background: rgba(238, 243, 234, 0.72);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.ai-trip-page {
  width: min(100%, 820px);
  margin: 36px auto 0;
}

.ai-trip-heading {
  max-width: 760px;
}

.ai-trip-heading p {
  white-space: normal;
}

.ai-trip-form {
  width: 100%;
}

.ai-trip-page .ai-trip-planner {
  position: static;
  width: 100%;
  padding: clamp(22px, 4vw, 34px);
}

.ai-trip-page .ai-trip-planner textarea {
  min-height: 150px;
}

.ai-trip-flight-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.ai-trip-float {
  position: fixed;
  z-index: 2147483000;
  right: max(clamp(30px, 3vw, 58px), env(safe-area-inset-right));
  bottom: max(clamp(24px, 3vw, 42px), env(safe-area-inset-bottom));
  isolation: isolate;
}

.ai-trip-float-button {
  min-width: 226px;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 2px solid #d8b65c;
  border-radius: 999px;
  background: #6f7e64 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 32px rgba(47, 39, 33, 0.36);
  cursor: pointer;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  visibility: visible;
  opacity: 1;
}

.ai-trip-float-button > span:last-child {
  display: inline-block;
  visibility: visible;
  opacity: 1;
  color: #ffffff !important;
  text-shadow: 0 1px 1px rgba(47, 39, 33, 0.22);
}

.ai-trip-float-icon {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0;
}

.ai-trip-float-button:hover,
.ai-trip-float-button:focus-visible {
  background: #9f7714 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.ai-trip-popup {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: min(390px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  border-radius: 20px;
  box-shadow: 0 22px 54px rgba(47, 39, 33, 0.28);
}

.ai-trip-popup .ai-trip-planner {
  position: static;
  gap: 10px;
  padding: 20px;
  border-radius: 20px;
  max-height: min(600px, calc(100dvh - 110px));
  overflow-y: auto;
}

.ai-trip-popup .ai-trip-planner h2 {
  padding-right: 28px;
  font-size: 1.15rem;
}

.ai-trip-popup .ai-trip-planner textarea {
  min-height: 105px;
}

.ai-trip-popup .ai-trip-conversation {
  max-height: 180px;
}

.ai-trip-popup-close {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(74, 64, 56, 0.1);
  color: var(--text);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}

.ai-trip-popup-close:hover,
.ai-trip-popup-close:focus-visible {
  background: rgba(74, 64, 56, 0.18);
}

@media (max-width: 1024px) {
  .ai-trip-float {
    right: max(22px, env(safe-area-inset-right));
    bottom: max(22px, env(safe-area-inset-bottom));
  }

  .ai-trip-float-button {
    min-width: 204px;
    min-height: 54px;
  }

  .ai-trip-popup {
    width: min(370px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
  }
}

@media (max-width: 600px) {
  .ai-trip-float {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .ai-trip-float-button {
    min-width: 184px;
    min-height: 48px;
    padding: 0 14px;
    font-size: 0.8rem;
  }

  .ai-trip-popup {
    right: 0;
    bottom: 60px;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .ai-trip-popup .ai-trip-planner {
    padding: 18px;
    max-height: min(560px, calc(100dvh - 92px));
  }

  .ai-trip-popup-close {
    top: 10px;
    right: 10px;
  }
}

@keyframes ai-trip-spin {
  to { transform: rotate(360deg); }
}

.plan-card {
  padding: 24px 26px;
  border-radius: 22px;
  box-shadow: 0 16px 42px rgba(74, 64, 56, 0.08);
}

.plan-card .form-card-heading {
  margin-bottom: 18px;
}

/* Shared Customize typography.  These match the standard Start Date label
   and its Recommended trip length guidance respectively. */
.plan-form {
  --plan-label-size: 0.92rem;
  --plan-label-weight: 800;
  --plan-label-color: var(--text);
  --plan-helper-size: 0.82rem;
  --plan-helper-weight: 600;
  --plan-helper-color: var(--muted);
  --plan-helper-line-height: 1.45;
}

.plan-form :is(
  .field-group > label:not(.quick-option),
  .form-card-heading h2,
  .customize-section-label,
  .attraction-budget-copy label,
  .whole-wellington-options strong
) {
  color: var(--plan-label-color);
  font-family: inherit;
  font-size: var(--plan-label-size);
  font-weight: var(--plan-label-weight);
  line-height: inherit;
}

.plan-form .form-card-heading h2,
.plan-form .customize-section-label {
  margin: 0;
}

.plan-form :is(.field-group > label:not(.quick-option), .customize-section-label) span,
.plan-form .customize-optional {
  color: inherit;
  font: inherit;
}

.plan-form :is(
  [data-plan-duration-guidance],
  .field-hint,
  .form-card-heading p,
  .customize-section-helper,
  .recommended-route-card strong,
  .route-helper-chips,
  .route-helper small,
  .must-visit-toolbar > span,
  .must-visit-empty,
  .must-visit-card small,
  .selection-advisory-block,
  .form-help
) {
  color: var(--plan-helper-color);
  font-family: inherit;
  font-size: var(--plan-helper-size);
  font-weight: var(--plan-helper-weight);
  line-height: var(--plan-helper-line-height);
}

.plan-region {
  gap: 12px;
}

.plan-region .quick-option {
  min-height: 66px;
}

.plan-region .quick-option span:last-child {
  display: grid;
  gap: 3px;
  line-height: 1.1;
}

.plan-region .quick-option strong {
  font-size: 0.94rem;
}

.plan-region .quick-option small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.ordered-city-native {
  display: none !important;
}

.ordered-city-native[hidden] {
  display: none !important;
}

.route-city-section {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(280px, 1.4fr) minmax(180px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.route-city-field {
  min-width: 0;
}

.route-city-visits {
  align-self: stretch;
}

.ordered-city-picker {
  display: grid;
  gap: 10px;
}

.ordered-city-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.ordered-city-add,
.route-helper-button {
  min-height: 54px;
  white-space: nowrap;
}

.ordered-city-list {
  display: grid;
  gap: 8px;
  min-height: 42px;
}

.ordered-city-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 8px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffdf9;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 750;
}

.plan-trip-page .ordered-city-chip {
  grid-template-columns: minmax(0, 1fr) auto;
}

.plan-trip-page .ordered-city-sequence,
.plan-trip-page .ordered-city-actions button:not(:last-child) {
  display: none;
}

.ordered-city-sequence {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(125, 143, 118, 0.16);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 850;
}

.ordered-city-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ordered-city-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.ordered-city-chip button {
  border: 0;
  border-radius: 10px;
  background: rgba(125, 143, 118, 0.14);
  color: var(--text);
  width: 28px;
  height: 28px;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.ordered-city-chip button:disabled,
.ordered-city-add:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ordered-city-empty {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.route-helper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.72);
}

.route-helper small {
  display: block;
}

.route-helper strong {
  display: block;
  margin-bottom: 4px;
}

.route-helper-chips {
  display: block;
  margin-top: 10px;
}

.plan-trip-page .ordered-city-picker > .field-hint:not([data-city-picker-date-hint]):not([data-wellington-route-note]) {
  display: none;
}

.recommended-route-card {
  gap: 12px;
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 12px;
}

.recommended-route-card strong {
  margin-bottom: 2px;
}

.recommended-route-card .route-helper-chips {
  margin-top: 6px;
}

.recommended-route-card .route-helper-button {
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.recommended-route-card .route-helper-cancel {
  grid-column: 2;
  margin-top: -4px;
}

.recommended-route-card .route-helper-cancel[hidden] {
  display: none;
}

.whole-wellington-options {
  grid-template-columns: 1fr;
}

.whole-wellington-options[hidden] {
  display: none !important;
}

.whole-wellington-option-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.whole-wellington-option-list .quick-option {
  min-height: 44px;
  padding: 10px 12px;
}

.field-group label span {
  font-size: 0.8rem;
}

.must-visit-group {
  display: grid;
  gap: 18px;
}

.must-visit-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.must-visit-toolbar span {
  color: var(--primary);
  font-weight: 850;
}

.must-visit-toolbar small {
  color: var(--muted);
}

.must-visit-city-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.must-visit-city-tab {
  border: 1px solid rgba(180, 138, 90, 0.26);
  border-radius: 999px;
  background: #fffaf3;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 8px 13px;
}

.must-visit-city-tab.is-active {
  border-color: rgba(125, 143, 118, 0.54);
  background: var(--primary-soft);
  color: var(--primary);
}

.must-visit-panels {
  display: grid;
  gap: 12px;
}

.must-visit-panel[hidden] {
  display: none;
}

.must-visit-island-group {
  display: grid;
  gap: 12px;
}

.must-visit-island-group[hidden] {
  display: none;
}

.must-visit-island-group h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
}

.must-visit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.must-visit-card {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(180, 138, 90, 0.22);
  border-radius: 18px;
  background: #fffaf3;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.must-visit-card:hover {
  border-color: rgba(180, 138, 90, 0.42);
  box-shadow: 0 16px 34px rgba(74, 64, 56, 0.1);
  transform: translateY(-2px);
}

.must-visit-card input {
  margin-top: 4px;
  accent-color: var(--primary);
}

.must-visit-card strong {
  display: block;
  color: var(--text);
  line-height: 1.3;
}

.must-visit-card small {
  display: block;
  margin-top: 5px;
}

.must-visit-card .must-visit-description {
  margin-top: 0.18rem;
}

.must-visit-card .must-visit-meta {
  display: inline-block;
  margin: 0.3rem 0.35rem 0 0;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: var(--primary-soft);
}

.must-visit-card:has(input:checked) {
  border-color: rgba(125, 143, 118, 0.62);
  background: var(--primary-soft);
}

.must-visit-card:has(input:disabled:not(:checked)) {
  opacity: 0.5;
  cursor: not-allowed;
}

.must-visit-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.selection-advisory-block {
  margin: 8px 0;
  padding: 9px 11px;
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: #fffaf3;
  color: var(--text);
  line-height: 1.55;
}

.selection-advisory-block:first-child {
  margin-top: 0;
}

.selection-advisory-block:last-child {
  margin-bottom: 0;
}

.interest-group {
  gap: 12px;
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.interest-tag {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fffdf9;
  color: var(--text);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.2;
  box-shadow: 0 8px 20px rgba(74, 64, 56, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.interest-tag:hover {
  border-color: rgba(180, 138, 90, 0.48);
  box-shadow: 0 16px 34px rgba(74, 64, 56, 0.1);
  transform: translateY(-2px);
}

.interest-tag input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  min-height: 0;
}

.interest-tag:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 14px 30px rgba(74, 64, 56, 0.09);
}

.plan-actions {
  justify-content: center;
}

.itinerary-page {
  width: 100%;
  max-width: none;
  margin: 36px auto 0;
  transform: none;
  gap: 22px;
  min-width: 0;
}

.itinerary-heading {
  max-width: 760px;
}

.itinerary-layout {
  display: grid;
  grid-template-columns: minmax(0, 61fr) minmax(340px, 39fr);
  gap: 20px;
  align-items: start;
}

.itinerary-content {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.itinerary-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 26px;
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(74, 64, 56, 0.09);
}

.interest-matching {
  min-width: 0;
  padding: 22px;
}

.interest-matching h2,
.interest-matching h3,
.interest-matching h4,
.interest-matching p { margin-top: 0; }
.interest-matching h2 { margin-bottom: 16px; }
.interest-matching h3 { margin-bottom: 10px; font-size: 1rem; }
.interest-matching-group + .interest-matching-group { margin-top: 22px; }

.interest-matching-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.interest-match-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border, #e5ddd1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}
.interest-match-card h4 { margin-bottom: 4px; overflow-wrap: anywhere; }
.interest-match-city,
.interest-matching-note,
.interest-matching-disclaimer { color: var(--text-muted, #6d675f); font-size: .9rem; line-height: 1.5; }
.interest-match-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.interest-match-tags span {
  display: inline-flex; align-items: center; max-width: 100%; padding: 3px 8px;
  border-radius: 999px; background: #eef1e9; color: var(--primary, #687860);
  font-size: .78rem; line-height: 1.25; overflow-wrap: anywhere;
}
.interest-match-card a { font-size: .88rem; font-weight: 700; }
.interest-matching-disclaimer { margin: 18px 0 0; }

.summary-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.summary-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.summary-save {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
}

.summary-save form {
  margin: 0;
}

.summary-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.summary-title-row > .saved-pill {
  display: none;
}

.saved-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 11px 6px 8px;
  border: 1px solid rgba(125, 143, 118, 0.26);
  border-radius: 999px;
  background: rgba(238, 242, 234, 0.92);
  color: #52664d;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 650;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(74, 64, 56, 0.06);
}

.saved-pill::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.22);
}

.summary-kicker {
  display: inline-flex;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.summary-main h2,
.day-card-header h2 {
  margin: 8px 0 0;
  color: var(--text);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-family: inherit;
  font-weight: 700;
  line-height: 1.15;
}

.summary-main h2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.day-driving {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.45;
}

.summary-main p {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 650;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.summary-stat {
  display: grid;
  align-content: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(74, 64, 56, 0.1);
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.74);
}

.summary-stat > span {
  display: block;
  color: rgba(104, 96, 87, 0.72);
  font-size: 0.7rem;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 4px;
}

.summary-stat strong {
  color: rgba(50, 45, 39, 0.84);
  font-size: 0.96rem;
  font-family: inherit;
  font-weight: 650;
  line-height: 1.25;
}

.route-overview-card {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  width: 100%;
}

.route-overview-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 650;
}

.route-overview-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.route-stop {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(231, 222, 210, 0.9);
  border-radius: 999px;
  background: #fffdf9;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 650;
}

.route-stop-tag {
  color: var(--primary);
  font-size: 0.68rem;
  font-family: inherit;
  font-weight: 700;
}

.route-arrow {
  color: var(--gold);
  font-weight: 700;
}

.itinerary-map-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(74, 64, 56, 0.08);
}

.itinerary-map-sidebar {
  position: sticky;
  top: max(82px, calc(50vh - 245px));
  align-self: start;
}

.itinerary-map {
  width: 100%;
  height: 460px;
}

.itinerary-contact-card {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, #fffdf8, #f6efe4);
  box-shadow: 0 12px 28px rgba(74, 64, 56, 0.07);
}

.itinerary-contact-card h2 {
  margin: 4px 0 6px;
  color: var(--nav);
  font-size: 1.05rem;
}

.itinerary-contact-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.itinerary-contact-card .button {
  width: 100%;
  justify-content: center;
}

.contact-trip-page {
  width: min(760px, calc(100% - var(--gutter) * 2));
  margin: 34px auto 68px;
}

.contact-trip-card {
  padding: clamp(22px, 3.4vw, 34px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(74, 64, 56, 0.10);
}

.contact-trip-heading {
  max-width: 620px;
}

.contact-trip-heading h1 {
  margin: 6px 0 10px;
  color: var(--nav);
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  line-height: 1.1;
}

.contact-trip-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.contact-trip-summary {
  display: grid;
  gap: 4px;
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid rgba(180, 138, 90, 0.28);
  border-radius: 14px;
  background: #fbf7ef;
}

.contact-trip-summary span,
.contact-trip-summary small {
  color: var(--muted);
}

.contact-trip-summary strong {
  color: var(--nav);
  font-size: 1.1rem;
}

.contact-trip-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.contact-trip-form .form-field {
  display: grid;
  gap: 8px;
}

.contact-trip-form .form-field-wide,
.contact-trip-form .form-actions,
.contact-trip-form .form-errors {
  grid-column: 1 / -1;
}

.contact-trip-form label {
  color: var(--nav);
  font-weight: 750;
}

.contact-trip-form input,
.contact-trip-form select,
.contact-trip-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffdf9;
  color: var(--text);
  font: inherit;
  padding: 11px 13px;
}

.contact-trip-form textarea {
  min-height: 124px;
  resize: vertical;
}

.contact-trip-form input:focus,
.contact-trip-form select:focus,
.contact-trip-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(125, 143, 118, 0.18);
}

.contact-trip-form .errorlist {
  margin: 0;
  padding-left: 18px;
  color: #9d3d2d;
  font-size: 0.92rem;
}

.itinerary-map .leaflet-tile {
  max-width: none !important;
  max-height: none !important;
}

.itinerary-map .leaflet-top.leaflet-left {
  display: block;
}

.itinerary-map .leaflet-top.leaflet-left .leaflet-control {
  margin: 10px 0 0 10px;
}

.itinerary-map-city-label {
  width: auto !important;
  height: auto !important;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.82);
  color: #2f2a22;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.15;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 9px rgba(47, 42, 34, 0.12);
  cursor: pointer;
}

.itinerary-map-city-label.is-active {
  background: rgba(255, 253, 249, 0.96);
  color: #201914;
  font-weight: 850;
  box-shadow: 0 5px 15px rgba(47, 42, 34, 0.22);
  outline: 2px solid rgba(255, 255, 255, 0.94);
}

.itinerary-map-attraction-label {
  width: auto !important;
  height: auto !important;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 179, 26, 0.94);
  color: #2f2104;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(168, 79, 0, 0.22);
  cursor: pointer;
}

.day-card-map-focus {
  outline: 3px solid rgba(177, 138, 22, 0.36);
  outline-offset: 4px;
  box-shadow: 0 18px 46px rgba(177, 138, 22, 0.16);
}

.map-item-focus .timeline-content {
  outline: 3px solid rgba(255, 179, 26, 0.44);
  outline-offset: 4px;
  box-shadow: 0 14px 32px rgba(168, 79, 0, 0.14);
}

.itinerary-map-legend {
  display: block;
  min-width: 132px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px rgba(47, 42, 34, 0.16);
  color: #2f2a22;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
}

.legend-items {
  display: grid;
  gap: 8px;
  white-space: normal;
}

.legend-items span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid #4a371f;
  flex: 0 0 auto;
}

.legend-start {
  background: #b18a16;
}

.legend-end {
  background: #6b4a12;
  border-color: #2f2a22;
}

.legend-city {
  width: 9px;
  height: 9px;
  background: #fff8e9;
  border-color: #5b3c1d;
}

.legend-line {
  display: inline-block;
  width: 28px;
  height: 0;
  border-top: 2px solid #4f3d22;
  flex: 0 0 auto;
}

.legend-flight {
  border-top-style: dashed;
}

.itinerary-days {
  display: grid;
  gap: 18px;
}

.day-card {
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(74, 64, 56, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.day-card:hover {
  box-shadow: 0 22px 52px rgba(74, 64, 56, 0.12);
  transform: translateY(-2px);
}

.day-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.day-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.day-meta span,
.item-details span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.timeline-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 68px 18px minmax(0, 1fr);
  gap: 14px;
  position: relative;
  padding: 0 0 18px;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 76px;
  width: 1px;
  background: var(--border);
}

.timeline-time {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.timeline-time span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 4px;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border: 3px solid var(--surface);
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 5px 14px rgba(74, 64, 56, 0.12);
  margin-top: 2px;
  z-index: 1;
}

.timeline-content {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fffdf9;
}

.timeline-content h3 {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.25;
}

.timeline-content p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.item-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--primary);
  color: #fffdf9;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.item-badge-drive {
  background: var(--nav);
}

.item-badge-gold {
  background: var(--gold);
}

.item-badge-muted {
  background: var(--muted);
}

.item-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.item-details .itinerary-price-chip {
  background: #fff4dd;
  color: #8a5a17;
}

.item-details .itinerary-price-free {
  background: rgba(125, 143, 118, 0.14);
  color: #59664f;
  text-transform: uppercase;
}

.itinerary-official-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(180, 138, 90, 0.28);
  border-radius: 999px;
  background: #fffaf3;
  color: var(--nav);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none;
}

.itinerary-official-link:hover {
  border-color: rgba(180, 138, 90, 0.46);
  background: #ffffff;
  color: var(--primary);
}

.activity-cost-summary {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf9 0%, #fff9f0 100%);
}

.activity-cost-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(74, 64, 56, 0.1);
}

.activity-cost-hero h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.16rem;
  line-height: 1.2;
}

.activity-cost-total {
  display: grid;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  min-width: 190px;
  text-align: right;
}

/* Customize layout spacing is kept separate from the shared typography
   tokens above so labels and guidance cannot drift apart. */
.plan-form .form-card-heading p,
.plan-form .customize-section-helper {
  margin: 6px 0 0;
}

.plan-form .must-visit-group {
  gap: 10px;
}

.plan-form .must-visit-toolbar {
  min-height: 0;
}

.plan-form .must-visit-empty[hidden] { display: none; }

.itinerary-mobile-day-nav {
  position: sticky;
  top: var(--itinerary-navbar-height, 72px);
  z-index: 9;
  padding: 10px 0 12px;
  background: var(--background, #faf8f3);
  border-bottom: 1px solid rgba(74, 64, 56, 0.13);
}

.itinerary-mobile-day-nav-scroll {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

.interest-matching-scheduled-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.interest-match-scheduled-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
}

.interest-match-scheduled-row h4,
.interest-match-scheduled-row .interest-match-city {
  grid-column: 1;
  margin: 0;
}

.interest-match-scheduled-row .interest-match-city {
  margin-top: 2px;
  font-size: 0.84rem;
}

.interest-match-scheduled-row .interest-match-tags,
.interest-match-scheduled-row a {
  grid-column: 2;
}

.interest-match-scheduled-row .interest-match-tags {
  justify-content: flex-end;
  margin: 0;
}

.interest-match-scheduled-row a {
  margin-top: 5px;
  text-align: right;
}

@media (max-width: 760px) {
  .interest-match-scheduled-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .interest-match-scheduled-row .interest-match-tags,
  .interest-match-scheduled-row a {
    grid-column: 1;
    justify-content: flex-start;
    text-align: left;
  }
}

.activity-cost-total span {
  color: rgba(104, 96, 87, 0.72);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: none;
}

.activity-cost-total strong {
  color: var(--primary);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.12;
}

.activity-cost-section {
  display: grid;
  gap: 6px;
}

.activity-cost-section h3 {
  margin: 0;
  color: rgba(50, 45, 39, 0.82);
  font-size: 0.9rem;
  font-weight: 800;
}

.activity-cost-list {
  display: grid;
}

.activity-cost-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(74, 64, 56, 0.07);
}

.activity-cost-row:last-child {
  border-bottom: 0;
}

.activity-cost-row span {
  min-width: 0;
  color: rgba(50, 45, 39, 0.9);
  font-weight: 500;
  line-height: 1.35;
}

.activity-cost-row strong {
  color: var(--nav);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.activity-cost-secondary-section {
  padding-top: 2px;
}

.activity-cost-empty span,
.activity-cost-empty strong,
.activity-cost-secondary span,
.activity-cost-secondary strong {
  color: var(--muted);
  font-weight: 650;
}

.activity-cost-disclaimer {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(74, 64, 56, 0.08);
  color: rgba(104, 96, 87, 0.78);
  font-size: 0.84rem;
  line-height: 1.5;
}

.budget-comparison {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(122, 137, 111, 0.34);
  border-radius: 12px;
  background: rgba(238, 243, 234, 0.76);
}

.budget-comparison-over,
.budget-comparison-over_incomplete {
  border-color: rgba(189, 142, 41, 0.56);
  background: rgba(255, 244, 207, 0.9);
}

.budget-comparison-incomplete {
    border-color: rgba(132, 119, 93, 0.32);
    background: rgba(247, 244, 237, 0.92);
}

.budget-comparison-equal {
    border-color: rgba(132, 119, 93, 0.32);
    background: rgba(247, 244, 237, 0.92);
}

.budget-comparison-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.budget-comparison-line strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 0.94rem;
  text-align: right;
  white-space: nowrap;
}

.budget-comparison-message {
    margin: 0;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.45;
}

.budget-comparison-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 14px;
    padding-top: 3px;
    border-top: 1px solid rgba(132, 119, 93, 0.18);
}

.budget-comparison-result-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.budget-comparison-message {
    text-align: right;
}

.budget-comparison-message.is-over { color: #8a6214; }
.budget-comparison-message.is-under { color: #487046; }
.budget-comparison-message.is-equal,
.budget-comparison-message.is-incomplete { color: var(--text); }

.attraction-budget-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 24px;
}

.attraction-budget-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.attraction-budget-layout .attraction-budget-input {
  display: block;
  box-sizing: border-box;
  width: 300px;
  max-width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fffdf9;
  color: var(--text);
  font: inherit;
  line-height: 1.35;
}

.attraction-budget-layout .attraction-budget-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(125, 143, 118, 0.16);
  outline: none;
}

@media (max-width: 760px) {
  .attraction-budget-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
  }

  .attraction-budget-layout .attraction-budget-input {
    width: 100%;
  }

  .budget-comparison-line {
    display: grid;
    gap: 2px;
  }

  .budget-comparison-line strong {
      text-align: left;
      white-space: normal;
  }

  .budget-comparison-result {
      grid-template-columns: minmax(0, 1fr);
      gap: 2px;
  }

  .budget-comparison-message {
      text-align: left;
  }
}

.route-item-details {
  align-items: center;
}

.route-item-details .destination-attraction-price {
  min-height: 30px;
  border-radius: 999px;
  font-size: 0.78rem;
}

.route-attraction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.empty-itinerary {
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.itinerary-actions {
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.itinerary-actions form {
  margin: 0;
  display: inline-flex;
}

.route-detail-page {
  width: 100%;
  max-width: none;
  margin: 36px auto 0;
  display: grid;
  gap: 22px;
}

.route-detail-hero {
  position: relative;
  min-height: clamp(380px, 48vw, 520px);
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(74, 64, 56, 0.16);
  isolation: isolate;
}

.route-detail-hero img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  object-position: center;
}

.route-detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(47, 42, 38, 0.74), rgba(47, 42, 38, 0.3) 54%, rgba(47, 42, 38, 0.06));
  z-index: 1;
}

.route-detail-hero-content {
  position: absolute;
  left: clamp(24px, 5vw, 54px);
  bottom: clamp(24px, 5vw, 54px);
  z-index: 2;
  width: min(620px, calc(100% - 48px));
  color: #ffffff;
}

.route-detail-hero-content .summary-kicker {
  color: #f4dbc0;
}

.route-detail-hero-content h1 {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 4.8vw, 4rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.route-detail-hero-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  font-weight: 700;
}

.route-hero-route-line {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.96rem;
  font-weight: 780;
  line-height: 1.45;
}

.route-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.route-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.route-theme-tags {
  margin-top: 10px;
}

.route-detail-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 28px;
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(74, 64, 56, 0.09);
}

.route-detail-summary h2,
.route-map-placeholder h2 {
  margin: 8px 0 0;
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.26;
  font-weight: 760;
  max-width: 920px;
}

.route-detail-summary p,
.route-map-placeholder p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.route-overview-body {
  display: grid;
  gap: 0;
  max-width: 760px;
}

.route-detail-days {
  display: grid;
  gap: 18px;
}

.route-map-placeholder {
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(180, 138, 90, 0.45);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(125, 143, 118, 0.11), rgba(180, 138, 90, 0.12)),
    var(--surface);
}

.route-detail-actions {
  justify-content: center;
}

.auth-page {
  width: min(100%, 520px);
  margin: 42px auto 0;
  display: grid;
  gap: 22px;
}

.auth-heading {
  max-width: 520px;
}

.auth-card {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(74, 64, 56, 0.09);
}

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.auth-switch {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.94rem;
  font-weight: 650;
}

.auth-switch a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}

.auth-switch a:hover {
  color: var(--gold);
}

.account-page {
  width: min(100%, 980px);
  margin: 36px auto 0;
  display: grid;
  gap: 22px;
}

.account-heading {
  max-width: 760px;
}

.profile-page {
  width: min(100%, 720px);
}

.my-trips-page {
  width: min(100%, 980px);
}

.account-section {
  padding: 26px;
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(74, 64, 56, 0.09);
}

.profile-card {
  display: grid;
}

.profile-card .account-form {
  width: 100%;
}

.profile-card .form-card-heading h2 {
  flex: 0 0 auto;
  white-space: nowrap;
}

.profile-card .form-card-heading p {
  flex: 1 1 auto;
  min-width: 0;
}

.account-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.account-form {
  display: grid;
  gap: 18px;
}

.account-submit {
  justify-content: center;
  width: fit-content;
  min-width: 190px;
  justify-self: start;
}

.account-messages-page {
  width: min(100%, 860px);
}

.conversation-list {
  display: grid;
  gap: 14px;
}

.conversation-list-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fffdf9;
}

.conversation-list-item.is-unread {
  border-color: rgba(180, 138, 90, 0.58);
  background: #fff9ed;
}

.conversation-list-item h2 {
  margin: 5px 0 4px;
  color: var(--nav);
  font-size: 1.08rem;
}

.conversation-list-item p {
  margin: 0;
  color: var(--muted);
}

.conversation-list-item aside {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.message-unread-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #d88b1d;
  color: #fff;
  font-size: 0.78rem;
}

.conversation-card {
  display: grid;
  gap: 18px;
}

.conversation-meta {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 6px 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fbf7ef;
}

.conversation-meta span {
  color: var(--muted);
}

.conversation-thread {
  display: grid;
  gap: 12px;
}

.conversation-message {
  max-width: 82%;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fffdf9;
}

.conversation-message.from-admin {
  justify-self: start;
  background: #f3f6ef;
}

.conversation-message.from-customer {
  justify-self: end;
  background: #fff8ed;
}

.conversation-message header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.conversation-message p {
  margin: 0;
  color: var(--text);
}

.conversation-reply-actions {
  justify-content: space-between;
}

.field-group input:disabled {
  color: var(--muted);
  background: #f7f1e8;
  cursor: not-allowed;
}

.trip-list {
  display: grid;
  gap: 14px;
}

.trip-list-item {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: 0 10px 26px rgba(74, 64, 56, 0.06);
}

.trip-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 18px;
  align-items: center;
}

.trip-list-main {
  min-width: 0;
  flex: 1 1 auto;
}

.trip-list-main h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1.25;
}

.trip-list-main p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.trip-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 10px;
  white-space: nowrap;
}

.trip-list-actions .button {
  width: 104px;
  height: 44px;
  min-height: 44px;
  justify-content: center;
  padding: 0 14px;
}

.trip-list-actions .trip-pdf-button {
  width: 64px;
  padding: 0 10px;
}

.trip-list-actions .trip-pdf-button.is-loading {
  width: 104px;
  opacity: 0.72;
  cursor: wait;
  pointer-events: none;
}

.pdf-download-toast {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(74, 64, 56, 0.3);
  cursor: wait;
}

.pdf-loading-panel {
  width: min(360px, 100%);
  padding: 28px 24px;
  text-align: center;
  border: 1px solid rgba(125, 143, 118, 0.35);
  border-radius: 14px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 14px 34px rgba(74, 64, 56, 0.18);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
}

.pdf-download-toast.is-visible {
  display: grid;
}

.pdf-loading-panel p { margin: 16px 0 0; }

.pdf-loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #e7dccd;
  border-top-color: #7b8a62;
  border-radius: 50%;
  animation: pdf-loading-spin 0.8s linear infinite;
}

@keyframes pdf-loading-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .pdf-loading-spinner { animation: none; }
}

.trip-list-actions form {
  margin: 0;
  display: inline-flex;
}

.trip-rename-panel {
  display: none;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbf8f3;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.trip-list-item:not(.is-renaming) > .trip-rename-panel,
.trip-rename-panel[hidden] {
  display: none !important;
}

.trip-list-item.is-renaming .trip-rename-panel {
  display: grid;
}

.trip-rename-panel label {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.trip-rename-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.35;
  outline: none;
}

.trip-rename-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(125, 143, 118, 0.16);
}

.danger-button {
  color: #9a4f35;
  border-color: rgba(154, 79, 53, 0.32);
}

.danger-button:hover {
  color: #7e3c28;
  border-color: rgba(154, 79, 53, 0.5);
}

.form-alert {
  padding: 12px 14px;
  border: 1px solid rgba(180, 138, 90, 0.45);
  border-radius: 14px;
  background: #fff7ed;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  max-width: clamp(118px, 12vw, 180px);
  padding: 8px 12px;
  color: #fffdf9;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.user-chip-label {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip:hover {
  color: #f2d6b0;
}

.user-chip::-webkit-details-marker {
  display: none;
}

.user-chip::after {
  content: "▾";
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  margin-left: 6px;
  color: #e6c990;
  font-size: 0.78em;
  line-height: 1;
}

.user-menu {
  position: relative;
  min-width: 0;
  flex: 0 1 auto;
}

.user-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 150px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(231, 222, 210, 0.72);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 18px 44px rgba(47, 42, 38, 0.18);
  z-index: 20;
}

.user-menu:not([open]) .user-menu-panel {
  display: none;
}

.user-menu-panel a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.user-menu-panel a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.message-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff7ec;
  flex: 0 0 auto;
}

.message-bell:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.message-bell strong {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d88b1d;
  color: #fff;
  font-size: 0.68rem;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(47, 42, 38, 0.24);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  min-height: 48px;
  padding: 12px 24px;
  font-weight: 700;
  line-height: 1.15;
  border: none;
  white-space: nowrap;
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
}

.button-secondary {
  background: #ffffff;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.button-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.button:hover,
.tab:hover {
  opacity: 0.95;
}

.site-footer {
  padding: 28px 0 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1240px) {
  .topbar {
    gap: 12px;
  }

  .brand {
    max-width: 260px;
    gap: 10px;
    font-size: 1.35rem;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .main-nav {
    gap: 12px;
    margin-left: 14px;
  }

  .user-chip {
    max-width: 130px;
    padding-inline: 10px;
  }

  .site-header .button-outline {
    min-width: 78px;
    padding-inline: 14px;
  }
}

@media (max-width: 1024px) {
  :root {
    --gutter: 18px;
  }

  .site-header {
    padding: 10px 0;
  }

  .topbar {
    flex-wrap: wrap;
    row-gap: 12px;
  }

  .main-nav {
    order: 3;
    flex: 1 0 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    margin-left: 0;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .hero-carousel {
    height: clamp(420px, 56vw, 540px);
    border-radius: 24px;
  }

  .feature-grid,
  .route-cards,
  .steps-grid,
  .three-column {
    grid-template-columns: 1fr;
  }

  .about-contact-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-advantages {
    grid-template-columns: 1fr;
  }

  .about-planner-feature,
  .about-introduction,
  .about-contact-card {
    grid-template-columns: 1fr;
  }

  .about-planner-feature .button {
    justify-self: start;
  }

  .destination-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checkbox-group > div,
  .checkbox-group ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-input-panel {
    grid-template-columns: 1fr;
  }

  .route-city-section {
    grid-template-columns: 1fr;
  }

  .interest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .must-visit-grid {
    grid-template-columns: 1fr;
  }

  .itinerary-summary {
    grid-template-columns: 1fr;
  }

  .itinerary-page {
    width: min(calc(100% - 24px), 980px);
    transform: none;
  }

  .itinerary-layout {
    grid-template-columns: 1fr;
  }

  .plan-trip-workspace {
    grid-template-columns: 1fr;
  }

  .plan-trip-workspace > .plan-form,
  .plan-trip-workspace > .ai-trip-planner {
    grid-column: 1;
    grid-row: auto;
  }

  .ai-trip-planner {
    position: static;
  }

  .itinerary-map-sidebar {
    order: -1;
    position: static;
    align-self: stretch;
  }

  .itinerary-map {
    height: clamp(300px, 48vw, 380px);
  }

  .itinerary-contact-card {
    margin-top: 14px;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
  }

  .itinerary-page {
    width: 100%;
  }

  .itinerary-layout {
    gap: 18px;
  }

  .itinerary-map {
    height: 300px;
  }

  .itinerary-map .leaflet-top.leaflet-left {
    max-width: calc(100% - 20px);
  }

  .itinerary-map-legend {
    max-width: calc(100vw - 86px);
    font-size: 0.78rem;
  }

  .legend-items {
    flex-wrap: wrap;
    gap: 8px 10px;
    white-space: normal;
  }

  .site-main {
    padding-top: 16px;
  }

  .topbar {
    align-items: center;
    gap: 10px 14px;
  }

  .topbar-right {
    margin-left: auto;
    gap: 10px;
    font-size: 0.92rem;
  }

  .brand {
    gap: 10px;
    font-size: 1.25rem;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .main-nav {
    gap: 18px;
    font-size: 0.95rem;
  }

  .hero-row {
    padding-bottom: 22px;
  }

  .hero-copy {
    margin-bottom: 14px;
  }

  .hero-copy .eyebrow {
    font-size: 0.72rem;
    margin-bottom: 10px;
  }

  .hero-copy h2,
  .quick-heading h1,
  .plan-heading h1 {
    font-size: clamp(1.85rem, 8vw, 2.55rem);
    white-space: normal;
  }

  .hero-copy p {
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-carousel {
    height: clamp(320px, 72vw, 440px);
    border-radius: 20px;
  }

  .carousel-control {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .carousel-prev {
    left: 14px;
  }

  .carousel-next {
    right: 14px;
  }

  .carousel-dots {
    left: 18px;
    bottom: 18px;
  }

  .hero-actions {
    gap: 12px;
    margin-top: 14px;
  }

  .hero-actions .button {
    width: min(210px, calc(50% - 6px));
    min-height: 48px;
    padding-inline: 16px;
    font-size: 0.95rem;
  }

  .feature-grid {
    gap: 16px;
  }

  .feature-card,
  .route-card,
  .destination-card,
  .step-card {
    border-radius: 18px;
    padding: 22px;
  }

  .popular-routes,
  .how-it-works,
  .destinations-panel,
  .page-placeholder,
  .form-card {
    border-radius: 22px;
    padding: 24px;
  }

  .about-page {
    gap: 30px;
    margin-top: 20px;
  }

  .about-introduction,
  .about-planner-feature,
  .about-contact-card {
    padding: 24px;
    border-radius: 22px;
  }

  .about-intro-copy {
    padding-left: 0;
    border-left: 0;
  }

  .about-fleet-visual {
    border-radius: 22px;
  }

  .about-fleet-visual img {
    aspect-ratio: 4 / 3;
  }

  .about-fleet-visual::after {
    background: linear-gradient(180deg, rgba(52, 40, 32, 0.08), rgba(52, 40, 32, 0.72));
  }

  .about-fleet-visual figcaption {
    left: 18px;
    right: 18px;
    bottom: 18px;
    max-width: none;
  }

  .about-advantages,
  .about-contact-details,
  .about-social-grid {
    grid-template-columns: 1fr;
  }

  .about-advantage-card {
    min-height: 0;
    padding: 24px;
    border-radius: 22px;
  }

  .about-advantage-card h3 {
    min-height: 0;
  }

  .about-social-card img {
    width: min(100%, 170px);
  }

  .about-planner-feature .button,
  .about-contact-section .button {
    width: fit-content;
  }

  .destinations-page {
    gap: 20px;
    margin-top: 20px;
  }

  .destinations-hero {
    min-height: clamp(330px, 72vw, 460px);
    border-radius: 22px;
  }

  .destinations-hero::after {
    background: linear-gradient(0deg, rgba(47, 42, 38, 0.8), rgba(47, 42, 38, 0.18) 72%);
  }

  .destinations-hero-content h1 {
    font-size: clamp(2rem, 10vw, 3.3rem);
  }

  .destinations-hero-content p {
    font-size: 1rem;
  }

  .destination-grid {
    grid-template-columns: 1fr;
  }

  .destination-card {
    grid-template-rows: auto 1fr;
    min-height: 0;
    padding: 22px;
  }

  .two-column,
  .three-column {
    grid-template-columns: 1fr;
  }

  .form-card-heading {
    gap: 12px;
    margin-bottom: 20px;
  }

  .form-step {
    width: 40px;
    height: 40px;
  }

  .checkbox-group > div,
  .checkbox-group ul {
    grid-template-columns: 1fr;
  }

  .quick-region-options {
    grid-template-columns: 1fr;
  }

  .quick-option {
    min-height: 54px;
  }

  .quick-duration {
    grid-template-columns: 1fr;
  }

  .quick-duration label,
  .quick-duration small,
  .quick-duration .errorlist,
  .quick-duration select {
    grid-column: 1;
    grid-row: auto;
  }

  .quick-duration select {
    max-width: 100%;
  }

  .plan-heading p {
    white-space: normal;
  }

  .interest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-profile-grid {
    grid-template-columns: 1fr;
  }

  .trip-list-row {
    grid-template-columns: 1fr;
  }

  .trip-list-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-top {
    gap: 16px;
  }

  .route-detail-summary {
    grid-template-columns: 1fr;
  }

  .route-detail-hero::after {
    background: linear-gradient(0deg, rgba(47, 42, 38, 0.78), rgba(47, 42, 38, 0.18) 72%);
  }

  .summary-save {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .day-card-header {
    flex-direction: column;
  }

  .day-meta {
    justify-content: flex-start;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .button {
    flex: 1 1 180px;
  }
}

@media (max-width: 680px) {
  .conversation-list-item,
  .backoffice-conversation > header,
  .backoffice-conversation-row {
    flex-direction: column;
  }

  .conversation-list-item aside,
  .backoffice-conversation-row aside {
    justify-items: start;
    white-space: normal;
  }

  .conversation-meta {
    grid-template-columns: 1fr;
  }

  .conversation-message {
    max-width: 100%;
  }

  .contact-trip-form {
    grid-template-columns: 1fr;
  }

  .contact-trip-form .form-field-wide,
  .contact-trip-form .form-actions,
  .contact-trip-form .form-errors {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 10px 0;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand {
    font-size: 1.12rem;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .site-header .button-outline {
    min-height: 40px;
    padding: 8px 16px;
  }

  .main-nav {
    width: 100%;
    gap: 16px;
  }

  .hero-copy h2,
  .quick-heading h1,
  .plan-heading h1,
  .trip-heading h1 {
    font-size: clamp(1.75rem, 10vw, 2.35rem);
  }

  .hero-carousel {
    height: clamp(260px, 78vw, 340px);
    border-radius: 18px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button {
    width: 100%;
  }

  .carousel-dot {
    position: relative;
    width: 36px;
    height: 32px;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    transform: none;
  }

  .carousel-dot::before {
    content: "";
    position: absolute;
    top: 14px;
    left: 4px;
    width: 28px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 1px 8px rgba(74, 64, 56, 0.2);
  }

  .carousel-dot.active {
    background: transparent;
    transform: none;
  }

  .carousel-dot.active::before {
    background: #ffffff;
    transform: scaleX(1.12);
  }

  .carousel-dots {
    gap: 6px;
  }

  .section-header {
    align-items: flex-start;
  }

  .tab-list {
    width: 100%;
    overflow-x: auto;
  }

  .trip-page {
    gap: 18px;
  }

  .form-card {
    padding: 20px;
  }

  .form-card-heading {
    align-items: center;
  }

  .profile-card .form-card-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .profile-card .form-card-heading h2 {
    white-space: normal;
  }

  .field-group input,
  .field-group select,
  .field-group textarea {
    min-height: 50px;
    border-radius: 14px;
  }

  .ordered-city-controls,
  .route-helper {
    grid-template-columns: 1fr;
  }

  .ordered-city-add,
  .route-helper-button {
    width: 100%;
  }

  .recommended-route-card .route-helper-cancel {
    grid-column: auto;
    margin-top: 0;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .button {
    width: 100%;
  }

  .activity-cost-hero,
  .activity-cost-row {
    grid-template-columns: 1fr;
  }

  .activity-cost-hero {
    display: grid;
  }

  .activity-cost-total {
    min-width: 0;
    text-align: left;
  }

  .activity-cost-row strong {
    white-space: normal;
  }

  .interest-grid {
    grid-template-columns: 1fr;
  }

  .account-section {
    padding: 20px;
  }

  .account-submit {
    width: 100%;
  }

  .trip-list-actions,
  .trip-rename-panel {
    width: 100%;
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .trip-list-row {
    align-items: stretch;
  }

  .trip-list-actions .button,
  .trip-rename-panel .button,
  .trip-rename-input {
    width: 100%;
  }

  .itinerary-summary,
  .day-card,
  .route-detail-summary,
  .route-map-placeholder {
    padding: 20px;
  }

  .route-detail-page {
    margin-top: 24px;
  }

  .route-detail-hero {
    min-height: 420px;
    border-radius: 20px;
  }

  .route-detail-hero-content {
    left: 20px;
    bottom: 20px;
    width: calc(100% - 40px);
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .summary-stat {
    min-height: 54px;
    padding: 10px 12px;
  }

  .summary-save,
  .summary-save .button,
  .summary-save form {
    width: 100%;
  }

  .summary-actions-row {
    width: 100%;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .timeline-item {
    grid-template-columns: 54px 16px minmax(0, 1fr);
    gap: 10px;
  }

  .timeline-item:not(:last-child)::after {
    left: 61px;
  }

  .timeline-content {
    padding: 14px;
  }
}

/* Backoffice (Admin) */

.backoffice-body {
  background: var(--bg);
  min-height: 100vh;
}

.backoffice-header {
  background: var(--nav);
  color: #fff;
  padding: 12px 22px;
}

.backoffice-header-inner {
  width: min(100%, 1180px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(0, auto) minmax(220px, 1fr);
  align-items: center;
  gap: 14px;
}

.backoffice-header .brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.backoffice-nav a {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  margin: 0 4px;
  font-size: 0.92rem;
}

.backoffice-nav a:hover,
.backoffice-nav a.active {
  color: #fff;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 4px;
}

.backoffice-account-nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; color: rgba(255, 255, 255, 0.86); font-size: 0.9rem; white-space: nowrap; }
.backoffice-account-nav a { color: inherit; }
.backoffice-admin-name { color: #fff; font-weight: 650; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.backoffice-message-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 2px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}

.backoffice-message-bell:hover,
.backoffice-message-bell.active {
  background: rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  padding-bottom: 0;
}

.backoffice-message-bell strong {
  position: absolute;
  top: -6px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d88b1d;
  color: #fff;
  font-size: 0.68rem;
  line-height: 18px;
  text-align: center;
}

.backoffice-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.backoffice-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.backoffice-page-heading h1 {
  margin-bottom: 0;
}

.dashboard-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dashboard-panels .backoffice-card { margin-top: 16px; }

@media (max-width: 780px) {
  .backoffice-header { padding: 12px 20px; }
  .dashboard-panels { grid-template-columns: 1fr; }
}

.backoffice-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(74, 64, 56, 0.08);
  padding: 24px;
  margin-top: 16px;
}

.backoffice-muted {
  color: var(--muted);
  margin: 4px 0 16px;
}

.backoffice-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.backoffice-search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.backoffice-search input[type="text"] {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d3d9e0;
  border-radius: 8px;
}

.backoffice-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.backoffice-table th,
.backoffice-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e4e7eb;
}

.backoffice-table th {
  color: var(--muted);
  font-weight: 600;
}

.backoffice-empty {
  padding: 24px 12px !important;
  color: #7b8794;
  text-align: center !important;
}

.user-center-messages-card {
  padding: 18px;
}

.user-center-section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.user-center-section-header h2,
.user-center-section-header p {
  margin: 0;
}

.user-center-section-header p {
  margin-top: 4px;
  color: var(--muted);
}

.user-center-message-list {
  display: grid;
  gap: 10px;
}

.user-center-message-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffdf9;
  color: inherit;
  text-decoration: none;
}

.user-center-message-row:hover {
  border-color: rgba(125, 143, 118, 0.55);
  box-shadow: 0 8px 18px rgba(74, 64, 56, 0.08);
}

.user-center-message-row.is-unread {
  border-color: rgba(180, 138, 90, 0.62);
  background: #fff8ed;
}

.user-center-message-main {
  min-width: 0;
}

.user-center-message-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.user-center-message-title strong,
.user-center-message-row p,
.user-center-message-row small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-center-message-title strong {
  max-width: min(420px, 100%);
  white-space: nowrap;
}

.user-center-message-row p,
.user-center-message-row small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  white-space: nowrap;
}

.user-center-message-row time {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.status-pill {
  display: inline-block;
  white-space: nowrap;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pill.active {
  background: #e3f9e5;
  color: #1b8a3d;
}

.status-pill.inactive {
  background: #ffe3e3;
  color: #c92a2a;
}

.role-pill {
  display: inline-block;
  white-space: nowrap;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
}

.backoffice-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

.backoffice-detail-grid dt {
  color: #52606d;
  font-size: 0.85rem;
}

.backoffice-detail-grid dd {
  margin: 0;
  font-weight: 600;
}

.backoffice-pagination {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.backoffice-card .form-field {
  margin-bottom: 16px;
}

.backoffice-card .form-field label {
  display: block;
  margin-bottom: 6px;
  color: #52606d;
  font-weight: 600;
}

.backoffice-card .form-field input,
.backoffice-card .form-field textarea,
.backoffice-card .form-field select {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.backoffice-card .form-field select { appearance: auto; -webkit-appearance: auto; }
.backoffice-card .form-field input:focus,
.backoffice-card .form-field textarea:focus,
.backoffice-card .form-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(125, 143, 118, 0.18); }

.tour-order-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.tour-order-form-grid .form-field { margin-bottom: 12px; }
.tour-order-form-grid textarea { min-height: 76px; }
.tour-order-form-grid .form-field-wide { grid-column: 1 / -1; }
@media (max-width: 680px) { .tour-order-form-grid { grid-template-columns: 1fr; } .tour-order-form-grid .form-field-wide { grid-column: auto; } }

.tour-order-form-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.tour-order-form-section:first-of-type {
  padding-top: 0;
}

.tour-order-form-section h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.tour-order-form-grid.compact {
  gap: 0 12px;
}

.tour-order-form-grid.compact .form-field {
  margin-bottom: 10px;
}

.tour-order-form-grid.compact textarea {
  min-height: 70px;
}

.tour-order-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-paste-panel { margin-bottom: 24px; padding: 18px; border: 1px dashed var(--gold); border-radius: 8px; background: var(--primary-soft); }
.quick-paste-panel h2, .quick-paste-panel p { margin: 0; }
.quick-paste-panel textarea { width: 100%; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; resize: vertical; }
.quick-paste-panel.compact { margin-bottom: 14px; padding: 14px; }
.quick-paste-panel.compact textarea { min-height: 86px; }

.settlement-form-sections, .settlement-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settlement-form-section { padding: 18px; border: 1px solid var(--border); border-radius: 8px; }
.income-section, .settlement-income-card { border-top: 3px solid var(--primary); }
.expenses-section, .settlement-expenses-card { border-top: 3px solid var(--gold); }
.settlement-profit-card { border-top: 3px solid var(--nav); }
.settlement-table-wrap { width: 100%; }
.settlement-table { min-width: 980px; }
.settlement-table th { white-space: nowrap; }
.settlement-card-list { display: none; }
@media (max-width: 680px) { .settlement-form-sections, .settlement-summary-grid { grid-template-columns: 1fr; } }

@media (max-width: 680px) {
  .user-center-messages-card {
    padding: 14px;
  }

  .user-center-message-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .user-center-message-row p,
  .user-center-message-row small {
    white-space: normal;
  }

  .user-center-message-row time {
    justify-self: start;
  }
}

.backoffice-card .form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.backoffice-conversation {
  display: grid;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.backoffice-conversation:first-of-type {
  border-top: 0;
}

.backoffice-conversation-list {
  display: grid;
  gap: 12px;
}

.backoffice-conversation-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffdf9;
}

.backoffice-conversation-row.is-unread {
  border-color: rgba(180, 138, 90, 0.62);
  background: #fff8ed;
}

.backoffice-conversation-row p,
.backoffice-conversation-row small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
}

.backoffice-conversation-row aside {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.backoffice-conversation > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.backoffice-conversation > header p {
  margin: 4px 0 0;
  color: var(--muted);
}

.backoffice-thread .conversation-message {
  max-width: 92%;
}

.backoffice-reply-form {
  display: grid;
  gap: 10px;
}

.backoffice-reply-form label {
  font-weight: 750;
}

.backoffice-reply-form textarea {
  width: 100%;
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 13px;
  font: inherit;
}

.backoffice-reply-form .button {
  justify-self: start;
}

.form-error {
  color: #c92a2a;
  margin: 4px 0;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.calendar-toolbar h2 {
  margin: 0;
}

.calendar-selected-card {
  margin-top: 16px;
}

.calendar-selected-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.calendar-selected-heading h2,
.calendar-selected-heading p {
  margin: 0;
}

.calendar-selected-heading p {
  color: var(--muted);
}

.calendar-selected-count {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 800;
}

.calendar-selected-tours {
  display: grid;
  gap: 12px;
}

.calendar-tour-card {
  border: 1px solid #dbe4ee;
  border-left: 5px solid #829ab1;
  border-radius: 14px;
  background: #f8fafc;
  padding: 14px;
}

.calendar-tour-card.status-confirmed { border-left-color: #1b8a3d; }
.calendar-tour-card.status-pending { border-left-color: #d9822b; }
.calendar-tour-card.status-completed { border-left-color: #2680c2; }
.calendar-tour-card.status-cancelled { border-left-color: #c92a2a; }

.calendar-tour-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.calendar-tour-order {
  color: #1d4ed8;
  font-weight: 800;
  font-size: 1.05rem;
}

.calendar-tour-details {
  display: grid;
  gap: 8px;
  margin: 0;
}

.calendar-tour-details div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
}

.calendar-tour-details dt {
  color: var(--muted);
  font-size: 0.82rem;
}

.calendar-tour-details dd {
  margin: 0;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays > div {
  padding: 4px 2px;
  color: #52606d;
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 7px 4px;
  border: 1px solid #e4e7eb;
  border-radius: 9px;
  background: #fff;
  color: #1f2933;
  text-decoration: none;
}

.calendar-day.outside-month {
  background: #f7f8fa;
}

.calendar-day.has-events {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.calendar-day.has-events.status-pending {
  background: #d9822b;
  border-color: #d9822b;
}

.calendar-day.has-events.status-confirmed {
  background: #10b981;
  border-color: #10b981;
}

.calendar-day.has-events.status-completed {
  background: #2680c2;
  border-color: #2680c2;
}

.calendar-day.has-events.status-cancelled {
  background: #c92a2a;
  border-color: #c92a2a;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px #2680c2;
}

.calendar-day.selected {
  box-shadow: inset 0 0 0 3px #1d4ed8;
}

.calendar-day-number {
  color: inherit;
  font-size: 1rem;
  font-weight: 800;
}

.calendar-day-count {
  position: absolute;
  right: 7px;
  bottom: 4px;
  color: inherit;
  font-size: 0.7rem;
  font-weight: 800;
}

.calendar-events {
  display: grid;
  gap: 5px;
}

.calendar-event {
  display: grid;
  gap: 2px;
  padding: 6px;
  border-left: 3px solid #829ab1;
  background: #f0f4f8;
  color: #1f2933;
  font-size: 0.75rem;
  text-decoration: none;
}

.calendar-event:hover {
  background: #d9eaf7;
}

.calendar-event span,
.calendar-event small {
  color: #52606d;
}

.calendar-event.status-confirmed {
  border-left-color: #1b8a3d;
}

.calendar-event.status-pending {
  border-left-color: #d9822b;
}

.calendar-event.status-completed {
  border-left-color: #2680c2;
}

.calendar-event.status-cancelled {
  border-left-color: #c92a2a;
}

/* Responsive safety net for shared site and backoffice surfaces. */
html,
body {
  overflow-x: clip;
}

.site-main,
.backoffice-main,
.backoffice-card,
.form-card,
.feature-card,
.route-card,
.destination-card,
.day-card {
  min-width: 0;
}

.backoffice-card {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.backoffice-table {
  min-width: 720px;
}

.backoffice-table td,
.backoffice-table th,
.backoffice-detail-grid dd,
.site-message,
.field-help,
.form-help {
  overflow-wrap: anywhere;
}

.backoffice-search input[type="text"],
.backoffice-card .form-field input,
.backoffice-card .form-field textarea,
.backoffice-card .form-field select {
  max-width: 100%;
}

@media (max-width: 1024px) {
  .backoffice-main {
    max-width: none;
    padding: 26px 18px 48px;
  }

  .backoffice-header {
    grid-template-columns: minmax(170px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 10px 14px;
  }

  .backoffice-nav a {
    margin: 0 3px;
    font-size: 0.9rem;
  }

  .backoffice-page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .backoffice-page-heading > div {
    min-width: 0;
  }

  .calendar-card {
    padding: 18px;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: static;
  }

  .topbar-right,
  .backoffice-account-nav {
    flex-wrap: wrap;
    white-space: normal;
  }

  .backoffice-header {
    padding: 12px 16px;
  }

  .backoffice-header .brand {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .backoffice-main {
    padding: 20px 16px 40px;
  }

  .backoffice-card {
    padding: 18px;
    border-radius: 8px;
  }

  .backoffice-page-heading > .button,
  .backoffice-page-heading > div:last-child .button {
    flex: 1 1 auto;
  }

  .backoffice-search {
    flex-wrap: wrap;
  }

  .backoffice-search input[type="text"],
  .backoffice-search .button {
    flex: 1 1 100%;
  }

  .settlement-search {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settlement-search .button {
    width: 100%;
  }

  .backoffice-pagination {
    flex-wrap: wrap;
    align-items: center;
  }

  .backoffice-detail-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .backoffice-detail-grid dt {
    margin-top: 10px;
  }

  .backoffice-detail-grid dd {
    font-weight: 500;
  }

  .calendar-toolbar {
    flex-wrap: wrap;
  }

  .calendar-toolbar h2 {
    flex: 1 1 100%;
    order: -1;
    text-align: center;
  }

  .calendar-grid {
    min-width: 0;
  }

  .calendar-day {
    min-height: 46px;
  }

  .quick-paste-panel {
    padding: 14px;
  }

  .quick-paste-panel .backoffice-page-heading .button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .site-main {
    padding-bottom: 32px;
  }

  .site-footer {
    padding-inline: 16px;
  }

  .topbar-right .button-outline,
  .backoffice-account-nav a,
  .backoffice-account-nav span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .backoffice-page-heading h1,
  .backoffice-page-heading h2 {
    overflow-wrap: anywhere;
  }

  .backoffice-card .button,
  .backoffice-pagination .button {
    min-height: 40px;
  }
}

/* Mobile admin navigation and compact operational surfaces. */
.backoffice-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 2;
}

.backoffice-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.backoffice-menu-panel {
  display: contents;
}

.backoffice-menu-panel {
  min-width: 0;
}

.backoffice-nav {
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0 6px;
  min-width: 0;
  white-space: nowrap;
}

.backoffice-account-nav {
  grid-column: 3;
  flex: 0 1 auto;
  min-width: 0;
}

@media (max-width: 760px) {
  .backoffice-header {
    position: sticky;
    top: 0;
    z-index: 20;
  }

  .backoffice-header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .backoffice-menu-toggle {
    display: block;
    align-self: center;
  }

  .backoffice-menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .backoffice-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .backoffice-menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .backoffice-menu-panel {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    position: relative;
    z-index: 1;
  }

  .backoffice-menu-panel.is-open {
    display: grid;
    gap: 12px;
  }

  .backoffice-nav,
  .backoffice-account-nav {
    display: grid;
    width: 100%;
    gap: 2px;
    margin: 0;
    overflow: visible;
    white-space: normal;
  }

  .backoffice-nav a,
  .backoffice-account-nav a,
  .backoffice-admin-name {
    display: block;
    margin: 0;
    padding: 10px 4px;
  }

  .backoffice-nav .backoffice-message-bell {
    display: inline-flex;
    width: 40px;
    height: 40px;
    margin: 4px 0;
    padding: 0;
  }

  .backoffice-admin-name {
    max-width: none;
  }

  .backoffice-nav a:hover,
  .backoffice-nav a.active {
    padding-bottom: 10px;
    border-bottom: 0;
    border-left: 3px solid var(--gold);
    padding-left: 10px;
    background: rgba(255, 255, 255, 0.08);
  }

  .backoffice-account-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 8px;
  }

  .backoffice-main {
    padding: 16px 12px 32px;
  }

  .backoffice-main > h1,
  .backoffice-page-heading h1 {
    font-size: 1.65rem;
    line-height: 1.2;
  }

  .backoffice-page-heading {
    gap: 10px;
  }

  .backoffice-page-heading .button,
  .backoffice-page-heading > div:last-child {
    width: 100%;
  }

  .backoffice-page-heading > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .backoffice-page-heading > div:last-child .button {
    flex: 1 1 130px;
  }

  .backoffice-card {
    padding: 14px;
    margin-top: 12px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .summary-stat {
    min-height: 0;
  }

  .backoffice-table {
    min-width: 580px;
    font-size: 0.82rem;
  }

  .backoffice-table th,
  .backoffice-table td {
    padding: 8px 9px;
    vertical-align: top;
  }

  .backoffice-search {
    gap: 8px;
  }

  .backoffice-search input[type="text"],
  .backoffice-search .button {
    min-height: 42px;
  }

  .tour-order-form-grid,
  .settlement-form-sections,
  .settlement-summary-grid,
  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .tour-order-form-grid .form-field,
  .backoffice-card .form-field {
    margin-bottom: 10px;
  }

  .backoffice-card .form-field input,
  .backoffice-card .form-field select,
  .backoffice-card .form-field textarea {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 16px;
  }

  .backoffice-card .form-field textarea,
  .quick-paste-panel textarea {
    min-height: 96px;
  }

  .quick-paste-panel {
    margin-bottom: 16px;
    padding: 14px;
  }

  .quick-paste-panel .backoffice-page-heading {
    display: block;
  }

  .quick-paste-panel .button {
    width: 100%;
    margin-top: 12px;
  }

  .settlement-form-section {
    padding: 14px;
  }

  .settlement-table-wrap {
    display: none;
  }

  .settlement-card-list {
    display: grid;
    gap: 12px;
  }

  .settlement-mobile-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
  }

  .settlement-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }

  .settlement-card-label {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .settlement-card-key-fields {
    display: grid;
    gap: 8px;
    margin: 0;
  }

  .settlement-card-key-fields div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }

  .settlement-card-key-fields dt {
    color: var(--muted);
    font-size: 0.82rem;
  }

  .settlement-card-key-fields dd {
    margin: 0;
    font-weight: 650;
  }

  .settlement-card-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.82rem;
  }

  .settlement-card-secondary span {
    padding: 3px 7px;
    border-radius: 999px;
    background: #f3f4f6;
  }

  .calendar-card {
    padding: 12px;
  }

  .calendar-toolbar .button {
    flex: 1 1 0;
    min-height: 40px;
  }

  .calendar-grid {
    min-width: 0;
  }

  .calendar-weekdays > div {
    padding: 8px 4px;
    font-size: 0.68rem;
  }

  .calendar-day {
    min-height: 44px;
    padding: 5px;
  }

  .calendar-event {
    padding: 5px;
    font-size: 0.68rem;
  }

  .calendar-event small:nth-of-type(2) {
    display: none;
  }

  .dashboard-shortcuts {
    display: grid;
    gap: 8px;
  }

  .dashboard-shortcuts .button {
    width: 100%;
  }

  .backoffice-card > .backoffice-table:first-child,
  .backoffice-card > .backoffice-table + .backoffice-pagination {
    min-width: 0;
  }
}

/* Public destination and route pages share the same visual rhythm in both languages. */
.destinations-page,
.popular-routes-page,
.route-detail-page,
.itinerary-page {
  min-width: 0;
}

.destinations-page .trip-heading,
.popular-routes-page .trip-heading {
  margin-bottom: 26px;
}

.destinations-page .trip-heading h1,
.popular-routes-page .trip-heading h1,
.route-detail-page h1,
.itinerary-page h1 {
  overflow-wrap: anywhere;
}

.destinations-page .section-header,
.popular-routes-page .section-header,
.route-detail-page .form-actions,
.itinerary-page .itinerary-actions {
  gap: 14px;
}

.destination-card,
.route-card,
.route-detail-summary,
.route-map-placeholder,
.itinerary-page .itinerary-summary,
.itinerary-page .day-card {
  min-width: 0;
}

.destination-card p,
.route-card p,
.route-detail-page p,
.itinerary-page p,
.destination-tags span,
.route-tags span {
  overflow-wrap: anywhere;
}

.destination-official-link,
.route-card-action,
.destination-add-button,
.route-detail-actions .button,
.itinerary-actions .button {
  min-height: 42px;
  align-items: center;
  justify-content: center;
}

html[lang="zh-CN"] .destinations-page,
html[lang="zh-CN"] .popular-routes-page,
html[lang="zh-CN"] .route-detail-page,
html[lang="zh-CN"] .itinerary-page {
  letter-spacing: 0;
}

html[lang="zh-CN"] .destination-card p,
html[lang="zh-CN"] .route-card p,
html[lang="zh-CN"] .route-detail-page p,
html[lang="zh-CN"] .itinerary-page p {
  line-height: 1.78;
}

@media (max-width: 760px) {
  .destinations-page .trip-heading,
  .popular-routes-page .trip-heading {
    margin-bottom: 20px;
  }

  .destinations-page .section-header,
  .popular-routes-page .section-header {
    align-items: flex-start;
  }

  .tab-list {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tab {
    flex: 0 0 auto;
  }

  .destination-card,
  .route-card {
    min-height: 0;
    padding: 20px;
    border-radius: 20px;
  }

  .route-card-action,
  .destination-add-button,
  .route-detail-actions .button,
  .itinerary-actions .button,
  .itinerary-actions form {
    width: 100%;
  }

  .route-detail-actions,
  .itinerary-actions {
    align-items: stretch;
  }
}

/* Main site mobile navigation: desktop stays unchanged, phone uses one menu panel. */
.site-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
}

.site-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-menu-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.2vw, 22px);
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 760px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: min(var(--container), calc(100% - (var(--gutter) * 2)));
  }

  .site-menu-toggle {
    display: block;
    position: relative;
    z-index: 2;
    align-self: center;
  }

  .site-menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .site-menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .site-menu-panel {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .site-menu-panel.is-open {
    display: grid;
    gap: 14px;
  }

  .site-menu-panel .main-nav,
  .site-menu-panel .topbar-right {
    display: grid;
    width: 100%;
    gap: 3px;
    margin: 0;
    overflow: visible;
    white-space: normal;
  }

  .site-menu-panel .main-nav a,
  .site-menu-panel .plan-trip-menu,
  .site-menu-panel .topbar-right > a,
  .site-menu-panel .lang-switch,
  .site-menu-panel .user-menu {
    width: 100%;
  }

  .site-menu-panel .user-chip {
    max-width: 100%;
    width: 100%;
  }

  .site-menu-panel .main-nav a {
    padding: 10px 4px;
  }

  .site-menu-panel .plan-trip-menu > summary {
    width: 100%;
    justify-content: space-between;
    padding: 10px 4px;
  }

  .site-menu-panel .plan-trip-menu-list {
    position: static;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 2px 0 4px 14px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  .site-menu-panel .plan-trip-menu-list a {
    padding: 8px 4px;
  }

  .site-menu-panel .topbar-right {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 10px;
  }

  .site-menu-panel .topbar-right > a {
    justify-content: flex-start;
  }

  .site-menu-panel .lang-switch {
    justify-content: flex-start;
    min-height: 40px;
  }

  .site-menu-panel .user-menu-panel {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 800px) {
  .calendar-card {
    overflow-x: visible;
  }

  .calendar-grid {
    min-width: 0;
  }
}

/* Phone-only refinements for dense planning and Backoffice controls. */
@media (max-width: 520px) {
  .quick-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .quick-actions .button {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
    font-size: 0.9rem;
  }

  .trip-list-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .trip-list-actions form,
  .trip-list-actions .button,
  .trip-list-actions .trip-pdf-button {
    width: 100%;
    min-width: 0;
  }

  .field-group input,
  .field-group select,
  .field-group textarea,
  .ai-trip-planner textarea {
    box-sizing: border-box;
    max-width: 100%;
  }

  .site-menu-panel .topbar-right {
    gap: 6px;
  }

  .site-menu-panel .topbar-right > a,
  .site-menu-panel .user-chip,
  .site-menu-panel .lang-switch {
    min-height: 42px;
  }

  .site-menu-panel .message-bell {
    width: 42px;
    justify-content: center;
  }

  .ai-trip-float:not(.ai-trip-login-prompt) .ai-trip-float-button {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
  }

  .ai-trip-float:not(.ai-trip-login-prompt) .ai-trip-float-button > span:last-child {
    display: none;
  }

  .ai-trip-login-prompt .ai-trip-float-button {
    min-width: 0;
    max-width: calc(100vw - 24px);
    min-height: 48px;
    padding-inline: 14px;
    font-size: 0.78rem;
    white-space: normal;
  }

  .ai-trip-popup {
    position: fixed;
    right: 12px;
    bottom: 76px;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }

  .ai-trip-popup .ai-trip-planner {
    max-height: calc(100dvh - 96px);
    padding: 16px;
  }

  .backoffice-header-inner {
    gap: 8px;
  }

  .backoffice-nav,
  .backoffice-account-nav {
    gap: 4px;
  }

  .backoffice-nav a,
  .backoffice-account-nav a,
  .backoffice-admin-name {
    padding-block: 11px;
  }

  .backoffice-nav .backoffice-message-bell {
    margin: 2px 0;
  }

  .user-center-table,
  .admin-management-table,
  .guide-vehicle-table {
    display: block;
    min-width: 0;
    font-size: 0.86rem;
  }

  .user-center-table thead,
  .admin-management-table thead,
  .guide-vehicle-table thead {
    display: none;
  }

  .user-center-table tbody,
  .admin-management-table tbody,
  .guide-vehicle-table tbody,
  .user-center-table tr,
  .admin-management-table tr,
  .guide-vehicle-table tr {
    display: block;
  }

  .user-center-table tr,
  .admin-management-table tr,
  .guide-vehicle-table tr {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
  }

  .user-center-table td,
  .admin-management-table td,
  .guide-vehicle-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 6px 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .user-center-table td::before,
  .admin-management-table td::before,
  .guide-vehicle-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
  }

  .admin-management-table td form,
  .admin-management-table td .button {
    width: 100%;
  }
}

/* Mobile navigation is deliberately one vertical column.  The source order
   controls the requested top-to-bottom order, while these rules prevent older
   flex/grid declarations from creating parallel columns. */
@media (max-width: 760px) {
  .site-menu-panel.is-open,
  .backoffice-menu-panel.is-open {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch;
  }

  .backoffice-menu-panel.is-open {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: calc(100dvh - 78px);
  }

  .site-menu-panel.is-open > .main-nav,
  .site-menu-panel.is-open > .topbar-right,
  .backoffice-menu-panel.is-open > .backoffice-nav,
  .backoffice-menu-panel.is-open > .backoffice-account-nav {
    grid-column: 1 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }

  .site-menu-panel.is-open > .main-nav { order: 1; }
  .site-menu-panel.is-open > .topbar-right { order: 2; }
  .backoffice-menu-panel.is-open > .backoffice-nav {
    display: grid !important;
    grid-row: 1;
    order: 1;
    align-content: start;
  }
  .backoffice-menu-panel.is-open > .backoffice-account-nav {
    display: grid !important;
    grid-row: 2;
    order: 2;
    align-content: end;
  }

  .site-menu-panel .main-nav,
  .site-menu-panel .topbar-right,
  .backoffice-menu-panel .backoffice-nav,
  .backoffice-menu-panel .backoffice-account-nav {
    justify-items: stretch;
  }

  .site-menu-panel .main-nav > *,
  .site-menu-panel .topbar-right > *,
  .backoffice-menu-panel .backoffice-nav > *,
  .backoffice-menu-panel .backoffice-account-nav > * {
    min-width: 0;
  }

  /* Public: trip links, then a compact tools row, then the account menu. */
  .site-menu-panel .main-nav { gap: 2px; }
  .site-menu-panel .topbar-right {
    grid-template-columns: minmax(0, 1fr) 38px auto !important;
    align-items: center;
    gap: 8px;
  }
  .site-menu-panel .topbar-right .lang-switch { order: 1; }
  .site-menu-panel .topbar-right .message-bell { order: 2; }
  .site-menu-panel .topbar-right .user-menu { order: 3; }
  .site-menu-panel .topbar-right > .button-outline { order: 2; }

  .site-menu-panel .topbar-right .lang-switch {
    padding: 8px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 40px;
  }

  .site-menu-panel .topbar-right .message-bell { grid-column: 2; }
  .site-menu-panel .topbar-right > .button-outline {
    grid-column: 3;
    width: auto;
    min-height: 38px;
    padding: 7px 12px;
  }
  .site-menu-panel .topbar-right .user-menu {
    grid-column: 1 / -1;
    width: 100%;
  }

  .site-menu-panel .message-bell,
  .backoffice-menu-panel .backoffice-message-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 8px;
  }

  .site-menu-panel .user-menu,
  .backoffice-menu-panel .backoffice-account-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 8px;
  }

  .site-menu-panel .user-chip,
  .backoffice-menu-panel .backoffice-admin-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Admin: operational links and bell first; the account area stays at bottom. */
  .backoffice-menu-panel .backoffice-nav { gap: 2px; }
  .backoffice-menu-panel .backoffice-account-nav {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px;
    margin-top: 16px;
  }
  .backoffice-menu-panel .backoffice-admin-name {
    grid-column: 1 / -1;
    width: 100%;
  }
  .backoffice-menu-panel .backoffice-account-nav a {
    min-height: 38px;
    padding: 8px 12px;
  }
  .backoffice-menu-panel .backoffice-account-nav a:last-child {
    grid-column: 2;
  }
  .backoffice-menu-panel .backoffice-account-nav a:nth-child(2) {
    grid-column: 1;
  }
  .backoffice-menu-panel .backoffice-message-bell { margin: 6px 0 4px; }

  body.site-mobile-menu-open .ai-trip-float { display: none; }
}

/* Shared compact tap targets for phone actions; desktop/tablet stay unchanged. */
@media (max-width: 520px) {
  .button,
  .button-primary,
  .button-secondary,
  .button-outline,
  .backoffice-card .button,
  .backoffice-page-heading .button,
  .itinerary-actions .button,
  .trip-list-actions .button {
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 10px;
    line-height: 1.2;
    white-space: normal;
  }

  /* Keep primary trip actions compact even when a parent grid/card stretches. */
  .form-actions .button,
  .quick-actions .button,
  .plan-actions .button,
  .itinerary-actions .button,
  .itinerary-actions form,
  .itinerary-actions form .button,
  .route-detail-actions .button {
    height: 42px;
    min-height: 42px;
    flex: 0 0 42px;
    align-self: center;
  }

  .itinerary-actions form {
    display: inline-flex;
    align-items: center;
  }

  .itinerary-actions > .button,
  .itinerary-actions > form,
  .itinerary-actions > form .button {
    width: 100% !important;
  }

  /* The anonymous launcher keeps its login destination and accessible text,
     but has the same compact visual footprint as the signed-in AI button. */
  .ai-trip-login-prompt .ai-trip-float-button {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    max-width: 52px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
    white-space: nowrap;
  }

  .ai-trip-login-prompt .ai-trip-float-button::before {
    content: "AI";
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0;
  }
}

/* Mobile drawer final layout: keep the account, navigation and actions in clear rows. */
@media (max-width: 760px) {
  .site-menu-panel.is-open,
  .backoffice-menu-panel.is-open {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
  }

  .site-mobile-account {
    display: block !important;
    order: 1;
    width: 100%;
    margin: 0;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .site-mobile-account .user-chip {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 6px 0;
  }

  .site-mobile-account .user-chip::before {
    content: "👤";
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(245, 228, 207, 0.22);
    font-size: 1.1rem;
  }

  .site-mobile-account .user-chip::after,
  .backoffice-menu-panel .backoffice-admin-name::after {
    content: "⌄";
    grid-column: 3;
    grid-row: 1;
    color: #f8e6d1;
    font-size: 1.15rem;
  }

  .site-mobile-account .user-chip-label,
  .backoffice-menu-panel .backoffice-admin-email {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-menu-panel.is-open > .main-nav {
    display: grid !important;
    order: 2;
    width: 100%;
    margin: 12px 0 0;
  }

  .site-menu-panel.is-open > .topbar-right {
    display: grid !important;
    order: 3;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    margin: 14px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    align-items: stretch;
  }

  .site-menu-panel .topbar-right .lang-switch {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 36px;
    padding: 0 4px;
  }

  .site-menu-panel .topbar-right .message-bell,
  .site-menu-panel .topbar-right > .button-outline {
    grid-row: 2;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .site-menu-panel .topbar-right .message-bell {
    grid-column: 1 !important;
    display: inline-flex;
    gap: 7px;
    justify-content: center;
  }

  .site-menu-panel .topbar-right > .button-outline {
    grid-column: 2 !important;
  }

  .site-menu-panel .message-bell-label,
  .backoffice-message-label {
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .backoffice-menu-panel.is-open > .backoffice-account-nav {
    display: block !important;
    order: 1;
    width: 100%;
    margin: 0;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .backoffice-menu-panel .backoffice-admin-name {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 6px 0;
  }

  .backoffice-menu-panel .backoffice-admin-name::before {
    content: "👤";
    display: grid;
    grid-column: 1;
    grid-row: 1;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(245, 228, 207, 0.22);
    font-size: 1.25rem;
  }

  .backoffice-menu-panel .backoffice-admin-email {
    grid-column: 2;
    grid-row: 1;
  }

  .backoffice-menu-panel.is-open > .backoffice-nav {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    order: 2;
    width: 100%;
    margin: 12px 0 0;
  }

  .backoffice-menu-panel.is-open > .backoffice-bottom-nav {
    display: grid !important;
    order: 3;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .backoffice-bottom-nav .backoffice-message-bell,
  .backoffice-bottom-nav .backoffice-back-to-site {
    display: inline-flex;
    width: 100% !important;
    min-width: 0;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 8px 10px;
    gap: 7px;
    justify-content: center;
    border-radius: 10px;
  }
}

/* Final itinerary grid placement. This follows legacy itinerary rules so it
   intentionally owns the visual order without changing the mobile DOM order. */
/* Compact, native disclosure for already-scheduled interest matches. */
.interest-matching {
  padding: 18px;
}

.interest-matching h2 {
  margin-bottom: 10px;
}

.interest-matching-group + .interest-matching-group {
  margin-top: 14px;
}

.interest-matching-group {
  border: 1px solid var(--border, #e5ddd1);
  border-radius: 10px;
  background: #fffdf9;
}

.interest-matching-group > summary {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.interest-matching-group > summary::-webkit-details-marker { display: none; }

.interest-matching-group > summary::after {
  content: "⌄";
  margin-left: auto;
  color: var(--primary);
  font-size: 1rem;
  transition: transform 160ms ease;
}

.interest-matching-group[open] > summary {
  border-bottom: 1px solid var(--border, #e5ddd1);
}

.interest-matching-group[open] > summary::after {
  transform: rotate(180deg);
}

.interest-matching-scheduled-list {
  padding: 8px;
}

.interest-matching-context,
.interest-matching-note,
.interest-matching-disclaimer {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.interest-matching-context {
  margin-bottom: 12px;
}

/* A recommendation is opt-in: match the compact must-visit choice treatment
   without making scheduled matches interactive. */
.interest-recommendation-form {
  padding: 10px;
}

.interest-recommendation-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
}

.interest-recommendation-card > input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.interest-recommendation-card:has(> input:checked) {
  border-color: var(--primary);
  background: #f0f4ec;
}

.interest-recommendation-content {
  min-width: 0;
  cursor: pointer;
}

.interest-recommendation-card > a {
  grid-column: 2;
}

.interest-recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.interest-recommendation-actions[hidden] {
  display: none;
}

.interest-recommendation-actions > span {
  color: var(--text-muted, #6d675f);
  font-size: 0.82rem;
}

.interest-recommendation-actions .button {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.9rem;
}

.interest-recommendation-results {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.interest-recommendation-result {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.interest-recommendation-result.is-added {
  background: #edf4e9;
  color: #38543a;
}

.interest-recommendation-result.is-unmet {
  background: #fff5da;
  color: #6f5517;
}

.itinerary-must-visit-warning > strong,
.itinerary-info > strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.25;
}

.itinerary-must-visit-warning .itinerary-warning-entry + .itinerary-warning-entry {
  margin-top: 6px;
}

.itinerary-must-visit-warning .itinerary-warning-entry p {
  margin: 0;
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.itinerary-must-visit-warning .itinerary-warning-contact {
  margin: 12px 0 0;
  font-weight: 400;
}

.itinerary-must-visit-warning .itinerary-warning-contact a {
  font-weight: 700;
}

@media (max-width: 760px) {
  .activity-cost-summary {
    gap: 12px;
    padding: 16px;
  }

  .activity-cost-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    align-items: start;
    padding-bottom: 10px;
  }

  .activity-cost-total {
    justify-content: flex-start;
    min-width: 0;
    text-align: left;
  }

  .activity-cost-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 7px 0;
  }

  .activity-cost-row strong {
    font-size: 0.84rem;
    white-space: nowrap;
  }
}

/* Desktop public navigation shares one baseline across links and dropdowns. */
@media (min-width: 761px) {
  .site-header .main-nav > a,
  .site-header .plan-trip-menu > summary,
  .site-header .site-desktop-account .user-chip {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .site-header .plan-trip-menu > summary {
    gap: 6px;
    flex-wrap: nowrap;
  }
}

/* At compact desktop widths, use the existing menu control rather than
   squeezing or wrapping navigation labels. */
@media (min-width: 761px) and (max-width: 1080px) {
  .site-header .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .site-header .site-menu-toggle {
    display: block;
    position: relative;
    z-index: 2;
    align-self: center;
  }

  .site-header .site-menu-panel {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .site-header .site-menu-panel.is-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .site-header .site-menu-panel.is-open > .main-nav,
  .site-header .site-menu-panel.is-open > .topbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
  }

  .site-header .site-menu-panel.is-open > .main-nav {
    justify-content: flex-start;
    gap: 8px 18px;
  }

  .site-header .site-menu-panel.is-open > .topbar-right {
    justify-content: flex-start;
  }
}

.itinerary-layout,
.itinerary-layout > *,
.itinerary-content,
.itinerary-summary,
.itinerary-days,
.day-card,
.activity-cost-summary,
.itinerary-map-sidebar,
.itinerary-map-card {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 901px) {
  .itinerary-layout {
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 24px;
    align-items: start;
  }

  .itinerary-content {
    display: contents;
  }

  .itinerary-summary,
  .interest-matching,
  .itinerary-mobile-day-nav {
    grid-column: 1 / -1;
  }

  .itinerary-summary {
    grid-row: 1;
  }

  .itinerary-layout.has-interest-matching .interest-matching {
    grid-row: 2;
  }

  .itinerary-layout.has-interest-matching .itinerary-mobile-day-nav {
    grid-row: 3;
  }

  .itinerary-layout:not(.has-interest-matching) .itinerary-mobile-day-nav {
    grid-row: 2;
  }

  .itinerary-days,
  .activity-cost-summary,
  .itinerary-actions {
    grid-column: 1;
  }

  .itinerary-layout.has-interest-matching .itinerary-days {
    grid-row: 4;
  }

  .itinerary-layout:not(.has-interest-matching) .itinerary-days {
    grid-row: 3;
  }

  .itinerary-map-sidebar {
    grid-column: 2;
    position: sticky;
    top: calc(var(--itinerary-navbar-height, 72px) + var(--itinerary-day-navigation-height, 0px) + 18px);
    align-self: start;
    width: 100%;
  }

  .itinerary-layout.has-interest-matching .itinerary-map-sidebar {
    grid-row: 4;
  }

  .itinerary-layout:not(.has-interest-matching) .itinerary-map-sidebar {
    grid-row: 3;
  }

  .itinerary-map-card,
  .itinerary-map {
    width: 100%;
  }

  .itinerary-map {
    height: clamp(360px, 36vw, 460px);
  }
}

.activity-cost-summary {
  gap: 12px;
  padding: 18px 20px;
}

.activity-cost-hero {
  padding-bottom: 10px;
}

.activity-cost-total {
  width: 100%;
  min-width: 0;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid rgba(74, 64, 56, 0.1);
}

@media (max-width: 900px) {
  .itinerary-page {
    width: min(calc(100% - 32px), 760px);
    margin-top: 18px;
  }

  .itinerary-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .itinerary-content {
    display: grid;
    gap: 18px;
    min-width: 0;
  }

  .itinerary-map-sidebar {
    position: static;
    order: 0;
    width: 100%;
  }

  .itinerary-map {
    height: clamp(280px, 64vw, 360px);
  }
}

@media (max-width: 760px) {
  .itinerary-page {
    width: min(calc(100% - 24px), 100%);
    margin-top: 14px;
  }

  .itinerary-page .timeline-item {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
  }

  .itinerary-page .itinerary-summary,
  .itinerary-page .interest-matching,
  .itinerary-page .itinerary-mobile-day-nav,
  .itinerary-page .itinerary-days,
  .itinerary-page .day-card,
  .itinerary-page .activity-cost-summary,
  .itinerary-page .itinerary-actions,
  .itinerary-page .itinerary-map-sidebar,
  .itinerary-page .itinerary-map-card {
    width: 100%;
    min-width: 0;
  }

  .itinerary-page .itinerary-days {
    grid-template-columns: minmax(0, 1fr);
  }

  .itinerary-page .timeline-time {
    font-size: 0.82rem;
  }

  .itinerary-page .timeline-time span {
    font-size: 0.72rem;
  }

  .itinerary-page .timeline-content,
  .itinerary-page .timeline-content h3,
  .itinerary-page .timeline-content p,
  .itinerary-page .item-details,
  .itinerary-page .day-meta {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .itinerary-page .activity-cost-summary {
    padding: 14px;
  }

  .itinerary-page .activity-cost-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .itinerary-page .activity-cost-row span {
    overflow-wrap: anywhere;
  }

  .itinerary-page .activity-cost-row strong {
    align-self: start;
    white-space: nowrap;
  }

  .itinerary-page .activity-cost-total {
    justify-content: flex-start;
  }

  .interest-matching { padding: 16px; }
  .interest-matching-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Keep the AI entry point a compact, dependable circle at every desktop zoom.
   The anonymous link retains its login destination; only its visible label is
   replaced by the compact AI mark. */
.ai-trip-float-button,
.ai-trip-login-prompt .ai-trip-float-button {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  white-space: nowrap;
}

.ai-trip-float-button > span:last-child {
  display: none !important;
}

.ai-trip-login-prompt .ai-trip-float-button::before {
  content: "AI";
  display: inline-grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0;
}

/* Keep the public desktop brand readable and align the home AI control with
   the centred content edge. Mobile retains its existing drawer positioning. */
@media (min-width: 761px) {
  .site-header .topbar-left,
  .site-header .brand {
    flex: 0 0 auto;
  }

  .site-header .brand {
    max-width: none;
  }

  .site-header .brand span {
    min-width: auto;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
  }

}

/* Desktop public pages share one launcher position based on the outer page
   container.  Narrow form cards deliberately do not affect this anchor. */
@media (min-width: 761px) {
  body {
    --ai-floating-container: var(--container);
    --ai-float-size: 52px;
    --ai-float-gap: 18px;
    --ai-float-edge: max(32px, env(safe-area-inset-right));
    --ai-float-right: max(
      var(--ai-float-edge),
      calc(
        (100vw - min(var(--ai-floating-container), calc(100vw - (var(--gutter) * 2)))) / 2
        - var(--ai-float-size) - var(--ai-float-gap)
      )
    );
    --ai-float-bottom: max(30px, env(safe-area-inset-bottom));
  }

  body:has(.site-main-itinerary) {
    --ai-floating-container: var(--itinerary-container);
  }

  .ai-trip-float {
    right: var(--ai-float-right);
    bottom: var(--ai-float-bottom);
  }
}

@media (min-width: 761px) {
  .message-bell-label,
  .backoffice-message-label {
    display: none;
  }
}

/* Final mobile drawer hierarchy: account, navigation, then bottom tools. */
@media (min-width: 761px) {
  .site-mobile-account {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-menu-panel.is-open {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .site-mobile-account {
    display: block;
    grid-column: 1;
    grid-row: 1;
    order: 1;
    width: 100%;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .site-menu-panel .site-desktop-account {
    display: none;
  }

  .site-menu-panel.is-open > .main-nav {
    grid-column: 1;
    grid-row: 2;
    order: 2;
  }

  .site-menu-panel.is-open > .topbar-right {
    display: grid !important;
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px;
    order: 3;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .site-menu-panel .topbar-right .lang-switch {
    grid-column: 1 / -1;
    order: 1;
    margin: 0;
    padding: 0 4px;
    border: 0;
  }

  .site-menu-panel .topbar-right .message-bell,
  .site-menu-panel .topbar-right > .button-outline {
    grid-row: 2;
    width: 100%;
    margin: 0;
  }

  .site-menu-panel .topbar-right .message-bell {
    grid-column: 1;
    order: 2;
    justify-self: stretch;
  }

  .site-menu-panel .topbar-right > .button-outline {
    grid-column: 2;
    order: 3;
    justify-self: stretch;
  }

  .backoffice-menu-panel.is-open {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .backoffice-menu-panel.is-open > .backoffice-account-nav {
    display: grid !important;
    grid-column: 1 !important;
    grid-row: 1;
    order: 1;
    margin: 0;
    padding: 0 0 14px;
  }

  .backoffice-menu-panel.is-open > .backoffice-nav {
    grid-column: 1 !important;
    grid-row: 2;
    order: 2;
  }

  .backoffice-menu-panel.is-open > .backoffice-bottom-nav {
    display: grid;
    grid-column: 1 !important;
    grid-row: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    order: 3;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .backoffice-user-menu {
    width: 100%;
  }

  .backoffice-menu-panel .backoffice-admin-name {
    cursor: pointer;
    list-style: none;
  }

  .backoffice-menu-panel .backoffice-admin-name::-webkit-details-marker {
    display: none;
  }

  .backoffice-menu-panel .backoffice-admin-name::after {
    content: "⌄";
    justify-self: end;
    color: #f8e6d1;
    font-size: 1.1rem;
  }

  .backoffice-user-menu-panel {
    display: grid;
    gap: 4px;
    margin: 6px 0 0 48px;
  }

  .backoffice-user-menu-panel a {
    display: block;
    padding: 8px 10px;
    border: 0 !important;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.76) !important;
  }

  .backoffice-bottom-nav .backoffice-message-bell,
  .backoffice-bottom-nav .backoffice-back-to-site {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.94);
  }

  .backoffice-bottom-nav .backoffice-message-bell {
    width: auto !important;
    height: auto !important;
    min-height: 42px !important;
    margin: 0 !important;
  }
}

/* A compact admin-dashboard treatment for the mobile panel only. */
@media (max-width: 760px) {
  .backoffice-header {
    background: linear-gradient(135deg, #342e29, #4a4038);
  }

  .backoffice-header .brand {
    display: grid;
    gap: 2px;
    line-height: 1.05;
  }

  .backoffice-header .brand::after {
    content: "Admin Dashboard";
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .backoffice-menu-panel.is-open {
    padding: 14px 0 12px;
    border-top-color: rgba(255, 255, 255, 0.18);
  }

  .backoffice-menu-panel .backoffice-nav {
    gap: 6px;
  }

  .backoffice-menu-panel .backoffice-nav > a:not(.backoffice-message-bell) {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    min-height: 48px;
    padding: 9px 12px;
    border-radius: 12px;
    border-left: 0;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
  }

  .backoffice-menu-panel .backoffice-nav > a:not(.backoffice-message-bell)::before {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #f5e4cf;
    font-size: 1.1rem;
    line-height: 1;
  }

  .backoffice-menu-panel .backoffice-nav > a:nth-child(1)::before { content: "▣"; }
  .backoffice-menu-panel .backoffice-nav > a:nth-child(2)::before { content: "≡"; }
  .backoffice-menu-panel .backoffice-nav > a:nth-child(3)::before { content: "▰"; }
  .backoffice-menu-panel .backoffice-nav > a:nth-child(4)::before { content: "$"; }
  .backoffice-menu-panel .backoffice-nav > a:nth-child(5)::before { content: "◯"; }

  .backoffice-menu-panel .backoffice-nav > a:not(.backoffice-message-bell):hover,
  .backoffice-menu-panel .backoffice-nav > a:not(.backoffice-message-bell).active {
    padding-left: 12px;
    border-left: 0;
    background: linear-gradient(90deg, #f8e6d1, #efe0cf);
    color: #46372e;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  }

  .backoffice-menu-panel .backoffice-nav > a:not(.backoffice-message-bell).active::before {
    color: #7b4d2d;
  }

  .backoffice-menu-panel .backoffice-account-nav {
    padding-top: 14px;
    border-top-color: rgba(255, 255, 255, 0.18);
  }

  .backoffice-menu-panel .backoffice-admin-name {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 8px 0;
    color: #ffffff;
    font-weight: 750;
  }

  .backoffice-menu-panel .backoffice-admin-name::before {
    content: "◯";
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(245, 228, 207, 0.22);
    color: #f8e6d1;
    font-size: 1.2rem;
  }

  .backoffice-menu-panel .backoffice-account-nav a {
    min-width: 0;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.92);
  }
}

/* Keep these final overrides after legacy mobile rules. */
@media (max-width: 760px) {
  .site-menu-panel.is-open,
  .backoffice-menu-panel.is-open {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
  }

  .site-mobile-account {
    display: block !important;
    order: 1;
    width: 100%;
    margin: 0;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .site-mobile-account .user-chip {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 6px 0;
  }

  .site-mobile-account .user-chip::before {
    content: "👤";
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(245, 228, 207, 0.22);
    font-size: 1.1rem;
  }

  .site-mobile-account .user-chip::after,
  .backoffice-menu-panel .backoffice-admin-name::after {
    content: "⌄";
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    color: #f8e6d1;
    font-size: 1.15rem;
  }

  .site-mobile-account .user-chip-label,
  .backoffice-menu-panel .backoffice-admin-email {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-menu-panel.is-open > .main-nav {
    display: grid !important;
    order: 2;
    width: 100%;
    margin: 12px 0 0;
  }

  .site-menu-panel.is-open > .topbar-right {
    display: grid !important;
    order: 3;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    margin: 14px 0 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .site-menu-panel .topbar-right .lang-switch {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 36px;
    padding: 0 4px;
    border: 0;
  }

  .site-menu-panel .topbar-right .message-bell,
  .site-menu-panel .topbar-right > .button-outline {
    grid-row: 2;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .site-menu-panel .topbar-right .message-bell {
    display: inline-flex;
    grid-column: 1 !important;
    gap: 7px;
    justify-content: center;
  }

  .site-menu-panel .topbar-right > .button-outline {
    grid-column: 2 !important;
  }

  .site-menu-panel .message-bell-label,
  .backoffice-message-label {
    display: inline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .backoffice-menu-panel.is-open > .backoffice-account-nav {
    display: block !important;
    order: 1;
    width: 100%;
    margin: 0;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .backoffice-menu-panel .backoffice-admin-name {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 6px 0;
  }

  .backoffice-menu-panel .backoffice-admin-name::before {
    content: "👤";
    display: grid;
    grid-column: 1;
    grid-row: 1;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(245, 228, 207, 0.22);
    font-size: 1.25rem;
  }

  .backoffice-menu-panel .backoffice-admin-email {
    grid-column: 2;
    grid-row: 1;
  }

  .backoffice-menu-panel.is-open > .backoffice-nav {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    order: 2;
    width: 100%;
    margin: 12px 0 0;
  }

  .backoffice-menu-panel.is-open > .backoffice-bottom-nav {
    display: grid !important;
    order: 3;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .backoffice-bottom-nav .backoffice-message-bell,
  .backoffice-bottom-nav .backoffice-back-to-site {
    display: inline-flex;
    width: 100% !important;
    min-width: 0;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 8px 10px;
    gap: 7px;
    justify-content: center;
    border-radius: 10px;
  }
}
