:root {
  --bg: #EAF4F1;
  --surface: #FFFFFF;
  --ink: #0F3B3A;
  --muted: #4C6B69;
  --line: #C9DFDA;
  --coral: #D9466F;
  --sun: #F6C453;
  --wear-bg: #FCE8EE;
  --wear-ink: #8A2445;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D2627;
    --surface: #133233;
    --ink: #E6F2EF;
    --muted: #9DBDB9;
    --line: #23494A;
    --coral: #F27A9C;
    --sun: #F6C453;
    --wear-bg: #3A1F2B;
    --wear-ink: #F7B8CA;
  }
}
:root[data-theme="dark"] {
  --bg: #0D2627;
  --surface: #133233;
  --ink: #E6F2EF;
  --muted: #9DBDB9;
  --line: #23494A;
  --coral: #F27A9C;
  --sun: #F6C453;
  --wear-bg: #3A1F2B;
  --wear-ink: #F7B8CA;
}
*, *::before, *::after { box-sizing: inherit; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 64px); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Figtree", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 3.5rem 0 2.75rem; }
.sun {
  position: absolute;
  width: 22rem; height: 22rem;
  right: -6rem; top: -4rem;
  border-radius: 50%;
  background:
    repeating-linear-gradient(to bottom, transparent 0 58%, var(--bg) 58% 61%, transparent 61% 66%, var(--bg) 66% 69.5%, transparent 69.5% 75%, var(--bg) 75% 79%, transparent 79% 85%, var(--bg) 85% 90%, transparent 90%),
    linear-gradient(to bottom, var(--sun), var(--coral));
  opacity: .9;
}
.hero .wrap { position: relative; }
h1 {
  font-family: "Poiret One", "Futura", "Century Gothic", sans-serif;
  font-weight: 400;
  font-size: clamp(3.2rem, 14vw, 5.5rem);
  line-height: .95;
  letter-spacing: -.01em;
  margin: 0 0 1.25rem;
  max-width: 10ch;
}
.hero p { margin: 0; color: var(--muted); max-width: 30rem; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; padding: 0; list-style: none; }
.facts li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .9rem;
}

/* Lock screen (lives in the hero) */
.hero:has(.gate:not([hidden])) { min-height: 100vh; min-height: 100svh; }
.gate form { display: flex; gap: .5rem; margin-top: 1.25rem; max-width: 24rem; }
.gate input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 1rem; /* 16px+ keeps iOS from zooming */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .6rem 1rem;
}
.gate input:focus { outline: 2px solid var(--coral); outline-offset: 2px; border-color: var(--coral); }
.gate button {
  flex: 0 0 auto;
  font: inherit;
  font-weight: 600;
  color: var(--surface);
  background: var(--coral);
  border: 1px solid var(--coral);
  border-radius: 999px;
  padding: .6rem 1.2rem;
  cursor: pointer;
}
.gate button:disabled { opacity: .6; cursor: default; }
.gate .err { color: var(--coral); font-weight: 500; min-height: 1.55em; margin-top: .75rem; }
.gate.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .gate.shake { animation: none; } }

/* Day nav */
nav.days {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
nav.days .wrap { display: flex; gap: .5rem; padding-top: .7rem; padding-bottom: .7rem; overflow-x: auto; }
nav.days a {
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: .95rem;
  padding: .4rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
nav.days a:hover { border-color: var(--coral); }
nav.days a[aria-current="date"] { background: var(--coral); border-color: var(--coral); color: var(--surface); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }

/* Days */
section.day { padding: 2.5rem 0 1rem; }
main { padding-bottom: 2.5rem; }
.day-head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
h2 {
  font-family: "Poiret One", "Futura", "Century Gothic", sans-serif;
  font-weight: 400;
  font-size: 2.6rem;
  line-height: 1;
  margin: 0;
}
.theme { color: var(--coral); font-weight: 500; }

ol.stops { list-style: none; margin: 0; padding: 0; position: relative; }
ol.stops::before {
  content: "";
  position: absolute;
  left: 5.15rem; top: .6rem; bottom: .6rem;
  width: 2px;
  background: var(--line);
}
.stop { display: grid; grid-template-columns: 4.6rem 1fr; gap: 0 1.25rem; padding-bottom: 1.6rem; position: relative; }
.stop time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: .9rem;
  color: var(--muted);
  text-align: right;
  padding-top: .15rem;
  white-space: nowrap;
}
.stop::after {
  content: "";
  position: absolute;
  left: 4.88rem; top: .45rem;
  width: .65rem; height: .65rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--coral);
}
.stop.key::after { background: var(--coral); }
.stop h3 { margin: 0 0 .2rem; font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
.stop p { margin: 0 0 .5rem; color: var(--muted); font-size: .95rem; }
.open {
  display: table;
  background: var(--wear-bg);
  color: var(--wear-ink);
  border-radius: .6rem;
  padding: .35rem .7rem;
  font-size: .88rem;
  line-height: 1.4;
}
.open em { font-style: normal; font-weight: 600; }
.stop h3 + .open { margin-top: .35rem; }
.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.3;
  padding: .12rem .55rem;
  border-radius: 999px;
  margin-left: .45rem;
  vertical-align: .12em;
  white-space: nowrap;
}
.tag.suggest { border: 1px dashed var(--muted); color: var(--muted); }
.tag.booked { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.tag.pending { border: 1px solid var(--coral); color: var(--coral); }

@media (max-width: 30rem) {
  .stop { grid-template-columns: 3.9rem 1fr; gap: 0 1rem; }
  ol.stops::before { left: 4.35rem; }
  .stop::after { left: 4.08rem; }
  .sun { width: 15rem; height: 15rem; right: -5rem; top: -3rem; }
  h2 { font-size: 2.2rem; }
}
