@import url("https://fonts.googleapis.com/css2?family=Young+Serif&family=Hanken+Grotesk:wght@400;500;600;700;800&family=Caveat:wght@500;600;700&family=Sacramento&display=swap");

:root {
  --brand: #D97706;
  --brand-dark: #B45309;
  --brand-bright: #FACC15;
  --brand-soft: #FFFBEB;
  --brand-soft-2: #FEF3C7;
  --brand-border: #FDE68A;
  --accent: #FDE68A;
  --ink: #1F2937;
  --ink-strong: var(--ink);
  --text: #374151;
  --muted: #6B7280;
  --border: #E5E7EB;
  --bg: #FFFBEB;
  --card: #FFFFFF;
  --danger-bg: #FEE2E2;
  --danger-ink: #991B1B;
  --transport-bg: #FEF3C7;
  --transport-border: #F59E0B;
  --transport-ink: #92400E;
  --radius-sm: 0.65rem;
  --radius-md: 0.75rem;
  --radius-lg: 0.95rem;
  --radius-xl: 1rem;
  --radius-pill: 999px;
  --shadow-card: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-card-strong: 0 8px 22px rgba(0, 0, 0, 0.14);
  --shadow-floating: 0 18px 38px rgba(0, 0, 0, 0.32);
  --bottom-nav-height: 4.75rem;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: var(--app-height);
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
}

img,
svg {
  max-width: 100%;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(217, 119, 6, 0.38);
  outline-offset: 3px;
}

.heading-font {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.view-hidden {
  display: none !important;
}

.app-shell {
  width: 100%;
  min-height: var(--app-height);
  background: var(--bg);
}

.hero-header {
  position: relative;
  z-index: 50;
  height: clamp(13rem, 30vw, 24rem);
  overflow: visible;
  flex-shrink: 0;
}

.hero-image {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.78));
  pointer-events: none;
}

.hero-overlay > * {
  width: 100%;
  pointer-events: auto;
}

.title-text {
  margin: 0;
  color: #ffffff;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.08;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
}

.progress-track {
  height: 0.5rem;
  margin-top: 0.85rem;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.22);
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
  transition: width 0.35s ease;
}

.progress-text {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
}

.day-nav {
  position: absolute;
  top: calc(0.75rem + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}

.day-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30);
  line-height: 1;
}

.day-nav-btn:disabled {
  opacity: 0.55;
}

.day-nav-btn svg,
.day-caret,
.transport-icon svg,
.tab-icon svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.day-nav-btn svg {
  width: 1.55rem;
  height: 1.55rem;
  stroke-width: 3;
  overflow: visible;
}

.day-selector {
  position: relative;
  display: flex;
  min-width: 150px;
  flex-direction: column;
  align-items: center;
}

.day-pill {
  display: inline-flex;
  min-width: 150px;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 0.9rem 0.7rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: center;
}

.day-caret {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  stroke-width: 3;
}

.day-dropdown {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 50%;
  z-index: 1001;
  width: min(20rem, calc(100vw - 2rem));
  max-height: min(60vh, 24rem);
  padding: 0.45rem;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-floating);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
  -webkit-overflow-scrolling: touch;
}

.day-option {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.day-option:hover,
.day-option:focus-visible {
  background: var(--brand-soft);
}

.day-option.active {
  background: var(--brand-soft-2);
}

.day-option-label {
  font-weight: 850;
  line-height: 1.15;
}

.day-option-title {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.2;
}

.content-area {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
}

.view-padding {
  width: 100%;
  padding: clamp(1rem, 2vw, 1.75rem);
}

.timeline-stack {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.95rem;
}

.timeline-entry {
  display: block;
  margin: 0;
}

.activity-card,
.simple-card,
.packing-section {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.activity-card {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
}

.activity-card.linked-page-card {
  cursor: pointer;
}

.activity-image {
  display: block;
  width: 100%;
  height: clamp(9rem, 24vw, 18rem);
  object-fit: cover;
}

.activity-body {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
}

.activity-check {
  display: flex;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--brand-border);
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: transparent;
  font-weight: 800;
  transition: all 0.2s ease;
}

.activity-done .activity-title-text {
  text-decoration: line-through;
  opacity: 0.5;
}

.activity-done .activity-check {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.activity-time {
  margin: 0;
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.activity-title-text {
  margin: 0.15rem 0 0;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
}

.activity-desc {
  margin: 0.35rem 0 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
}

.activity-expanded-content {
  display: none;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
}

.activity-card.expanded .activity-expanded-content {
  display: block;
}

.activity-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.activity-details-btn {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.activity-details-btn:hover,
.activity-details-btn:focus-visible {
  background: var(--brand-soft-2);
}

.inline-link {
  color: var(--brand);
  font-weight: 800;
  text-decoration: underline;
}

.linked-page-hint {
  margin: 0.45rem 0 0;
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 700;
}

.transport-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--transport-border);
  border-radius: var(--radius-lg);
  background: var(--transport-bg);
  color: var(--transport-ink);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(146, 64, 14, 0.16);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.transport-card[href] {
  cursor: pointer;
}

.transport-card[href]:hover,
.transport-card[href]:focus-visible {
  border-color: var(--brand-dark);
  background: #FDE68A;
}

.transport-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  margin-top: 0.12rem;
  color: var(--transport-ink);
}

.transport-icon svg,
.tab-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 2;
}

.transport-lines {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--transport-ink);
  font-size: 1rem;
  line-height: 1.45;
}

.transport-line {
  display: block;
  color: inherit;
  text-decoration: none;
}

.transport-line-text {
  display: block;
}

.transport-card[href]:hover .transport-line-text,
.transport-card[href]:focus-visible .transport-line-text {
  text-decoration: underline;
}

.transport-text {
  color: var(--transport-ink);
  font-size: 1rem;
  line-height: 1.45;
}

.timeline-link-card,
.guide-link-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.timeline-link-card {
  padding: 0.9rem 1rem;
}

.timeline-link-card:hover,
.timeline-link-card:focus-visible,
.guide-link-card:hover,
.guide-link-card:focus-visible {
  background: #f9fafb;
}

.timeline-link-image,
.timeline-link-icon,
.guide-link-image,
.guide-link-icon {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
}

.timeline-link-image,
.guide-link-image {
  object-fit: cover;
}

.timeline-link-icon,
.guide-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  font-size: 1.45rem;
}

.guide-link-icon {
  font-size: 1.5rem;
}

.timeline-link-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.2rem;
}

.timeline-link-title,
.guide-link-text {
  font-size: 1.05rem;
  font-weight: 850;
}

.timeline-link-desc,
.extra-link-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.simple-card-pad {
  padding: 1rem;
}

.section-title {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
}

.main-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.tab-btn {
  min-width: 0;
  flex: 1;
  padding: 0.65rem 0.35rem 0.55rem;
  border-top: 3px solid transparent;
  background: #ffffff;
  color: #9ca3af;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.tab-active {
  border-top-color: var(--brand);
  color: var(--brand);
}

.tab-icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0 auto 0.22rem;
}

.form-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.text-input {
  min-width: 0;
  flex: 1;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 1rem;
}

.primary-btn {
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.55rem;
  background: #ffffff;
}

.check-row input {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  margin-top: 0.08rem;
  accent-color: var(--brand);
}

.check-row span {
  flex: 1;
  color: #1f2937;
  line-height: 1.4;
}

.check-row.done span {
  color: #9ca3af;
  text-decoration: line-through;
}

.grocery-row {
  align-items: center;
}

.remove-grocery-btn {
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: #f3f4f6;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.remove-grocery-btn:hover,
.remove-grocery-btn:focus-visible {
  background: var(--danger-bg);
  color: var(--danger-ink);
}

.packing-progress-card {
  padding: 0.85rem 1rem;
  margin-bottom: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.packing-progress-track {
  height: 0.45rem;
  margin-top: 0.55rem;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--border);
}

.packing-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.35s ease;
}

.packing-sections {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.packing-section {
  border: 1px solid var(--border);
}

.packing-section summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.packing-section summary::-webkit-details-marker {
  display: none;
}

.packing-section summary::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.packing-section[open] summary::before {
  transform: rotate(45deg);
}

.packing-section-title {
  flex: 1;
  font-size: 1.05rem;
  line-height: 1.2;
}

.packing-section-count {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

.packing-section-body {
  padding: 0.85rem;
  border-top: 1px solid var(--border);
  background: #fafafa;
}

.packing-section-items .check-row {
  margin-bottom: 0.5rem;
}

.packing-section-items .check-row:last-child {
  margin-bottom: 0;
}

.packing-add-row {
  margin-top: 0.85rem;
}

.guide-link-card {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  text-align: left;
}

.guide-hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f3f4f6;
}

.back-btn {
  margin-bottom: 1rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.extra-link-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.extra-link-subtitle {
  display: block;
  margin-top: 0.15rem;
  line-height: 1.25;
}

.guide-section-heading {
  display: block;
  margin-top: 1.25rem;
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 850;
  line-height: 1.25;
}

.guide-inline-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 1rem 0;
  border-radius: 0.85rem;
  object-fit: contain;
}

.guide-content {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

.map-card {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.map-image,
.stay-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: contain;
  background: #f3f4f6;
}

.map-link-bar {
  padding: 1rem;
  background: #ffffff;
}

.map-link-bar p {
  margin: 0;
}

.card-link-text {
  margin-top: 0.9rem;
  color: var(--brand);
  font-weight: 700;
}

.clickable-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.clickable-card:hover,
.clickable-card:focus-visible {
  box-shadow: var(--shadow-card-strong);
  transform: translateY(-1px);
}

.stay-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.stay-card-name {
  color: var(--ink);
}

@media (min-width: 760px) {
  .activity-body,
  .simple-card-pad,
  .transport-card,
  .check-row {
    padding-left: clamp(1rem, 2vw, 1.5rem);
    padding-right: clamp(1rem, 2vw, 1.5rem);
  }

  .title-text {
    font-size: clamp(32px, 4vw, 54px);
  }

  .day-pill {
    font-size: clamp(18px, 2vw, 24px);
  }
}

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

/* Modal, setup, and custom stay styles moved from index.html */
.trip-date-modal.hidden { display: none; }

    .trip-date-modal {
      position: fixed;
      inset: 0;
      z-index: 1000;
      display: grid;
      place-items: center;
      padding: 1rem;
    }

    .trip-date-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.56);
    }

    .trip-date-panel {
      position: relative;
      width: min(100%, 28rem);
      padding: 1.25rem;
      border-radius: 1.1rem;
      background: #fff;
      box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
    }

    .trip-date-panel h2 {
      margin: 0;
      color: var(--ink);
      font-size: 1.35rem;
      font-weight: 900;
      line-height: 1.2;
    }

    .trip-date-panel p {
      margin: 0.55rem 0 0;
      color: var(--text);
      line-height: 1.45;
    }

    .trip-date-label {
      display: block;
      margin-top: 1rem;
      margin-bottom: 0.4rem;
      color: var(--ink);
      font-weight: 800;
    }

    .trip-date-input {
      width: 100%;
      min-height: 2.75rem;
      padding: 0.65rem 0.75rem;
      border: 1px solid #e5e7eb;
      border-radius: 0.75rem;
      background: #fff;
      color: var(--ink);
      font: inherit;
      box-sizing: border-box;
    }

    .trip-date-actions,
    .trip-settings-actions {
      display: grid;
      gap: 0.65rem;
      margin-top: 1rem;
    }

    .trip-settings-card {
      margin-bottom: 0.9rem;
    }

    .trip-settings-status {
      margin-top: 0.5rem;
      color: var(--text);
      line-height: 1.45;
    }

    .trip-date-actions .primary-btn,
    .trip-settings-actions .primary-btn,
    .secondary-btn {
      min-height: 2.75rem;
      padding: 0.7rem 1rem;
      border-radius: 999px;
      font: inherit;
      font-weight: 850;
      cursor: pointer;
    }

    .secondary-btn {
      border: 1px solid #e5e7eb;
      background: #fff;
      color: var(--ink);
    }


    .stay-card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-top: 0.9rem;
    }

    .stay-change-btn {
      margin-left: auto;
      min-height: 2.35rem;
      padding: 0.55rem 0.85rem;
      border: 1px solid #e5e7eb;
      border-radius: 999px;
      background: #fff;
      color: var(--brand);
      font: inherit;
      font-size: 0.9rem;
      font-weight: 850;
      cursor: pointer;
    }

    .stay-change-btn:hover,
    .stay-change-btn:focus-visible {
      border-color: var(--brand-border);
      background: var(--brand-soft);
    }

    .stay-card-map-link {
      color: var(--brand);
      font-weight: 800;
      text-decoration: none;
    }

    .stay-card-map-link:hover,
    .stay-card-map-link:focus-visible {
      text-decoration: underline;
    }

    .trip-date-input.textarea-input {
      min-height: 6rem;
      resize: vertical;
    }

    .how-to-use-card {
      margin-bottom: 0.9rem;
    }

    .how-to-use-eyebrow {
      margin: 0 0 0.35rem;
      color: var(--brand);
      font-size: 0.78rem;
      font-weight: 900;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .how-to-use-body {
      margin-top: 0.8rem;
      color: var(--text);
      line-height: 1.5;
    }

    .how-to-use-body ul {
      margin: 0.65rem 0 0;
      padding-left: 1.2rem;
    }

    .how-to-use-body li + li {
      margin-top: 0.35rem;
    }

    .how-to-use-progress {
      margin-top: 0.9rem;
      color: var(--muted);
      font-size: 0.9rem;
      font-weight: 750;
    }

    .how-to-use-actions {
      display: flex;
      gap: 0.65rem;
      margin-top: 1rem;
    }

    .how-to-use-actions .secondary-btn,
    .how-to-use-actions .primary-btn {
      flex: 1;
    }

.contact-mail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  text-align: center;
  text-decoration: none;
}

.info-card {
  margin-bottom: 0.9rem;
}

.trip-settings-hint {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.contact-mail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.emergency-number-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.emergency-number-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}

.emergency-number-row strong {
  color: var(--brand);
  font-size: 1.05rem;
}

.mountain-resource-card {
  border: 1px solid var(--brand-border);
}

.mountain-resource-header {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.mountain-resource-icon {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  font-size: 1.35rem;
}

.mountain-resource-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 850;
  line-height: 1.2;
}

.mountain-resource-desc {
  margin: 0.3rem 0 0;
  color: var(--text);
  line-height: 1.4;
}

.mountain-resource-links {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.mountain-resource-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
}

.mountain-resource-link:hover,
.mountain-resource-link:focus-visible,
.emergency-number-row:hover,
.emergency-number-row:focus-visible {
  background: var(--brand-soft);
}

.mountain-resource-link-icon {
  width: 1.6rem;
  flex: 0 0 auto;
  text-align: center;
}

.mountain-resource-link span span {
  display: block;
  margin-top: 0.1rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.25;
}

.map-fallback {
  padding: 2rem 1rem;
  background: #f3f4f6;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}

.guide-section-block + .guide-section-block {
  margin-top: 1rem;
}

.guide-item-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.guide-item-row {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #ffffff;
}

.guide-item-row small {
  color: var(--muted);
  line-height: 1.35;
}

/* ============================================================
   Traveling Happiness PWA visual refresh
   Matches the main site's warm cream / sunshine yellow / ink palette,
   serif display headings, handwritten accents, soft cards, and pill UI.
   ============================================================ */
:root {
  --brand: #ffd84d;
  --brand-dark: #765f00;
  --brand-bright: #ffe477;
  --brand-soft: #fff0b8;
  --brand-soft-2: #ffefad;
  --brand-border: #d7c9a8;
  --accent: #ffd84d;
  --ink: #111208;
  --ink-strong: #050603;
  --text: #5c5848;
  --muted: #746d58;
  --border: #eadfca;
  --bg: #fffaf0;
  --card: #fffdf7;
  --danger-bg: #fee3df;
  --danger-ink: #9b2f27;
  --transport-bg: #fff0b8;
  --transport-border: #d7c9a8;
  --transport-ink: #111208;
  --radius-sm: 0.8rem;
  --radius-md: 0.9rem;
  --radius-lg: 1rem;
  --radius-xl: 1.125rem;
  --radius-pill: 999px;
  --shadow-card: 0 18px 44px -34px rgba(17, 18, 8, 0.48);
  --shadow-card-strong: 0 26px 62px -36px rgba(17, 18, 8, 0.62);
  --shadow-floating: 0 30px 70px -34px rgba(17, 18, 8, 0.68);
  --bottom-nav-height: 4.95rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: 'Hanken Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Young Serif', Georgia, serif;
  --font-hand: 'Caveat', 'Comic Sans MS', cursive;
}

html {
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 216, 77, 0.34), transparent 28rem),
    radial-gradient(circle at 96% 18%, rgba(255, 216, 77, 0.22), transparent 24rem),
    var(--bg);
}

body {
  background:
    radial-gradient(circle at -6rem 18rem, rgba(255, 216, 77, 0.28), transparent 17rem),
    linear-gradient(180deg, #fffdf7 0%, var(--bg) 44%, #fff8e8 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: -0.006em;
}

button,
input,
textarea,
select {
  font-family: var(--font-sans);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(255, 216, 77, 0.52);
  outline-offset: 3px;
}

.heading-font,
.title-text,
.section-title,
.activity-title-text,
.trip-date-panel h2,
.simple-card-pad > h2,
.simple-card-pad > h3,
.mountain-resource-title,
.guide-section-heading,
.stay-card-name,
.timeline-link-title,
.guide-link-text {
  font-family: var(--font-serif) !important;
  font-weight: 400 !important;
  letter-spacing: -0.018em;
}

.app-shell {
  min-height: var(--app-height);
  background: transparent;
}

.hero-header {
  isolation: isolate;
  height: clamp(14.5rem, 34vw, 25rem);
  background:
    linear-gradient(135deg, var(--ink) 0%, #4b4927 46%, #8a7335 100%);
  border-bottom: 1px solid rgba(234, 223, 202, 0.88);
  box-shadow: 0 24px 70px -54px rgba(17, 18, 8, 0.8);
}

.hero-header::before {
  content: "";
  position: absolute;
  right: -4.5rem;
  top: 34%;
  z-index: 1;
  width: clamp(8rem, 20vw, 15rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 216, 77, 0.78);
  filter: blur(0.2px);
  pointer-events: none;
}

.hero-header::after {
  content: "";
  position: absolute;
  left: -5.2rem;
  bottom: -5.8rem;
  z-index: 1;
  width: 11rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1.8rem rgba(255, 216, 77, 0.16);
  pointer-events: none;
}

.hero-image {
  z-index: 0;
  filter: saturate(0.94) contrast(1.02) brightness(0.9);
  transform: scale(1.015);
}

.hero-overlay {
  z-index: 2;
  align-items: flex-end;
  padding: clamp(1.1rem, 4vw, 2.6rem);
  background:
    linear-gradient(180deg, rgba(17, 18, 8, 0.08) 0%, rgba(17, 18, 8, 0.26) 42%, rgba(5, 6, 3, 0.86) 100%);
}

.hero-overlay > * {
  max-width: 940px;
  margin-inline: auto;
}

.title-text {
  max-width: 13ch;
  color: #fffdf7;
  font-size: clamp(2.45rem, 8vw, 5rem);
  line-height: 0.98;
  text-shadow: 0 8px 38px rgba(0, 0, 0, 0.42);
}

.progress-track {
  height: 0.58rem;
  max-width: 42rem;
  margin-top: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 253, 247, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.progress-fill {
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-bright) 100%);
  box-shadow: 0 0 18px rgba(255, 216, 77, 0.42);
}

.progress-text {
  color: rgba(255, 253, 247, 0.82);
  font-size: 0.92rem;
  font-weight: 700;
}

.day-nav {
  top: calc(0.75rem + env(safe-area-inset-top));
  z-index: 5;
  max-width: 980px;
  margin-inline: auto;
  padding-inline: clamp(0.9rem, 3vw, 1.35rem);
}

.day-nav-btn,
.day-pill,
.back-btn,
.primary-btn,
.secondary-btn,
.activity-details-btn,
.stay-change-btn,
.remove-grocery-btn {
  transition: transform 180ms var(--ease), background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.day-nav-btn {
  border: 1.5px solid rgba(215, 201, 168, 0.9);
  background: rgba(255, 253, 247, 0.94);
  color: var(--ink);
  box-shadow: 0 18px 38px -26px rgba(5, 6, 3, 0.72);
  backdrop-filter: blur(8px);
}

.day-nav-btn:not(:disabled):hover,
.day-nav-btn:not(:disabled):focus-visible,
.day-pill:hover,
.day-pill:focus-visible,
.back-btn:hover,
.back-btn:focus-visible,
.primary-btn:hover,
.primary-btn:focus-visible,
.secondary-btn:hover,
.secondary-btn:focus-visible,
.activity-details-btn:hover,
.activity-details-btn:focus-visible,
.stay-change-btn:hover,
.stay-change-btn:focus-visible {
  transform: translateY(-2px);
}

.day-nav-btn svg,
.day-caret,
.transport-icon svg,
.tab-icon svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.day-pill {
  min-width: min(17rem, calc(100vw - 8rem));
  border: 1.5px solid rgba(255, 216, 77, 0.86);
  background: linear-gradient(180deg, #ffe477 0%, var(--brand) 100%);
  color: var(--ink-strong);
  box-shadow: 0 20px 44px -28px rgba(5, 6, 3, 0.82);
  font-size: clamp(1rem, 4vw, 1.3rem);
  font-weight: 900;
}

.day-dropdown {
  border: 1px solid var(--border);
  border-radius: 1.15rem;
  background: rgba(255, 253, 247, 0.98);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(12px);
}

.day-option {
  border-radius: 0.9rem;
}

.day-option + .day-option {
  border-top: 1px dashed rgba(215, 201, 168, 0.72);
}

.day-option:hover,
.day-option:focus-visible {
  background: var(--brand-soft);
}

.day-option.active {
  background: linear-gradient(90deg, rgba(255, 216, 77, 0.54), rgba(255, 239, 173, 0.62));
}

.day-option-label {
  color: var(--ink);
  font-weight: 900;
}

.day-option-title {
  color: var(--muted);
}

.content-area {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 0.6rem);
}

.view-padding {
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(1.05rem, 3.5vw, 2rem);
}

.timeline-stack {
  gap: 1.05rem;
}

.section-title {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1.15rem;
  color: var(--ink) !important;
  font-size: clamp(1.72rem, 5.5vw, 2.45rem);
  line-height: 1.08;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.24em;
  height: 0.18em;
  border-radius: var(--radius-pill);
  background: var(--brand);
  transform: rotate(-1deg);
  z-index: -1;
}

.activity-card,
.simple-card,
.packing-section,
.map-card,
.timeline-link-card,
.guide-link-card,
.transport-card,
.packing-progress-card,
.check-row,
.emergency-number-row,
.mountain-resource-link,
.guide-item-row {
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.activity-card,
.simple-card,
.packing-section,
.map-card,
.packing-progress-card {
  border-radius: var(--radius-xl);
}

.activity-card,
.simple-card,
.packing-section,
.map-card,
.timeline-link-card,
.guide-link-card,
.transport-card {
  position: relative;
  overflow: hidden;
}

.activity-card,
.timeline-link-card,
.guide-link-card,
.map-card,
.transport-card,
.simple-card.clickable-card {
  transition: transform 220ms var(--ease), box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.activity-card:hover,
.activity-card:focus-within,
.timeline-link-card:hover,
.timeline-link-card:focus-visible,
.guide-link-card:hover,
.guide-link-card:focus-visible,
.map-card:hover,
.map-card:focus-visible,
.transport-card[href]:hover,
.transport-card[href]:focus-visible,
.clickable-card:hover,
.clickable-card:focus-visible {
  border-color: var(--brand-border);
  box-shadow: var(--shadow-card-strong);
  transform: translateY(-3px);
}

@supports selector(:has(*)) {
  .activity-card:has(.activity-image)::before,
  .simple-card:has(.guide-hero-image)::before,
  .simple-card:has(.stay-image)::before {
    content: "";
    position: absolute;
    top: -0.52rem;
    left: 50%;
    z-index: 2;
    width: 5.6rem;
    height: 1.35rem;
    border-radius: 0.16rem;
    background: rgba(255, 216, 77, 0.62);
    box-shadow: 0 2px 8px rgba(17, 18, 8, 0.12);
    transform: translateX(-50%) rotate(-2deg);
  }
}

.activity-image {
  height: clamp(10.5rem, 30vw, 20rem);
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-soft-2));
}

.activity-body {
  gap: 0.95rem;
  padding: clamp(1rem, 3vw, 1.35rem);
}

.activity-check {
  width: 2.15rem;
  height: 2.15rem;
  border: 1.8px solid var(--brand-border);
  background: #fffdf7;
  color: transparent;
  box-shadow: inset 0 0 0 3px rgba(255, 216, 77, 0.12);
}

.activity-done .activity-check {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--ink-strong);
  box-shadow: 0 12px 24px -20px rgba(17, 18, 8, 0.9);
}

.activity-done .activity-title-text {
  opacity: 0.52;
  text-decoration-color: rgba(118, 95, 0, 0.76);
}

.activity-time {
  display: block;
  margin: -0.1rem 0 0.45rem;
  color: var(--brand-dark);
  font-family: var(--font-hand);
  font-size: 1.34rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
  transform: rotate(-1deg);
}

.activity-title-text {
  margin-top: 0;
  color: var(--ink) !important;
  font-size: clamp(1.35rem, 4.8vw, 1.95rem);
}

.activity-desc,
.activity-expanded-content,
.guide-content,
.transport-lines,
.transport-text,
.trip-date-panel p,
.trip-settings-status,
.mountain-resource-desc {
  color: var(--text);
}

.activity-desc {
  line-height: 1.55;
}

.activity-expanded-content {
  border-top: 2px dashed var(--border);
  line-height: 1.6;
}

.activity-details-btn,
.back-btn,
.secondary-btn,
.stay-change-btn {
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-pill);
  background: rgba(255, 253, 247, 0.88);
  color: var(--ink);
  box-shadow: 0 14px 30px -26px rgba(17, 18, 8, 0.5);
  font-weight: 850;
}

.activity-details-btn,
.stay-change-btn {
  color: var(--brand-dark);
}

.primary-btn,
.trip-date-actions .primary-btn,
.trip-settings-actions .primary-btn,
.how-to-use-actions .primary-btn {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: var(--ink-strong);
  box-shadow: 0 16px 34px -28px rgba(17, 18, 8, 0.78);
  font-weight: 900;
}

.primary-btn:hover,
.primary-btn:focus-visible {
  background: var(--brand-bright);
}

.inline-link,
.linked-page-hint,
.card-link-text,
.stay-card-map-link {
  color: var(--brand-dark);
  font-weight: 850;
}

.linked-page-hint,
.card-link-text {
  font-family: var(--font-hand);
  font-size: 1.22rem;
  line-height: 1.05;
  transform: rotate(-0.8deg);
}

.transport-card {
  border: 1.5px solid var(--brand-border);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--brand-soft) 0%, #fff7d7 100%);
  color: var(--transport-ink);
}

.transport-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin-top: 0;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  box-shadow: 0 14px 26px -22px rgba(17, 18, 8, 0.75);
}

.transport-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2.5;
}

.transport-lines {
  font-weight: 650;
}

.timeline-link-card,
.guide-link-card,
.emergency-number-row,
.mountain-resource-link,
.guide-item-row,
.check-row {
  border-radius: var(--radius-lg);
}

.timeline-link-card,
.guide-link-card {
  background: rgba(255, 253, 247, 0.96);
}

.timeline-link-card:hover,
.timeline-link-card:focus-visible,
.guide-link-card:hover,
.guide-link-card:focus-visible,
.mountain-resource-link:hover,
.mountain-resource-link:focus-visible,
.emergency-number-row:hover,
.emergency-number-row:focus-visible {
  background: rgba(255, 216, 77, 0.18);
}

.timeline-link-image,
.timeline-link-icon,
.guide-link-image,
.guide-link-icon,
.mountain-resource-icon {
  border: 1px solid rgba(215, 201, 168, 0.72);
  border-radius: 0.95rem;
  background: var(--brand-soft);
}

.timeline-link-icon,
.guide-link-icon,
.mountain-resource-icon {
  color: var(--ink);
}

.simple-card-pad {
  padding: clamp(1rem, 3.5vw, 1.45rem);
}

.simple-card-pad > h3,
.trip-date-panel h2,
.mountain-resource-title {
  color: var(--ink) !important;
  font-size: clamp(1.25rem, 4.4vw, 1.65rem) !important;
  line-height: 1.15 !important;
}

.main-nav {
  left: 50%;
  width: 100%;
  max-width: 980px;
  transform: translateX(-50%);
  border-top: 1px solid rgba(234, 223, 202, 0.92);
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 -20px 48px -36px rgba(17, 18, 8, 0.72);
  backdrop-filter: blur(16px) saturate(1.08);
}

.tab-btn {
  border-top: 3px solid transparent;
  background: transparent;
  color: rgba(92, 88, 72, 0.78);
  font-weight: 850;
}

.tab-btn:hover,
.tab-btn:focus-visible {
  color: var(--ink);
  background: rgba(255, 216, 77, 0.12);
}

.tab-active {
  border-top-color: var(--brand);
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 216, 77, 0.25), rgba(255, 253, 247, 0));
}

.tab-icon {
  color: currentColor;
}

.form-row {
  gap: 0.65rem;
}

.text-input,
.trip-date-input {
  border: 1.5px solid var(--brand-border);
  border-radius: 0.95rem;
  background: #fffdf7;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(17, 18, 8, 0.02);
}

.text-input:focus,
.trip-date-input:focus {
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 3px rgba(255, 216, 77, 0.28);
  outline: none;
}

.check-row {
  background: rgba(255, 253, 247, 0.96);
  box-shadow: none;
}

.check-row input {
  accent-color: var(--brand);
}

.check-row span {
  color: var(--ink);
}

.check-row.done span {
  color: rgba(92, 88, 72, 0.58);
}

.remove-grocery-btn {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.packing-progress-card {
  background: linear-gradient(135deg, var(--card), #fff7dc);
}

.packing-progress-track {
  background: rgba(215, 201, 168, 0.58);
}

.packing-progress-fill {
  background: var(--brand);
}

.packing-section summary {
  color: var(--ink);
}

.packing-section summary::before {
  border-color: var(--brand-dark);
}

.packing-section-body {
  border-top: 2px dashed var(--border);
  background: rgba(255, 250, 240, 0.72);
}

.packing-section-count,
.timeline-link-desc,
.extra-link-subtitle,
.trip-settings-hint,
.mountain-resource-link span span,
.guide-item-row small {
  color: var(--muted);
}

.guide-hero-image,
.guide-inline-image,
.map-image,
.stay-image {
  background: var(--brand-soft-2);
}

.guide-inline-image {
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
}

.guide-content {
  font-size: 1.02rem;
  line-height: 1.7;
}

.guide-content p {
  margin-top: 0;
}

.guide-section-heading {
  margin-top: 1.35rem;
  color: var(--ink) !important;
  font-size: 1.38rem;
}

.guide-section-heading::before {
  content: "✦";
  margin-right: 0.38rem;
  color: var(--brand-dark);
  font-family: var(--font-sans);
}

.guide-item-list {
  gap: 0.75rem;
}

.guide-item-row {
  background: rgba(255, 253, 247, 0.96);
}

.map-card {
  border-color: var(--border);
}

.map-image {
  width: 100%;
}

.map-link-bar {
  border-top: 1px solid var(--border);
  background: var(--card);
}

.map-fallback {
  background: var(--brand-soft-2);
  color: var(--muted);
}

.stay-card-name {
  color: var(--ink) !important;
  font-size: clamp(1.35rem, 4.8vw, 1.9rem) !important;
}

.stay-card-footer {
  border-top: 2px dashed var(--border);
  padding-top: 0.9rem;
}

.trip-date-modal {
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

.trip-date-backdrop {
  background: rgba(5, 6, 3, 0.58);
  backdrop-filter: blur(4px);
}

.trip-date-panel {
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--card);
  box-shadow: var(--shadow-floating);
}

.trip-date-label {
  color: var(--brand-dark);
  font-family: var(--font-hand);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

.trip-settings-actions,
.trip-date-actions {
  gap: 0.75rem;
}

.how-to-use-eyebrow {
  color: var(--brand-dark);
  font-family: var(--font-hand);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  transform: rotate(-1deg);
}

.how-to-use-body {
  color: var(--text);
}

.how-to-use-progress {
  color: var(--muted);
}

.contact-mail-btn {
  border-radius: var(--radius-pill);
}

.emergency-number-row strong {
  color: var(--brand-dark);
}

.mountain-resource-card {
  border-color: var(--brand-border);
  background: linear-gradient(135deg, var(--card), #fff8dc);
}

.mountain-resource-header {
  align-items: center;
}

.mountain-resource-icon {
  width: 3rem;
  height: 3rem;
  font-size: 1.45rem;
}

.mountain-resource-links {
  gap: 0.65rem;
}

.mountain-resource-link {
  box-shadow: none;
}

.back-btn {
  margin-bottom: 1.1rem;
}

@media (min-width: 760px) {
  .activity-body,
  .simple-card-pad,
  .transport-card,
  .check-row {
    padding-left: clamp(1.2rem, 2.5vw, 1.75rem);
    padding-right: clamp(1.2rem, 2.5vw, 1.75rem);
  }

  .view-padding {
    padding-top: clamp(1.4rem, 3.5vw, 2.4rem);
  }
}

@media (min-width: 980px) {
  .hero-header {
    border-bottom-left-radius: 1.4rem;
    border-bottom-right-radius: 1.4rem;
  }

  .main-nav {
    bottom: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 1.35rem;
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  .day-pill {
    min-width: min(12.5rem, calc(100vw - 7.3rem));
    padding-inline: 0.85rem;
  }

  .day-dropdown {
    width: min(21rem, calc(100vw - 1.35rem));
  }

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

  .form-row .primary-btn,
  .form-row .secondary-btn {
    width: 100%;
  }

  .hero-header::before {
    right: -6.4rem;
    top: 42%;
    width: 11rem;
  }

  .hero-header::after {
    opacity: 0.82;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image {
    transform: none !important;
  }
}

/* Layout hardening: prevent horizontal scrolling and restore full-width content. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell,
.hero-header,
.content-area {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.hero-header {
  overflow: hidden;
}

.content-area {
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
}

.view-padding {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding: clamp(1rem, 2vw, 1.75rem);
}

.main-nav {
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  transform: none;
}

@media (min-width: 760px) {
  .view-padding {
    padding: clamp(1rem, 2vw, 1.75rem);
  }
}

@media (min-width: 980px) {
  .main-nav {
    bottom: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
}

/* Route-card label and layout. */
.transport-card {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.transport-card-main {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: flex-start;
  gap: 0.75rem;
}

.transport-route-label {
  display: block;
  width: 100%;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.018em;
  line-height: 1.2;
}


/* Header should span the full viewport like the content area. */
.hero-overlay {
  padding: clamp(1rem, 2vw, 1.75rem);
}

.hero-overlay > * {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.title-text {
  max-width: none;
}

.progress-track {
  width: 100%;
  max-width: none;
}

.day-nav {
  left: 0;
  right: 0;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: clamp(1rem, 2vw, 1.75rem);
}

/* Day Hub layout */
.day-hub-section {
  margin-bottom: 0.95rem;
}

.day-hub-section:last-child {
  margin-bottom: 0;
}

.day-overview-card {
  border: 1px solid rgba(217, 119, 6, 0.16);
}

.day-hub-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.12;
}

.day-hub-summary {
  margin: 0.6rem 0 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}

.day-hub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.day-hub-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 0.4rem 0.65rem;
}

.route-overview-card {
  border: 1px solid rgba(217, 119, 6, 0.22);
}

.route-tap-label {
  margin: 0;
  padding: 0.75rem 1rem 0.65rem;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.018em;
  line-height: 1.2;
  background: #fff7ed;
  border-bottom: 1px solid rgba(217, 119, 6, 0.12);
}

.day-hub-small-note,
.day-hub-muted,
.day-hub-section-intro {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.day-hub-small-note,
.stay-details-text,
.day-hub-section-intro {
  margin: 0.45rem 0 0;
}

.stay-details-text {
  color: var(--text);
  line-height: 1.45;
}

.day-note-input,
.all-day-note-input {
  display: block;
  width: 100%;
  resize: vertical;
  margin-top: 0.75rem;
  line-height: 1.45;
}

.day-notes-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.day-note-status {
  min-height: 1.2rem;
  margin: 0.5rem 0 0;
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.notes-day-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.notes-day-section {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.notes-day-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.notes-day-section summary::-webkit-details-marker {
  display: none;
}

.notes-day-section summary small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.notes-day-body {
  border-top: 1px solid var(--border);
  padding: 0.9rem 1rem 1rem;
  background: #fffbeb;
}

.notes-day-body .primary-btn {
  width: 100%;
  margin-top: 0.7rem;
}

.shopping-row {
  align-items: center;
}

.remove-shopping-btn {
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  background: #f3f4f6;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.remove-shopping-btn:hover,
.remove-shopping-btn:focus-visible {
  background: var(--danger-bg);
  color: var(--danger-ink);
}

@media (min-width: 560px) {
  .day-notes-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.day-hub-section .stay-image {
  display: block;
  width: 100%;
  height: clamp(12rem, 28vw, 22rem);
  object-fit: cover;
  background: #f3f4f6;
}

/* Info tab organization */
.info-quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.info-quick-link {
  min-width: 0;
  padding: 0.55rem 0.45rem;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.15;
  text-align: center;
}

.info-quick-link:hover,
.info-quick-link:focus-visible {
  background: #fef3c7;
}

.info-section {
  scroll-margin-top: 1rem;
  margin-bottom: 1.2rem;
}

.info-section:last-child {
  margin-bottom: 0;
}

.info-section-title {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.2;
}

.info-section-intro {
  margin: -0.25rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.info-section-stack {
  display: grid;
  gap: 0.85rem;
}

.info-section-stack > .extra-link-stack {
  margin-top: 0;
}

.info-card-title {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 850;
  line-height: 1.25;
}

/* Day Hub quick references */
.quick-reference-grid {
  display: grid;
  gap: 0.6rem;
}

.quick-reference-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-card);
}

.quick-reference-card:hover,
.quick-reference-card:focus-visible {
  border-color: var(--brand-border);
  background: var(--brand-soft);
}

.quick-reference-icon,
.quick-reference-icon-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  font-size: 1.35rem;
}

.quick-reference-icon-image {
  object-fit: cover;
}

.quick-reference-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.quick-reference-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.2;
}

.quick-reference-subtitle {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.25;
}

@media (min-width: 640px) {
  .quick-reference-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Trip Settings personalization controls */
.trip-preferences-grid {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
}

.trip-settings-actions-inline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.danger-outline-btn {
  border-color: #fecaca;
  color: var(--danger-ink);
}

.danger-outline-btn:hover,
.danger-outline-btn:focus-visible {
  background: var(--danger-bg);
  border-color: #fca5a5;
}

@media (max-width: 420px) {
  .trip-settings-actions-inline {
    grid-template-columns: 1fr;
  }
}

/* Refinements: Day Hub first-tab layout, grouped links, and combined disclosures */
.day-hub-section {
  margin-bottom: 1.15rem;
}

.day-hub-section + .day-hub-section {
  margin-top: 1.15rem;
}

.day-overview-card {
  display: block;
}

.day-hub-trip-name {
  margin: 0 0 0.35rem;
  color: var(--brand-dark);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.2;
}

.day-hub-kicker {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.day-hub-title {
  display: block;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: clamp(1.35rem, 6vw, 1.75rem);
  font-weight: 900;
  line-height: 1.12;
}

.route-static-label {
  margin: 0;
  padding: 0.75rem 1rem 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.018em;
  line-height: 1.2;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.route-overview-card .map-link-bar {
  display: none;
}

.shopping-list-section,
.day-notes-card {
  margin-top: 0;
}

.shopping-list-section .section-title,
.day-notes-card .section-title {
  margin-bottom: 0.75rem;
}

.disclosure-card {
  display: grid;
  gap: 0.85rem;
}

.disclosure-section {
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.disclosure-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.disclosure-section h4 {
  margin: 0 0 0.3rem;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1.25;
}

.disclosure-section p {
  margin: 0.3rem 0 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Reusable brand footer shown at the bottom of every app view */
.brand-footer {
  width: 100%;
  padding: 1.75rem clamp(1rem, 2vw, 1.75rem) calc(1.75rem + env(safe-area-inset-bottom));
  text-align: center;
}

.brand-footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(14rem, 62vw);
  opacity: 0.88;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.brand-footer-link:hover,
.brand-footer-link:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
}

.brand-footer-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.safety-notice-card .extra-link-stack {
  margin-top: 0.85rem;
}

.safety-notice-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.safety-notice-header .info-card-title {
  margin: 0;
}

.safety-notice-icon {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--brand-soft);
  font-size: 1.1rem;
}

/* Fix day dropdown stacking: keep the menu above the content below the hero. */
.hero-header {
  overflow: visible;
  z-index: 200;
}

.hero-image,
.hero-overlay,
.hero-header::before,
.hero-header::after {
  pointer-events: none;
}

.day-nav {
  z-index: 3000;
}

.day-selector {
  z-index: 3001;
}

.day-dropdown {
  z-index: 4000;
}

.content-area {
  position: relative;
  z-index: 1;
}

/* Keep the rounded hero treatment while still allowing the day dropdown to extend below the header. */
.hero-header {
  overflow: visible;
  border-bottom-left-radius: clamp(1rem, 3vw, 1.4rem);
  border-bottom-right-radius: clamp(1rem, 3vw, 1.4rem);
}

.hero-image,
.hero-overlay {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  overflow: hidden;
}

/* The decorative blobs must stay inside the hero now that overflow is visible for the dropdown. */
.hero-header::before {
  top: clamp(2.6rem, 18vw, 5.5rem);
  bottom: auto;
}

.hero-header::after {
  bottom: 0.75rem;
  opacity: 0.58;
}

@media (max-width: 640px) {
  .hero-header {
    border-bottom-left-radius: 1.05rem;
    border-bottom-right-radius: 1.05rem;
  }

  .hero-header::after {
    bottom: 0.85rem;
    left: -6.2rem;
  }
}

/* Final hero/dropdown layering fix:
   - keep the rounded hero visual
   - let only the day dropdown escape the header
   - prevent the hero overlay/decor from sitting on top of content below */
.hero-header {
  overflow: visible !important;
  isolation: auto !important;
  z-index: auto !important;
  border-bottom-left-radius: clamp(1rem, 3vw, 1.4rem);
  border-bottom-right-radius: clamp(1rem, 3vw, 1.4rem);
}

.hero-image,
.hero-overlay {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  overflow: hidden;
}

.hero-image {
  z-index: 0;
}

.hero-overlay {
  z-index: 1;
}

.hero-header::before,
.hero-header::after {
  z-index: 0;
  pointer-events: none;
}

.day-nav {
  z-index: 5000 !important;
}

.day-selector {
  z-index: 5001 !important;
}

.day-dropdown {
  z-index: 5002 !important;
}

.content-area {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

@media (max-width: 640px) {
  .hero-header {
    border-bottom-left-radius: 1.05rem;
    border-bottom-right-radius: 1.05rem;
  }
}


/* Header polish: remove decorative yellow hero blobs while preserving dropdown overflow. */
.hero-header::before,
.hero-header::after {
  display: none !important;
  content: none !important;
}

/* Ensure both the image and overlay share the same rounded hero shape. */
.hero-header {
  border-bottom-left-radius: clamp(1rem, 3vw, 1.4rem) !important;
  border-bottom-right-radius: clamp(1rem, 3vw, 1.4rem) !important;
}

.hero-image,
.hero-overlay {
  border-bottom-left-radius: inherit !important;
  border-bottom-right-radius: inherit !important;
  clip-path: inset(0 round 0 0 clamp(1rem, 3vw, 1.4rem) clamp(1rem, 3vw, 1.4rem));
}

.hero-image {
  transform: none !important;
}

/* Page/tab title should read as the current tab label, not as a content section heading. */
.view-title {
  margin: 0 0 0.85rem;
  color: var(--brand-dark);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.view-title::after {
  content: none !important;
}

/* Heading hierarchy fix: page/tab titles are large; Day Hub section titles are smaller. */
.view-title {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1.15rem;
  color: var(--ink) !important;
  font-family: var(--font-serif) !important;
  font-size: clamp(1.72rem, 5.5vw, 2.45rem);
  font-weight: 400 !important;
  letter-spacing: -0.018em;
  line-height: 1.08;
  text-transform: none;
}

.view-title::after {
  content: "" !important;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.24em;
  height: 0.18em;
  border-radius: var(--radius-pill);
  background: var(--brand);
  transform: rotate(-1deg);
  z-index: -1;
}

.day-hub-section .section-title {
  position: static;
  width: auto;
  max-width: 100%;
  margin: 0 0 0.75rem;
  color: var(--ink) !important;
  font-family: var(--font-serif) !important;
  font-size: clamp(1.18rem, 4.4vw, 1.45rem);
  font-weight: 400 !important;
  letter-spacing: -0.014em;
  line-height: 1.16;
}

.day-hub-section .section-title::after {
  content: none !important;
}
