:root {
  --ink: #111;
  --paper: #fff;
  --hair: #d8d8d8;
  --muted: #6b6b6b;
  --accent: #111;
  --join: #111;
  --leave: #111;
  --pad: clamp(18px, 5vw, 40px);
}

* { box-sizing: border-box; }

/* form controls don't inherit text-transform by default */
button, input, textarea, select, ::placeholder { text-transform: inherit; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-transform: lowercase;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 7vw, 64px) var(--pad) 80px;
}

/* ---- Invite header ---- */
.invite { text-align: center; }
.eyebrow {
  font-size: 16px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.title {
  margin: 0 0 5px;
}
.title img {
  display: block;
  width: 510px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.subtitle {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}
.intro {
  margin: 24px 0 0;
  text-align: left;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}
.intro + .intro { margin-top: 16px; }
ol { list-style-type: lower-alpha; }
a { color: var(--ink); }
.meta {
  font-weight: 400;
  font-size: clamp(14px, 3.4vw, 17px);
  margin: 0 auto 22px;
}
.blurb {
  max-width: 52ch;
  margin: 0 auto;
  color: #333;
  font-size: clamp(15px, 3.6vw, 17px);
  line-height: 1.6;
}

/* ---- Map ---- */
.map-card {
  margin: clamp(28px, 7vw, 52px) 0 8px;
}
#map {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper);
}
#map .hood {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.8;
  opacity: 0.28;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
#map .trail {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  opacity: 0.32;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
#map .trail-live {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
#map .endpt {
  fill: var(--ink);
}
#map .marker {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
#map .marker-hit {
  fill: transparent;
  cursor: grab;
  touch-action: none;
}
#map .marker-hit:active { cursor: grabbing; }
#map .marker-label {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 4px;
}
#map .endpt-label {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  fill: var(--muted);
}

/* ---- Slider ---- */
.time-field {
  margin: 24px 0 30px;
}
.time-label {
  display: block;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 16px;
}
.readout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: end;
  margin-bottom: 19.5px;
}
.leg { display: flex; flex-direction: column; gap: 3px; }
.leg.leave { text-align: right; }
.leg .tag {
  font-size: 16px;
  color: var(--muted);
}
.leg strong {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  line-height: 1;
}
.leg.leave strong { justify-content: flex-end; }
.time-glyph { display: block; height: 35px; width: auto; }
.time-ampm {
  font-family: Fraunces, Georgia, serif;
  font-size: 18px;
  margin-left: 6px;
}
.leg .where {
  font-size: 16px;
  color: #333;
}
.together {
  align-self: center;
  font-size: 16px;
  color: var(--muted);
  text-align: center;
  padding-bottom: 4px;
  white-space: nowrap;
}

/* dual range slider */
.slider {
  position: relative;
  height: 44px;
  --thumb: 19.5px;
}
.slider .track,
.slider .fill {
  position: absolute;
  top: 20.5px;
  height: 3px;
  border-radius: 4px;
}
.slider .track {
  left: 26px; right: 26px;
  background: var(--hair);
}
.slider .fill {
  background: var(--ink);
}
.slider input[type=range] {
  position: absolute;
  top: 0;
  left: 13px;
  right: 13px;
  width: auto;
  height: 44px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--thumb);
  height: var(--thumb);
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  cursor: grab;
  pointer-events: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
.slider input[type=range]::-webkit-slider-thumb:active { cursor: grabbing; }
.slider input[type=range]::-moz-range-thumb {
  width: var(--thumb);
  height: var(--thumb);
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  cursor: grab;
  pointer-events: auto;
}
.slider input[type=range]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.ticks {
  position: absolute;
  top: 37px;
  left: 0; right: 0;
  height: 20px;
}
.ticks .tick {
  position: absolute;
  transform: translateX(-50%);
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- RSVP ---- */
.rsvp-card, .guests-card { margin-top: 34px; }
.rsvp-card h2, .guests-card h2 {
  font-family: Fraunces, Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 18px;
}
#rsvp-heading.as-image, #walkers-heading.as-image { margin: 0 0 8px; }
/* untrimmed: both SVGs share an 81px canvas, so equal height = equal letter scale */
#rsvp-heading img, #walkers-heading img { display: block; height: 55.8px; width: auto; }
.field {
  display: block;
  margin-bottom: 16px;
}
.field span {
  display: block;
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 13px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.field input:focus {
  outline: none;
}
.field span small {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.linkbtn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.linkbtn.load {
  display: inline-block;
  margin-top: 9px;
}
.signed-in {
  font-size: 16px;
  color: var(--muted);
  margin: -4px 0 20px;
}
.signed-in b { color: var(--ink); font-weight: 400; }
.chosen {
  font-size: 14px;
  color: #333;
  margin: 4px 0 18px;
}
/* filled black button: the "send rsvp" (new signup) state */
#submit {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 400;
  font-family: inherit;
  color: var(--paper);
  background: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
}
#submit:hover { opacity: 0.85; }
#submit:disabled { opacity: 0.45; cursor: default; }
.phone-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.phone-row input { flex: 1; }
/* continue button uses the hand-lettered SVG, matched to the input height */
#phone-continue {
  flex: 0 0 auto;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
#phone-continue:hover { opacity: 0.6; }
#phone-continue:disabled { opacity: 0.45; cursor: default; }
#phone-continue img, #phone-continue svg { display: block; height: 51.84px; width: auto; }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0 20px; /* row-gap (when wrapped) / column-gap (side by side) */
}
.btn-row > #submit:not(.as-image) { align-self: stretch; } /* full-width black button in signup */

/* edit-mode buttons use the hand-lettered SVGs */
#submit.as-image, #cant-make-it {
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: opacity 0.15s;
}
/* edit-mode buttons: fixed size, stacked and centered */
#submit.as-image, #cant-make-it { flex: 0 0 auto; width: auto; }
#submit.as-image img, #cant-make-it img {
  display: block;
  height: 84px;
  width: auto;
}
/* signup "continue" (trimmed → inline svg): match the first-page continue button */
#submit.as-image svg { display: block; height: 51.84px; width: auto; }
#submit.as-image:hover, #cant-make-it:hover { opacity: 0.6; }
#cant-make-it:disabled { opacity: 0.45; cursor: default; }
.form-msg {
  margin: 14px 0 0;
  font-size: 16px;
  min-height: 20px;
}
.form-msg.ok { color: #167a3c; }
.form-msg.err { color: #b12a2a; }
.form-msg.gray { color: var(--muted); }

/* ---- Guests ---- */
#guests {
  list-style: none;
  margin: 0;
  padding: 0;
}
#guests li {
  padding: 12px 0;
  border-top: 1px solid var(--hair);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 16px;
}
#guests li:first-child { border-top: none; padding-top: 0; }
#guests li .g-name { font-weight: 400; }
#guests li .g-when { color: var(--muted); white-space: nowrap; }
#guests li .g-note {
  flex-basis: 100%;
  font-size: 16px;
  color: #444;
  font-style: italic;
}

.foot {
  margin-top: 46px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 460px) {
  .together { display: none; }
  .readout { grid-template-columns: 1fr 1fr; }
  /* 15% smaller headings on mobile */
  #rsvp-heading img, #walkers-heading img { height: 47.43px; }
  /* tighter space above the walkers list on mobile */
  .guests-card { margin-top: 17px; }
}
