@font-face {
  font-family: Montserrat;
  src: url("/montserrat-300.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("/montserrat-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Lora;
  src: url("/lora-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #382711;
  --paper: #fffefa;
  --accent-paper: #f9f7ed;
  --muted: #635645;
  --faint: #786c59;
  --line: #d6d1be;
  --outline: #a89b80;
  --error: #8d332c;
  --body: Lora, Georgia, serif;
  --display: Montserrat, Arial, sans-serif;
  font: 1rem/1.8 var(--body);
  background: var(--paper);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--ink); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
::selection { background: #e9e2d0; color: var(--ink); }
input { caret-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1:focus, h2:focus { outline: none; }
h1, h2, p { margin: 0; }
p { max-width: 66ch; }

.shell { width: min(100% - 2.5rem, 72.5rem); margin: auto; }
.masthead, .page-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}
.masthead { min-height: 5.25rem; padding: 1rem 0; }
.wordmark {
  max-width: 12rem;
  font: 500 clamp(.75rem, 1.4vw, 1.125rem)/1.8 var(--display);
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--ink);
}
#site-context, .masthead-actions a {
  font: 500 .75rem/1.5 var(--display);
  letter-spacing: .15em;
  text-align: right;
  text-transform: uppercase;
}
.page-footer {
  border-top: 1px solid var(--line);
  padding: 1rem 0 1.65rem;
  color: var(--muted);
  font-size: .8125rem;
  flex-wrap: wrap;
}
.client-main, .page-footer { width: min(100%, 50rem); margin-inline: auto; }
.preview-label { margin-top: .75rem; color: var(--muted); font-size: .875rem; }
.client-main { padding: 1.25rem 0 2rem; }
.intro { margin: 0 auto 1.75rem; max-width: 37rem; text-align: center; }
h1 {
  font: 300 clamp(1.45rem, 1rem + 1.25vw, 2.125rem)/1.4 var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-wrap: balance;
}
.intro p { margin: .6rem auto 0; color: var(--ink); line-height: 1.85; }
.picker {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.calendar-pane, .time-pane { min-width: 0; padding: .9rem; }
.month-nav { display: flex; justify-content: space-between; align-items: center; gap: .4rem; margin-bottom: .75rem; }
h2 {
  font: 500 .875rem/1.55 var(--display);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.month-buttons { display: flex; gap: .3rem; }
.icon-button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
}
.icon-button:hover:not(:disabled) { background: var(--accent-paper); }
.icon-button:disabled { color: var(--faint); opacity: .52; }
.chevron {
  width: .45rem;
  height: .45rem;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.chevron.left { transform: rotate(-135deg); }
.weekdays, .month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .2rem;
  text-align: center;
}
.weekdays { margin-bottom: .35rem; color: var(--muted); font-size: .875rem; }
.month-days { grid-auto-rows: minmax(2.75rem, auto); }
.day {
  display: grid;
  place-items: center;
  border-radius: 5px;
  padding: 0;
  border: 1px solid transparent;
  color: var(--faint);
  background: none;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.day.open { color: var(--ink); background: var(--accent-paper); border-color: var(--outline); }
.day.open, .time { font-family: var(--display); font-weight: 500; }
.day.open:hover { border-color: var(--ink); }
.day.open[aria-pressed="true"] { color: var(--paper); background: var(--ink); }
.legend { display: flex; gap: 1.25rem; margin-top: .9rem; color: var(--muted); font-size: .875rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { display: block; width: .7rem; height: .7rem; border-radius: .15rem; }
.key-available { background: var(--accent-paper); border: 1px solid var(--outline); }
.key-unavailable { background: var(--paper); border: 1px solid var(--outline); }

.time-pane { display: none; padding: 1.3rem; }
.picker.is-time .calendar-pane { display: none; }
.picker.is-time .time-pane { display: block; }
.time-pane p { color: var(--muted); margin-top: .35rem; font-size: .9375rem; }
.times { margin-top: 1.1rem; }
.times:empty { margin: 0; }
.time-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(8.5rem, 100%), 1fr));
  gap: .45rem;
}
.time-period { border-top: 1px solid var(--line); }
.time-period .time-options { margin-bottom: .75rem; }
.time-period-label { font: 500 .875rem/1.45 var(--display); }
.suggested-times { margin: 0 0 .75rem; }
.suggested-times .time-period-label { margin: 0 0 .5rem; }
.suggested-times .time { background: var(--accent-paper); border-color: var(--outline); }
.time-period summary {
  min-height: 2.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
  cursor: pointer;
}
.time-period summary::-webkit-details-marker { display: none; }
.time-period summary::after {
  content: '';
  width: .38rem;
  height: .38rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  margin: 0 .25rem .2rem 0;
}
.time-period[open] summary::after { transform: rotate(225deg); margin-bottom: 0; }
.time {
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: var(--paper);
  font-size: .875rem;
  line-height: 1.45;
  padding: .35rem .45rem;
  font-variant-numeric: tabular-nums;
  scroll-margin-bottom: 5rem;
}
.time:hover { background: var(--accent-paper); }
.time[aria-pressed="true"], .suggested-times .time[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .65rem;
  margin-top: 1.25rem;
}
#step { color: var(--muted); text-align: center; font-size: .875rem; }
.primary, .secondary, .text-button {
  min-height: 2.75rem;
  font: 500 .75rem/1.5 var(--display);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.primary, .secondary {
  border-radius: 360px;
  padding: .85rem 1.25rem;
  text-align: center;
}
.primary, .secondary {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
}
.primary:hover:not(:disabled), .secondary:hover:not(:disabled) { background: var(--accent-paper); }
.primary:disabled { background: var(--accent-paper); border-color: var(--line); color: var(--muted); }
.secondary { border-color: var(--outline); }
.text-button { color: var(--ink); background: none; border: 0; padding: 0 .4rem; text-decoration: underline; text-underline-offset: .2em; }
.text-button:hover { color: var(--ink); }
.text-button[aria-hidden="true"] { visibility: hidden; }
.feedback { margin-top: .9rem; color: var(--muted); }
.feedback.error { color: var(--error); }
#retry { margin-top: .75rem; }

.contact { display: grid; align-items: start; gap: 1.6rem; }
.details, .owner-login { display: grid; align-items: start; }
.details label, .owner-login label, .duration-form label {
  font: 500 .75rem/1.6 var(--display);
  letter-spacing: .17em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.details input, .owner-login input, .duration-form input {
  min-height: 3.125rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .55rem .7rem;
  width: 100%;
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--body);
  letter-spacing: normal;
  text-transform: none;
}
.details input { margin-bottom: 1.2rem; }
.details button { justify-self: start; }
.review { padding: 1.25rem; border-radius: 5px; border: 1px solid var(--line); background: var(--accent-paper); }
.review-list { list-style: none; padding: 0; margin: .65rem 0 0; }
.review-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .4rem;
  padding: .4rem 0;
  border-bottom: 1px solid var(--line);
}
.review-list li:last-child { border: 0; padding-bottom: 0; }
.choice-title { color: var(--muted); font-size: .875rem; }
.choice-time { font-weight: 400; }

.admin-main { display: grid; gap: 2rem; max-width: 58rem; margin-inline: auto; padding: 2.5rem 0; }
.owner-login { max-width: 24rem; }
.owner-login .primary { justify-self: start; margin-top: .75rem; }
.admin-sections { display: grid; gap: 2rem; align-items: start; }
.admin-section { min-width: 0; }
.section-bar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.panel-note { margin: .65rem 0; color: var(--muted); }
.choice-list { list-style: none; padding: 0; margin: .7rem 0; }
.choice-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  border-bottom: 1px solid var(--line);
  padding: .3rem 0;
}
.duration-form { display: grid; grid-template-columns: minmax(0, 7rem) auto; justify-content: start; gap: .4rem .65rem; margin: 1rem 0 0; }
.duration-form label { grid-column: 1 / -1; margin: 0; }
.request-card { padding: 1rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.request-card h3 { margin: 0 0 .2rem; font-size: 1rem; }
.request-card p { margin-top: .5rem; }
.request-card a { display: inline-block; }
.choice-list button { min-width: 5.4rem; }

@media (min-width: 44rem) {
  .shell { width: min(100% - 7rem, 72.5rem); }
  .client-main { padding: clamp(2.75rem, 5vw, 4rem) 0 2.5rem; }
  .intro { margin-bottom: 2rem; }
  .picker { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); }
  .calendar-pane, .picker.is-time .calendar-pane, .time-pane { display: block; padding: 1.3rem 1.45rem; }
  .time-pane { border-left: 1px solid var(--line); }
  .month-days { grid-auto-rows: minmax(2.9rem, auto); }
  .weekdays, .month-days { gap: .32rem; }
  .month-nav { margin-bottom: .75rem; }
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .admin-sections { gap: 3rem; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
}

@media (max-width: 22rem) {
  .shell { width: calc(100% - 1.25rem); }
  .calendar-pane { padding: .65rem; }
  .weekdays { font-size: .78rem; }
}

.admin-sections.single { grid-template-columns: minmax(0, 36rem); }
.masthead-actions { display: flex; align-items: baseline; gap: .8rem; }
.setup-panel { margin-top: .65rem; }
.setup-panel .secondary { display: inline-flex; align-items: center; margin: .35rem 0; text-decoration: none; }
.pairing-code { display: block; margin: .35rem 0; padding: .55rem .7rem; background: var(--accent-paper); color: var(--ink); overflow-wrap: anywhere; }
.signin { margin-top: .5rem; width: fit-content; text-decoration: none; }

.location-stage { max-width: 40rem; margin-inline: auto; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.setting-example, .place-photo { min-width: 0; margin: 0; }
.setting-option {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--ink);
  padding: 0;
  min-height: 7rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.setting-copy { display: block; padding: .75rem; }
.setting-option .location-photo { border-radius: 4px 4px 0 0; }
.location-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.location-photo-credit { color: var(--muted); font-size: .8125rem; line-height: 1.45; padding-top: .3rem; }
.location-photo-name { display: block; }
.setting-option:hover, .place-added { background: var(--accent-paper); }
.setting-name {
  display: block;
  font: 500 .875rem/1.5 var(--display);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .3rem;
}
.city-group { padding: .65rem 0 1.15rem; }
.city-group h2 { padding: .5rem .65rem; border-bottom: 1px solid var(--line); }
.places-list { list-style: none; padding: 0; margin: 0; }
.place-row, .shortlist-row {
  padding: .75rem .65rem;
  border-bottom: 1px solid var(--line);
}
.place-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; }
.place-photo { grid-column: 1 / -1; }
.place-photo .location-photo { aspect-ratio: 2 / 1; border-radius: 5px; }
.place-row .secondary { padding-inline: .8rem; }
.place-name { font: inherit; margin: 0 0 .15rem; }
.place-description p, .estimate, .travel-note, .review-location { color: var(--muted); font-size: .875rem; line-height: 1.6; }
.estimate { margin-bottom: .25rem; }
.travel-note { margin: 1rem .65rem .4rem; }
.shortlist-actions, .primary-location { display: flex; align-items: center; gap: .5rem; }
.shortlist-actions { flex-wrap: wrap; justify-content: space-between; }
.primary-location { min-height: 2.75rem; cursor: pointer; }
.primary-location input { accent-color: var(--ink); }
.custom-place { display: grid; gap: .3rem; margin-top: .5rem; font-size: .875rem; }
.custom-place input {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: .4rem .65rem;
  border-radius: 5px;
}
.intro .location-context { margin-top: .35rem; font-size: .875rem; }
.location-context p { margin-inline: auto; }
.location-context .text-button + .text-button { margin-left: .5rem; }
.timing-advice { background: var(--accent-paper); padding: .7rem .8rem; border-radius: 5px; margin-top: .8rem; }
.timing-advice p { margin: 0; line-height: 1.55; font-size: .875rem; }
.timing-advice p + p { margin-top: .4rem; }
#timing-lead { color: var(--ink); font: 500 .8125rem/1.5 var(--display); }
#timing-gap { padding-top: .4rem; border-top: 1px solid var(--line); }
.review-location { margin: .25rem 0 0; }

.scenario-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.scenario-form label { display: grid; gap: .4rem; min-width: 0; }
.scenario-location { grid-column: 1 / -1; }
.scenario-form input, .scenario-form select {
  width: 100%;
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 2.75rem;
  padding: .4rem .6rem;
  font: inherit;
}
.wording-grid { display: grid; gap: .8rem; margin-top: 1.2rem; }
.wording-copy { margin: .6rem 0 .9rem; }
.wording-copy p + p { margin-top: .4rem; }
.manual-timing { border-top: 1px solid var(--line); margin-top: 1.25rem; padding-top: .65rem; }
.manual-timing summary { cursor: pointer; padding: .4rem 0; }
.manual-timing .scenario-form { margin-top: .65rem; }
@media (min-width: 44rem) { .wording-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.picker.date-only { display: block; max-width: 33rem; margin-inline: auto; }
.picker.date-only .calendar-pane { display: block; }
.picker.date-only .time-pane { display: none; }

.trip-map-panel {
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  min-width: 0;
}
.trip-map-panel label { display: block; font: 500 .75rem/1.5 var(--display); margin-bottom: .3rem; }
.trip-map-panel select, .trip-map-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  min-height: 2.75rem;
  padding: .38rem .55rem;
  font: inherit;
  margin-bottom: .65rem;
}
.bay-map {
  position: relative;
  height: clamp(11rem, 39vw, 23rem);
  border-radius: 4px;
  overflow: clip;
}
.bay-map canvas, .map-pins { position: absolute; inset: 0; width: 100%; height: 100%; }
.bay-map canvas { cursor: grab; }
.bay-map canvas:active { cursor: grabbing; }
.map-pins { pointer-events: none; }
.map-pin {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  border: 1px solid #8a6e49;
  background: var(--paper);
  color: var(--ink);
  border-radius: 50%;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  font: 500 .75rem/1 var(--display);
}
.map-pin::after { content: ''; position: absolute; inset: -.3rem; border-radius: 50%; }
.map-pin.is-saved { z-index: 2; color: var(--paper); background: var(--ink); border-color: var(--ink); }
.map-pin:focus-visible, .map-pin:hover { z-index: 3; }
.map-pin:disabled { pointer-events: none; }
.map-controls {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
  display: flex;
  gap: .2rem;
}
.map-controls button {
  min-height: 2rem;
  min-width: 2rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 .4rem;
  color: var(--ink);
  background: var(--paper);
  font: 500 .8rem/1 var(--display);
}
.map-controls button:hover { background: var(--accent-paper); }
.map-legend, .map-credit { color: var(--muted); margin-top: .4rem; font-size: .8125rem; line-height: 1.45; }
.route-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .8rem;
  list-style: none;
  margin: .4rem 0 0;
  padding: 0;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.45;
}
.route-legend li { display: inline-flex; align-items: center; gap: .3rem; }
.route-legend li::before { content: ''; width: .8rem; border-top: 3px solid var(--route-color); }
.route-interstate { --route-color: #5d7e9d; }
.route-us { --route-color: #a26547; }
.route-state { --route-color: #778048; }
.map-drive-text { margin-top: .4rem; font-size: .875rem; line-height: 1.5; }
.map-drive-text:empty { display: none; }
.with-map { max-width: 61rem; display: grid; gap: .85rem; }
.place-drive, .drive-eta { color: #355752; font-size: .8125rem; line-height: 1.5; }
.place-description .place-drive { color: #355752; margin-top: .2rem; }
.drive-eta { margin-top: .8rem !important; }
.time-drive { display: block; font: 400 .75rem/1.35 var(--body); }
.time:has(.time-drive) { padding: .4rem; }
.place-row .secondary:disabled { opacity: .63; }

@media (min-width: 44rem) {
  .client-main:has(.with-map:not([hidden])) { width: min(100%, 61rem); }
  .with-map { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; gap: 1.5rem; }
  .with-map .trip-map-panel { grid-area: 1 / 2; position: sticky; top: .75rem; }
  .with-map .location-catalog, .with-map .shortlist-content { grid-area: 1 / 1; }
  .with-map .bay-map { height: clamp(15rem, 38vw, 22rem); }
  .time-pane .bay-map { height: 14rem; }
}

@media (max-width: 43.999rem) {
  #catalog-stage .trip-map-panel {
    position: sticky;
    top: 0;
    z-index: 4;
  }
  #catalog-stage .bay-map { height: clamp(11rem, 36vw, 13rem); }
  #catalog-stage .map-credit { margin-top: .25rem; }
  #catalog-stage .place-row button { scroll-margin: 18rem 0 4.5rem; }
  .client-main:has(#catalog-stage:not([hidden]), .picker.is-time:not([hidden])) .controls {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: var(--paper);
    padding: .55rem 0 max(.55rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
  }
}
