/* Road trips · Tribeca design */
:root {
  --bg-page: #FFFFFF;
  --bg-subtle: #FAFAFA;
  --bg-muted: #F4F4F5;
  --border-hairline: #E4E4E7;
  --border-strong: #D4D4D8;
  --text-primary: #09090B;
  --text-secondary: #71717A;
  --text-tertiary: #A1A1AA;
  --accent-black: #09090B;
  --accent-black-hover: #27272A;
  --status-confirmed: #16A34A;
  --status-warning: #D97706;
  --status-error: #DC2626;
  --radius-pill: 9999px;
  --radius-card: 16px;
  --radius-inner: 12px;
  --header-h: 3.5rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  min-height: 100vh;
}

h1, h2, h3, .heading-tight {
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}

button, input, textarea, select {
  font: inherit;
  letter-spacing: inherit;
}

a { color: inherit; }

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

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.btn-pill-primary,
.btn-pill-secondary,
.btn-pill-ghost,
.btn-pill-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn-pill-primary {
  background: var(--accent-black);
  color: #fff;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--accent-black);
}
.btn-pill-primary:hover { background: var(--accent-black-hover); }
.btn-pill-primary:active { transform: scale(0.99); }

.btn-pill-secondary {
  background: #fff;
  color: var(--text-primary);
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-hairline);
}
.btn-pill-secondary:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
}

.btn-pill-ghost {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  padding: 0.45rem 0.875rem;
  border: 1px solid transparent;
}
.btn-pill-ghost:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.btn-pill-danger {
  background: #fff;
  color: var(--status-error);
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-hairline);
}
.btn-pill-danger:hover { background: #FEF2F2; }

.btn-icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--bg-muted); }

.tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.95rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  border: 1px solid var(--border-hairline);
  background: #fff;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.tab-pill:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}
.tab-pill.active {
  background: var(--bg-muted);
  color: var(--text-primary);
  border-color: var(--text-primary);
  font-weight: 600;
}

.surface-card {
  background: #fff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
}

.surface-subtle {
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-inner);
}

.editorial-photo {
  filter: grayscale(100%) contrast(1.06);
  transition: filter 0.25s ease;
}
.editorial-photo:hover { filter: grayscale(65%) contrast(1.04); }

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-hairline);
  padding-top: var(--safe-top);
}

.header-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.header-row {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: var(--accent-black);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 14px; height: 14px; display: block; }

.brand-title {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-meta {
  display: none;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding-left: 0.5rem;
  border-left: 1px solid var(--border-hairline);
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .header-inner { padding: 0 1.5rem; }
  .brand-meta { display: inline-flex; }
}

.dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--status-confirmed);
  flex-shrink: 0;
}
.dot.warn { background: var(--status-warning); }
.dot.muted { background: var(--text-tertiary); }

.search-wrap {
  position: relative;
  flex-shrink: 0;
}
.search-wrap input {
  width: 9rem;
  height: 2rem;
  padding: 0 1.6rem 0 0.75rem;
  font-size: 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search-wrap input::placeholder { color: var(--text-tertiary); }
.search-wrap input:focus { border-color: var(--text-primary); }
@media (min-width: 640px) {
  .search-wrap input { width: 13rem; }
}
.search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.search-clear:hover { color: var(--text-primary); }

.day-nav {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  overflow-x: auto;
  padding: 0.125rem 0 0.75rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.header-actions .btn-pill-primary,
.header-actions .btn-pill-secondary,
.header-actions .btn-pill-ghost {
  display: none;
}
@media (min-width: 860px) {
  .header-actions .btn-pill-primary,
  .header-actions .btn-pill-secondary,
  .header-actions .btn-pill-ghost {
    display: inline-flex;
  }
}

main.app-main {
  flex: 1;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}
@media (min-width: 640px) {
  main.app-main { padding: 1.5rem 1.5rem 2.5rem; }
}

.app-footer {
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  margin-top: auto;
  padding-bottom: var(--safe-bottom);
}
.footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
@media (min-width: 640px) {
  .footer-inner {
    padding: 1rem 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.75rem; }

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}
@media (min-width: 640px) {
  .hero-card {
    padding: 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.hero-card h1 {
  font-size: 1.25rem;
  margin: 0.25rem 0;
  color: var(--text-primary);
}
@media (min-width: 640px) {
  .hero-card h1 { font-size: 1.5rem; }
}
.hero-card p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
@media (min-width: 640px) {
  .hero-card p { font-size: 0.875rem; }
}

.row-card {
  padding: 1rem 1.25rem;
  transition: border-color 0.15s ease;
}
.row-card:hover { border-color: var(--border-strong); }
.row-card-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .row-card { padding: 1.25rem; }
  .row-card-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-muted);
  border: 1px solid var(--border-hairline);
  padding: 0.125rem 0.625rem;
  border-radius: var(--radius-pill);
}
.muted { color: var(--text-secondary); font-size: 0.75rem; }
.status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}
.row-card h2 {
  font-size: 1rem;
  margin: 0.35rem 0 0.25rem;
  line-height: 1.35;
}
.row-card .summary {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.row-card .hotel-line {
  font-size: 0.75rem;
  color: var(--text-primary);
  margin: 0.25rem 0 0;
}
.row-card .hotel-line span { color: var(--text-secondary); }
.row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-hairline);
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .row-actions {
    padding-top: 0;
    border-top: 0;
  }
}

.stop-card { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .stop-card { padding: 1.25rem; } }
.stop-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.stop-cat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stop-num {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--bg-muted);
  border: 1px solid var(--border-hairline);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stop-card h3 { font-size: 1rem; margin: 0 0 0.25rem; }
.stop-card .desc {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
@media (min-width: 640px) {
  .stop-card .desc { font-size: 0.875rem; }
}
.addr-box {
  padding: 0.625rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
}
@media (min-width: 640px) {
  .addr-box {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.addr-box .addr { color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; }
.addr-box .park { color: var(--text-secondary); }
.addr-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.day-hero { overflow: hidden; }
.day-hero-top {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .day-hero-top {
    padding: 1.5rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.day-hero-top .btn-pill-primary {
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
}

.day-hero-top .day-tag { font-size: 0.75rem; color: var(--text-secondary); }
.day-hero-top h1 { font-size: 1.25rem; margin: 0.25rem 0; }
@media (min-width: 640px) { .day-hero-top h1 { font-size: 1.5rem; } }
.day-hero-top .meta { font-size: 0.75rem; color: var(--text-secondary); margin: 0; }
.photo-wrap {
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
}
.photo-frame {
  position: relative;
  height: 11rem;
  width: 100%;
  overflow: hidden;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 640px) { .photo-frame { height: 14rem; } }
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-fallback {
  display: none;
  text-align: center;
  padding: 0 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.photo-caption {
  padding: 0.625rem 1.25rem;
  font-size: 11px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-hairline);
}

.alert-box {
  padding: 0.875rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.75rem;
  line-height: 1.55;
}
.alert-box .dot { margin-top: 0.35rem; }
.alert-box strong { font-weight: 600; color: var(--text-primary); }
.alert-box span.body { color: var(--text-secondary); }

.empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.empty-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bg-muted);
  border: 1px solid var(--border-hairline);
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.empty h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.empty p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  max-width: 24rem;
  margin: 0 auto 0.75rem;
  line-height: 1.5;
}

.install-banner {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.install-banner p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.install-banner strong { color: var(--text-primary); font-weight: 600; }

.icon-nav {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(9, 9, 11, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal[hidden] { display: none; }
@media (min-width: 640px) {
  .modal {
    align-items: center;
    padding: 1.5rem;
  }
}
.sheet {
  background: #fff;
  width: 100%;
  max-width: 36rem;
  max-height: 92dvh;
  overflow: auto;
  border-radius: 20px 20px 0 0;
  padding: 1.25rem 1.25rem calc(1.25rem + var(--safe-bottom));
  box-shadow: 0 -8px 32px rgba(9, 9, 11, 0.08);
}
@media (min-width: 640px) {
  .sheet {
    border-radius: 16px;
    padding: 1.5rem;
    max-height: 88vh;
  }
}
.sheet h2 { font-size: 1.125rem; margin: 0 0 0.25rem; }
.sheet .sheet-lead {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.form-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  background: var(--bg-subtle);
  color: var(--text-primary);
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { min-height: 5.5rem; resize: vertical; line-height: 1.45; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--text-primary); background: #fff; }
.field-check {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.25rem;
}
.field-check label {
  text-transform: none;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .field-row.two { grid-template-columns: 1fr 1fr; }
}
.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-hairline);
}
.sheet-actions .spacer { flex: 1; }

.toast {
  position: fixed;
  bottom: calc(1.25rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-black);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(9, 9, 11, 0.18);
}
.toast[hidden] { display: none; }
.toast-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--status-confirmed);
}

.menu-pop {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
}
.linkish:hover { color: var(--text-primary); }

.offline-pill {
  font-size: 11px;
  color: var(--status-warning);
  border: 1px solid var(--border-hairline);
  background: #fff;
  border-radius: var(--radius-pill);
  padding: 0.15rem 0.55rem;
}
