/* Readable travel information first; use rem so browser text preferences apply. */
:root {
  --text-label: .75rem;
  --text-secondary: .875rem;
  --text-body: 1rem;
  --text-title: 1.25rem;
  --muted: #5e675f;
}
html { font-size: 100%; scroll-padding-top: 96px; }
body { font-size: var(--text-body); line-height: 1.75; }
.brand { font-size: var(--text-secondary); }
.eyebrow, .hero .eyebrow, .chapter, .intro-kicker, .dock-label,
.mini-art small, footer > span:not(.brand-sun) {
  font-size: var(--text-label);
  line-height: 1.5;
  letter-spacing: .1em;
}
.hero-thai, .intro-strip p, .journey-intro p, .day-caption,
.location, .restaurant-details, .restaurant-row, .booking-item p,
.info-item, .sheet-link, .map-link, .start-button {
  font-size: var(--text-body);
  line-height: 1.75;
}
.trip-meta, .date-line, .status, .transport, .journey-intro p span,
.stop-note, .day-note, .sheet-note, .booking-item small,
footer small, footer a, .sync-bar, .sync-bar > div, .sync-bar button,
.sync-bar a, .sync-error {
  font-size: var(--text-secondary);
  line-height: 1.75;
}
.trip-meta { flex-wrap: wrap; letter-spacing: .025em; gap: 8px 12px; }
.intro-strip { flex-wrap: wrap; }
.intro-strip p { flex: 1 1 400px; }
.intro-end { font-size: var(--text-secondary); }
.day-caption { margin-bottom: 16px; }
.day-note, .stop-note { color: #665c4b; }
.stop-meta { flex-wrap: wrap; gap: 8px 12px; align-items: baseline; }
.time { font-size: var(--text-body); line-height: 1.5; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.stop-kind { font-size: var(--text-label); line-height: 1.5; letter-spacing: .025em; }
.stop h3 { font-size: var(--text-title); font-weight: 600; line-height: 1.5; letter-spacing: 0; }
.stop-card { padding: 22px 24px; }
.stop-note { padding-top: 12px; margin-top: 8px; }
.transport { padding: 4px 9px; }
.status { padding: 5px 10px; }
.restaurant-row strong, .booking-item h3 { font-size: 1.125rem; line-height: 1.6; }
.restaurant-row p { margin: 8px 0; }
.restaurant-details summary { gap: 12px; align-items: center; min-height: 48px; }
.restaurant-details summary span { margin-left: auto; white-space: nowrap; font-size: var(--text-secondary); }
.booking-item .booking-heading { flex-wrap: wrap; align-items: center; }
.booking-item small { display: block; }
.booking-item p, .booking-item small, .info-item dd, .location,
.stop h3, .stop-note, .day-note, .day-caption, .sync-error { overflow-wrap: anywhere; }
.icon-button, .day-controls button { width: 44px; height: 44px; flex-shrink: 0; }
.day-controls button { font-size: 1.125rem; }
.map-link, .sheet-link, .start-button, .sync-bar button, .sync-bar a, footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.map-link { gap: 7px; }
.map-link svg { width: 16px; height: 16px; }
.sync-bar { flex-wrap: wrap; }
.sync-bar > div { flex-basis: 300px; }
.sync-bar a { padding: 6px 2px; }
.sheet-head h2 { font-size: 1.5rem; line-height: 1.5; }
.info-item { grid-template-columns: minmax(100px, .7fr) minmax(0, 1.5fr); }
.day-dock { width: min(560px, calc(100% - 24px)); }
.dock-label { padding: 1px 8px 6px; }
.day-tabs { overflow-x: auto; scrollbar-width: none; gap: 2px; overscroll-behavior-x: contain; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: 1 0 44px; min-width: 44px; min-height: 60px; padding: 6px 0; }
.day-tab .date { font-size: 1.25rem; line-height: 1.4; }
.day-tab .weekday { font-size: var(--text-label); line-height: 1.5; opacity: .85; }
footer { padding-bottom: calc(175px + env(safe-area-inset-bottom)); }

@media (max-width: 600px) {
  .topbar { padding: 10px 20px; }
  .brand { font-size: var(--text-label); letter-spacing: .08em; gap: 8px; }
  .top-actions { gap: 6px; }
  .hero .eyebrow { letter-spacing: .08em; }
  .hero-thai { margin-bottom: 18px; }
  .start-button { padding: 10px 16px; gap: 24px; }
  .art-caption { font-size: .625rem; letter-spacing: .02em; bottom: -29px; }
  .art-stamp small { font-size: .625rem; }
  .intro-strip { margin-top: 35px; }
  .journey-intro h2 { font-size: 1.75rem; }
  .journey-intro p { margin-top: 12px; }
  .journey-intro p span { margin-top: 4px; }
  .day-summary h2 { max-width: none; font-size: 2rem; }
  .day-caption { max-width: none; margin: 10px 0 16px; }
  .day-summary .status { max-width: 100%; }
  .day-controls { position: static; margin-top: 14px; justify-content: flex-end; gap: 10px; }
  .day-controls button { width: 44px; height: 44px; }
  .day-section { padding-inline: 20px; }
  .timeline { padding-left: 21px; }
  .stop:before { left: -21px; }
  .stop-card { padding: 20px 16px; }
  .stop { margin-bottom: 18px; }
  .day-note { padding: 15px; }
  .day-dock { padding: 8px 8px 9px; }
  .info-item { grid-template-columns: minmax(86px, .7fr) minmax(0, 1.5fr); }
  .sync-bar { margin-inline: 20px; gap: 8px 16px; }
  .sync-bar > div { flex-basis: 100%; }
  .sync-error { margin-inline: 20px; }
}

@media (max-width: 350px) {
  .hero, .journey-intro { padding-inline: 20px; }
  .trip-meta { gap: 6px 8px; }
  .stop-card { padding: 18px 14px; }
  .info-item { grid-template-columns: 1fr; gap: 4px; }
  .day-number { font-size: 56px; }
}

/* Keep routine loading announcements available to screen readers. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sync-error p { margin: 0 0 12px; }
.sync-error button { font: inherit; min-height: 44px; padding: 8px 16px; color: var(--ink); background: var(--paper); border: 1px solid #c7b6a8; border-radius: 6px; }
