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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(170deg, var(--deep2), var(--deep) 55%);
  color: var(--tx);
  -webkit-font-smoothing: antialiased;
}

/* Light mode: wash the page in a pale tint of the trip's own accent
   (accent-soft, already trip-scoped) instead of flat cream, so the Aegean
   blue is felt as the page's ambient color, not just on buttons. Cards and
   surfaces stay the documented fixed white/gray — only this outer wash
   varies per trip. Lightened further from raw accent-soft so section
   dividers (white lines, see components.css) still read clearly against it. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) body {
    background: color-mix(in srgb, var(--accent-soft) 55%, white);
  }
}
:root[data-theme="light"] body {
  background: color-mix(in srgb, var(--accent-soft) 55%, white);
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

h1, h2, h3, p {
  margin: 0;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.day-rail-wrap {
  position: relative;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.day-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px 12px;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Scroll-position-aware fade hints — only shown on the side that actually
   has more to scroll to, signaling the day rail scrolls without implying
   there's more content when you're already at an edge. */
.day-rail-fade {
  position: absolute;
  top: 0;
  bottom: 12px;
  width: 28px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.day-rail-fade.visible {
  opacity: 1;
}

.day-rail-fade-left {
  left: 0;
  background: linear-gradient(to right, var(--deep2), transparent);
}

.day-rail-fade-right {
  right: 0;
  background: linear-gradient(to left, var(--deep2), transparent);
}

main {
  flex: 1;
  padding: 0 16px 32px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}
