:root {
  color-scheme: light;
  --green: #234638;
  --green-light: #e7eee8;
  --cream: #f5f0e5;
  --paper: #fffcf4;
  --red: #a5483c;
  --gold: #c49a52;
  --ink: #30332f;
  --muted: #6d716a;
  --line: #ded8cb;
  --shadow: 0 12px 30px rgb(35 70 56 / 8%);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 85% 4%, rgb(196 154 82 / 11%), transparent 26rem),
    var(--cream);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(18px, calc((100vw - 760px) / 2));
  border-bottom: 1px solid rgb(48 51 47 / 8%);
  background: rgb(245 240 229 / 94%);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--red);
  font-size: 21px;
}

.brand-name,
.brand-place {
  display: block;
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
}

.brand-place {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
  white-space: nowrap;
}

.connection-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5e8a68;
  box-shadow: 0 0 0 3px rgb(94 138 104 / 14%);
}

.connection-status.is-offline {
  color: var(--red);
}

.connection-status.is-offline .connection-dot {
  background: var(--red);
  box-shadow: 0 0 0 3px rgb(165 72 60 / 13%);
}

main {
  width: min(100% - 32px, 600px);
  margin: 0 auto;
  padding: 22px 0 50px;
}

.offline-notice,
.storage-notice {
  margin: 0 0 17px;
  padding: 10px 12px;
  border: 1px solid rgb(35 70 56 / 14%);
  border-radius: 10px;
  background: rgb(255 252 244 / 72%);
  color: var(--green);
  font-size: 12px;
  line-height: 1.45;
}

.storage-notice {
  border-color: rgb(165 72 60 / 30%);
  color: var(--red);
}

.welcome {
  padding: 15px 3px 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
}

.welcome h1 {
  margin-bottom: 12px;
  font-size: clamp(35px, 9vw, 48px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.welcome h1 em {
  color: var(--red);
  font-weight: 400;
}

.intro {
  max-width: 420px;
  margin-bottom: 14px;
  color: #565b54;
  font-size: 15px;
  line-height: 1.6;
}

.demo-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #765d31;
  font-size: 12px;
  font-weight: 650;
}

.demo-label span {
  color: var(--gold);
  font-size: 16px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 12px 0 13px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.section-heading .eyebrow {
  margin-bottom: 5px;
}

.route-choices {
  display: grid;
  gap: 10px;
}

.route-card {
  display: flex;
  width: 100%;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: 0 3px 8px rgb(35 70 56 / 3%);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, transform 140ms ease;
}

.route-card:active {
  transform: scale(0.99);
}

.route-card:hover {
  border-color: var(--gold);
}

.route-number {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
}

.route-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
}

.route-copy strong {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.route-copy span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.route-distance {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.route-distance span {
  margin-left: 4px;
  color: var(--gold);
  font-size: 19px;
}

.resume-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 24px;
  padding: 16px;
  border: 1px solid rgb(35 70 56 / 20%);
  border-radius: 14px;
  background: var(--green);
  color: white;
  box-shadow: var(--shadow);
}

.resume-card .eyebrow {
  margin-bottom: 5px;
  color: #ead9b7;
}

.resume-card strong,
.resume-card span {
  display: block;
}

.resume-card strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
}

.resume-card span:not(.eyebrow) {
  margin-top: 4px;
  color: rgb(255 255 255 / 75%);
  font-size: 12px;
}

.primary-button,
.secondary-button,
.small-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.primary-button {
  padding: 0 18px;
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
}

.resume-card .primary-button {
  min-width: 130px;
  border-color: #e7d4a9;
  background: #e7d4a9;
  color: var(--green);
}

.secondary-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--green);
}

.small-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--green);
  font-size: 12px;
}

.progress-card {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgb(255 252 244 / 65%);
}

.progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.progress-copy .eyebrow {
  margin: 0;
}

.progress-copy strong {
  color: var(--green);
  font-size: 13px;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  margin: 12px 0 8px;
  border-radius: 99px;
  background: #e4ded2;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 180ms ease;
}

.text-button {
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.walk-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.back-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 0;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.back-button:first-letter {
  font-size: 24px;
}

.walk-tag {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgb(255 252 244 / 70%);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.walk-heading {
  margin-bottom: 16px;
}

.walk-heading h1 {
  margin-bottom: 6px;
  font-size: 30px;
  font-weight: 500;
}

.walk-progress {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.map-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px 0;
}

.map-heading .eyebrow {
  margin-bottom: 4px;
}

.map-heading strong {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 500;
}

.map-north {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.route-map {
  padding: 0 5px;
}

.route-map svg {
  display: block;
  width: 100%;
  max-height: 260px;
}

.route-map svg::before {
  fill: var(--cream);
}

.map-route {
  fill: none;
  stroke: #8ca48b;
  stroke-dasharray: 4 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.map-marker .marker-dot {
  fill: var(--paper);
  stroke: var(--gold);
  stroke-width: 3;
}

.map-marker.seen .marker-dot {
  fill: var(--green);
  stroke: var(--green);
}

.map-marker.skipped .marker-dot {
  fill: #f2e7dc;
  stroke: var(--red);
}

.map-marker text {
  fill: var(--green);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 9px;
  font-weight: 800;
  text-anchor: middle;
}

.map-marker.seen text {
  fill: white;
}

.map-marker.skipped text {
  fill: var(--red);
}

.marker-halo {
  fill: rgb(196 154 82 / 18%);
  stroke: var(--gold);
  stroke-dasharray: 2 3;
  stroke-width: 1;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  padding: 10px 15px 13px;
  border-top: 1px solid rgb(48 51 47 / 7%);
  color: var(--muted);
  font-size: 10px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--paper);
}

.legend-dot.seen {
  border-color: var(--green);
  background: var(--green);
}

.legend-dot.selected {
  outline: 2px solid rgb(196 154 82 / 30%);
}

.gps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(255 252 244 / 60%);
}

.gps-row strong,
.gps-row span {
  display: block;
}

.gps-row strong {
  margin-bottom: 3px;
  color: var(--green);
  font-size: 12px;
}

.gps-row span {
  max-width: 320px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.next-stop-card {
  padding: 16px;
  border: 1px solid rgb(35 70 56 / 20%);
  border-radius: 15px;
  background: var(--green);
  box-shadow: var(--shadow);
  color: white;
}

.next-stop-card .eyebrow {
  margin-bottom: 11px;
  color: #ead9b7;
}

#nextStop {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 43px;
}

.stop-index {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d5bd8d;
  border-radius: 50%;
  color: #f2dfb6;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
}

.next-stop-copy strong,
.next-stop-copy span {
  display: block;
}

.next-stop-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

.next-stop-copy span {
  margin-top: 4px;
  color: rgb(255 255 255 / 73%);
  font-size: 11px;
}

.all-done {
  margin: 0;
  color: white;
  font-size: 13px;
  line-height: 1.5;
}

.stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.stop-actions .primary-button {
  min-width: 125px;
  border-color: #e7d4a9;
  background: #e7d4a9;
  color: var(--green);
}

.stop-actions .secondary-button {
  border-color: rgb(255 255 255 / 33%);
  background: transparent;
  color: white;
}

.stop-list-section {
  margin-top: 25px;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 10px;
}

.section-heading.compact h2 {
  font-size: 21px;
}

.list-count {
  color: var(--muted);
  font-size: 11px;
}

.stop-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stop-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgb(255 252 244 / 76%);
}

.stop-row.is-current {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgb(196 154 82 / 12%);
}

.stop-select {
  display: flex;
  min-width: 0;
  min-height: 56px;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.stop-list-number {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
}

.stop-list-copy {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 3px;
}

.stop-list-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stop-list-copy small {
  color: var(--muted);
  font-size: 10px;
}

.stop-state {
  padding: 0 4px;
  color: var(--gold);
  font-size: 18px;
}

.stop-row.seen .stop-state,
.stop-row.seen .stop-list-number {
  color: var(--green);
}

.stop-row.skipped .stop-state,
.stop-row.skipped .stop-list-copy small {
  color: var(--red);
}

.undo-inline {
  min-height: 42px;
  margin-right: 7px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.stop-for-today {
  width: 100%;
  min-height: 50px;
  margin-top: 20px;
  border: 1px solid var(--green);
  border-radius: 11px;
  background: transparent;
  color: var(--green);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.stop-for-today:hover {
  background: var(--green-light);
}

.site-footer {
  display: flex;
  width: min(100% - 32px, 600px);
  justify-content: space-between;
  gap: 10px;
  margin: 0 auto;
  padding: 0 0 23px;
  color: var(--muted);
  font-size: 10px;
}

.toast {
  position: fixed;
  z-index: 5;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 16px;
  width: fit-content;
  max-width: min(500px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 13px 17px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 12px;
  background: var(--green);
  box-shadow: var(--shadow);
  color: white;
  font-size: 13px;
}

@media (min-width: 720px) {
  main {
    padding-top: 32px;
  }

  .welcome {
    padding-top: 27px;
  }
}

@media (max-width: 380px) {
  .site-header {
    padding-right: 12px;
    padding-left: 12px;
  }

  .connection-status {
    font-size: 10px;
  }

  .brand-name {
    font-size: 13px;
  }

  .resume-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .resume-card .primary-button {
    width: 100%;
  }

  .progress-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

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