:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #f6f5f1;
  color: #14161a;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.page {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

.hero {
  height: 210px;
  background-color: #dde3ea;
  background-size: cover;
  background-position: center;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.head {
  padding: 20px 20px 0;
}

.kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 1.4px;
  color: #8a6a3f;
  font-weight: 700;
}

.title {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  text-wrap: balance;
}

.meta {
  margin: 4px 0 0;
  font-size: 14px;
  color: #5b6470;
  font-variant-numeric: tabular-nums;
}

.summary {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: #333a44;
}

.map-box {
  height: 230px;
  margin: 18px 16px 0;
  border-radius: 16px;
  overflow: hidden;
  background: #e8ebe7;
}

.map {
  width: 100%;
  height: 100%;
}

.map-card {
  margin: 8px 16px 0;
  padding: 12px;
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2ded6;
  border-radius: 12px;
}

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

.map-card-body {
  flex: 1;
}

.map-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  text-wrap: balance;
}

.map-card-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: #5b6470;
  font-variant-numeric: tabular-nums;
}

.map-card-note {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: #333a44;
}

.map-card-close {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: -8px -8px 0 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #5b6470;
  cursor: pointer;
}

.map-card-close:focus-visible,
.footer-link:focus-visible {
  outline: 2px solid #208aef;
  outline-offset: 2px;
}

.day {
  margin: 22px 20px 0;
}

.day-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #5b6470;
  font-variant-numeric: tabular-nums;
}

.stop {
  display: flex;
  gap: 12px;
  min-height: 44px;
  padding: 12px;
  margin-bottom: 8px;
  background: #fff;
  border-left: 3px solid #208aef;
  border-radius: 12px;
}

.stop-time {
  width: 46px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #5b6470;
  font-variant-numeric: tabular-nums;
}

.stop-body {
  flex: 1;
}

.stop-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.stop-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: #5b6470;
  font-variant-numeric: tabular-nums;
}

.stop-note {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: #333a44;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 30px 20px 0;
  padding-top: 16px;
  border-top: 1px solid #e2ded6;
}

.footer-text {
  margin: 0;
  font-size: 12px;
  color: #8a8f98;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #8a6a3f;
  text-decoration: none;
}

.offline-note {
  margin: 8px 20px 0;
  font-size: 12px;
  line-height: 1.4;
  color: #8a6a3f;
}

.page.center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: calc(32px + env(safe-area-inset-top, 0px)) 32px
    calc(32px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.brand {
  margin: 0;
  font-size: 14px;
  letter-spacing: 2px;
  color: #8a6a3f;
  font-weight: 700;
}

.error-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  text-wrap: balance;
}

.muted {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #5b6470;
}

.shell {
  pointer-events: none;
}

.skeleton-line,
.skeleton-hero,
.skeleton-map {
  background: linear-gradient(90deg, #e8e6e0 25%, #f1efe9 37%, #e8e6e0 63%);
  background-size: 400% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}

.skeleton-hero {
  background: linear-gradient(90deg, #dde3ea 25%, #e9eef2 37%, #dde3ea 63%);
  background-size: 400% 100%;
}

.skeleton-line {
  height: 14px;
  margin: 0 0 10px;
  border-radius: 7px;
}

.skeleton-title {
  width: 70%;
  height: 32px;
  margin-top: 6px;
}

.skeleton-meta {
  width: 52%;
}

.skeleton-meta.short,
.skeleton-name.short {
  width: 34%;
}

.skeleton-map {
  height: 230px;
  margin: 18px 16px 0;
  border-radius: 16px;
}

.skeleton-day {
  width: 30%;
  height: 13px;
  margin-top: 22px;
}

.skeleton-stop {
  border-left-color: #e8e6e0;
}

.skeleton-time {
  width: 46px;
  height: 13px;
  flex: none;
  margin: 2px 0 0;
}

.skeleton-name {
  width: 58%;
  height: 16px;
}

.skeleton-stop .skeleton-meta {
  width: 36%;
  height: 12px;
}

@keyframes skeleton {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

@supports (corner-shape: squircle) {
  .map-box,
  .map-card,
  .stop {
    corner-shape: squircle;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-line,
  .skeleton-hero,
  .skeleton-map {
    animation: none;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 26px;
  }

  .map-box {
    margin-left: 12px;
    margin-right: 12px;
  }

  .day {
    margin-left: 16px;
    margin-right: 16px;
  }
}
