/* ---------------------------------------------------------------- base */
:root {
  --paper: #f7f5f0;
  --card: #fffefb;
  --ink: #1c1a17;
  --ink-2: #56504a;
  --ink-3: #8b8378;
  --rule: #ded6c9;
  --rule-2: #ece5da;
  --brand: #7a4419;
  --brand-2: #96582a;
  --wash: #f0e7da;
  --warn: #f5ecd6;
  --warn-line: #ddc48a;
  --warn-ink: #6b4c12;
  --bad: #8f3322;
  --bad-bg: #f7e8e5;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
dl, dd { margin: 0; }

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }

/* ---------------------------------------------------------------- header */
.masthead { border-bottom: 1px solid var(--rule); background: var(--paper); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; }
.wordmark { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.15; }
.wordmark-name { font-family: var(--serif); font-size: 1.16rem; font-weight: 600; white-space: nowrap; }
.wordmark-sub {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-top: .12rem; white-space: nowrap;
}
.masthead-meta { display: flex; align-items: center; gap: 1.4rem; font-size: .88rem; }
.masthead-meta a { color: var(--ink-2); text-decoration: none; }
.masthead-meta a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- intro */
.intro { padding: clamp(2.5rem, 7vw, 4.5rem) 0; border-bottom: 1px solid var(--rule); }
.intro-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: center; }
.intro-inner.has-photo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 820px) { .intro-inner.has-photo { grid-template-columns: minmax(0, 1fr); } }

.intro h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin-bottom: .4em; }
.intro-text p { color: var(--ink-2); max-width: 48ch; }
.rate { color: var(--ink) !important; }
.rate strong { font-weight: 600; }
.intro-photo { margin: 0; }
.intro-photo img { display: block; width: 100%; height: 100%; max-height: 380px; object-fit: cover; border: 1px solid var(--rule); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: .62rem 1.15rem; border: 1px solid transparent; border-radius: 3px;
  transition: background .12s, border-color .12s, color .12s;
}
.btn-solid { background: var(--brand); color: #fff; }
.btn-solid:hover { background: var(--brand-2); }
.btn-solid:disabled { background: var(--ink-3); cursor: progress; }
.btn-plain { background: transparent; color: var(--ink-2); border-color: var(--rule); }
.btn-plain:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- booking */
.booking { padding: clamp(2.5rem, 6vw, 3.75rem) 0; scroll-margin-top: 1rem; }
.section-head { margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); margin-bottom: .15em; }
.section-head p { color: var(--ink-3); font-size: .92rem; margin: 0; }

.booking-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 880px) { .booking-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

.panel { background: var(--card); border: 1px solid var(--rule); border-radius: 4px; padding: 1.1rem 1.15rem; }

/* ---------------------------------------------------------------- calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.cal-head h3 { margin: 0; font-size: 1.02rem; }
.cal-nav {
  width: 30px; height: 30px; border: 1px solid var(--rule); border-radius: 3px;
  background: transparent; color: var(--ink-2); font-size: 1.05rem; line-height: 1; cursor: pointer;
}
.cal-nav:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.cal-nav:disabled { opacity: .28; cursor: default; }

.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-dow { margin-bottom: 5px; }
.cal-dow span { text-align: center; font-size: .68rem; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }

.cal-day {
  position: relative; aspect-ratio: 1; border: 1px solid transparent; border-radius: 3px;
  background: transparent; font: inherit; color: var(--ink); cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0;
}
.cal-day .num { font-size: .9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cal-day .cnt { font-size: .58rem; line-height: 1; color: var(--ink-3); white-space: nowrap; }
.cal-day:not(:disabled) { border-color: var(--rule-2); }
.cal-day:not(:disabled):hover { border-color: var(--brand); background: var(--wash); }
.cal-day:disabled { cursor: default; color: var(--ink-3); opacity: .45; }
.cal-day.is-selected { background: var(--brand); border-color: var(--brand); color: #fff; }
.cal-day.is-selected .cnt { color: rgba(255,255,255,.8); }
.cal-day.is-today .num { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.cal-day.empty { border: 0; cursor: default; }

/* ---------------------------------------------------------------- day panel */

.day-empty { display: grid; place-items: center; min-height: 220px; color: var(--ink-3); }
.day-panel h3 { font-size: 1.15rem; margin-bottom: .8rem; }

.weather { display: flex; align-items: center; gap: .8rem; padding-bottom: .9rem; border-bottom: 1px solid var(--rule-2); margin-bottom: .9rem; }
.weather svg { flex: none; color: var(--ink-2); }
.weather-main strong { display: block; font-size: .95rem; font-weight: 600; }
.weather-main span { font-size: .82rem; color: var(--ink-3); }
.weather-plain { font-size: .86rem; color: var(--ink-3); }

.notice { font-size: .86rem; padding: .65rem .8rem; border-radius: 3px; margin-bottom: 1rem; border: 1px solid; }
.notice-warn { background: var(--warn); border-color: var(--warn-line); color: var(--warn-ink); }
.notice-flat { background: transparent; border-color: var(--rule-2); color: var(--ink-2); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.slot {
  border: 1px solid var(--rule); border-radius: 3px; background: var(--card); font: inherit;
  padding: .5rem .35rem; cursor: pointer; text-align: center; line-height: 1.3; color: var(--ink);
}
.slot .t { display: block; font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; }
.slot .s { display: block; font-size: .68rem; color: var(--ink-3); }
.slot:not(:disabled):hover { border-color: var(--brand); background: var(--wash); }
.slot:disabled { cursor: not-allowed; background: transparent; border-color: var(--rule-2); color: var(--ink-3); }
.slot:disabled .t { font-weight: 400; }
.slots-note { grid-column: 1 / -1; font-size: .86rem; color: var(--ink-3); margin: 0; }

/* ---------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1.25rem; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(28, 26, 23, .5); }

.modal-panel {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--rule); border-radius: 5px;
  box-shadow: 0 20px 50px rgba(28,26,23,.28);
  width: min(560px, 100%); max-height: min(88vh, 860px);
}
.modal-panel > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal-panel > #successView { display: flex; flex-direction: column; min-height: 0; flex: 1; }

.modal-head {
  flex: none; position: relative;
  padding: 1.15rem 3rem 1rem 1.5rem; border-bottom: 1px solid var(--rule);
}
.modal-head h3 { font-size: 1.15rem; margin: 0 0 .1rem; }
.modal-head p { margin: 0; font-size: .86rem; color: var(--ink-2); }
.modal-step {
  position: absolute; right: 1.5rem; bottom: 1rem;
  font-size: .68rem !important; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3) !important;
}
.modal-close {
  position: absolute; top: .55rem; right: .7rem; width: 34px; height: 34px;
  border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--ink-3); cursor: pointer;
}
.modal-close:hover { color: var(--ink); }

.modal-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1.25rem 1.5rem 1.4rem; }

.modal-foot {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.5rem; border-top: 1px solid var(--rule); background: var(--paper);
  border-radius: 0 0 4px 4px;
}
.foot-total { display: flex; flex-direction: column; line-height: 1.25; }
.foot-total span { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.foot-total strong { font-family: var(--serif); font-size: 1.35rem; }
.foot-total em { font-style: normal; font-size: .7rem; color: var(--ink-3); }
.foot-actions { display: flex; gap: .5rem; align-items: center; }
.foot-actions .btn { min-height: 44px; }
.foot-actions.wide { width: 100%; justify-content: flex-end; }

/* --- fields --- */
.step-intro { font-size: .82rem; color: var(--ink-3); margin: 0 0 .8rem; }
.rule { border: 0; border-top: 1px solid var(--rule-2); margin: 1.25rem 0; }

.field { display: block; margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.label, .field > span { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .35rem; }
.field em { font-weight: 400; font-style: normal; color: var(--ink-3); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 520px) { .pair { grid-template-columns: 1fr; gap: 0; } }

/* Untyped inputs must match too — `input[type=text]` silently skips them. */
input:where(:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button])),
textarea, select {
  width: 100%; font: inherit; padding: .58rem .7rem; border: 1px solid var(--rule);
  border-radius: 3px; background: #fff; color: var(--ink); min-height: 44px;
}
/* The +/- buttons are the control; native spinners are clutter. */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
textarea { resize: vertical; min-height: 66px; }

.stepper { display: flex; gap: 6px; align-items: stretch; }
.stepper button {
  width: 46px; min-height: 44px; flex: none;
  border: 1px solid var(--rule); background: #fff; border-radius: 3px;
  font-size: 1.15rem; cursor: pointer; color: var(--ink);
}
.stepper button:hover { border-color: var(--brand); color: var(--brand); }
.stepper input { text-align: center; width: 74px; flex: none; }
.unit { align-self: center; font-size: .82rem; color: var(--ink-3); }

.field-hint { font-size: .76rem; color: var(--brand); margin: -.4rem 0 .6rem; }
.field-hint:empty { display: none; }
.field-note { font-size: .78rem; color: var(--ink-3); margin: 0; }

.callout {
  border: 1px solid var(--rule); background: var(--wash); border-radius: 3px;
  padding: .7rem .85rem; font-size: .85rem; margin-top: 1rem;
}
.callout span { color: var(--ink-2); }

.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; margin: 1rem 0; }
.check:last-child { margin-bottom: 0; }
.check input { margin-top: .18rem; flex: none; width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); }
#confirmRow { border-top: 1px solid var(--rule-2); padding-top: 1rem; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.form-error {
  background: var(--bad-bg); border: 1px solid #e3c4bd; color: var(--bad);
  border-radius: 3px; padding: .6rem .8rem; font-size: .85rem; margin: 1rem 0 0;
}
.fine { font-size: .8rem; color: var(--ink-3); margin: .8rem 0 0; }

.summary { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: .8rem 0; margin-bottom: .3rem; }
.summary .when { display: block; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.summary .sub { font-size: .85rem; color: var(--ink-2); }

/* --- the agreement --- */
.waiver-doc {
  height: 240px; overflow-y: auto; border: 1px solid var(--rule); border-radius: 3px;
  padding: .9rem 1rem; background: #fff; font-size: .8rem; line-height: 1.55; margin-bottom: 1.25rem;
  overscroll-behavior: contain;
}
.waiver-doc:focus { outline: 2px solid var(--brand); }
.waiver-doc h5 { font-family: var(--serif); font-size: .9rem; margin: 1rem 0 .3rem; }
.waiver-doc h5:first-child { margin-top: 0; }
.waiver-doc p { margin: 0 0 .6rem; }
.waiver-doc ul { margin: 0 0 .6rem; padding-left: 1.1rem; }
.waiver-doc li { margin-bottom: .35rem; }
.waiver-doc .warning { border: 1px solid var(--ink); padding: .55rem .65rem; font-weight: 700; }
.waiver-doc .doc-head { font-size: .74rem; color: var(--ink-3); border-bottom: 1px solid var(--rule); padding-bottom: .5rem; margin-bottom: .7rem; }
.sig-input { font-family: "Snell Roundhand", "Apple Chancery", cursive; font-size: 1.2rem; }

/* --- phones: a full-screen sheet beats a floating box --- */
@media (max-width: 560px) {
  /* height:100% resolves against a content-sized grid row and overflows,
     so pin the sheet to the viewport itself. dvh tracks mobile browser chrome. */
  .modal { padding: 0; place-items: stretch; height: 100vh; height: 100dvh; overflow: hidden; }
  .modal-panel {
    width: 100%; border: 0; border-radius: 0;
    height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh;
  }
  .modal-head { padding: 1rem 3rem .9rem 1.15rem; }
  .modal-body { padding: 1.1rem 1.15rem 1.3rem; }
  .modal-foot { padding: .8rem 1.15rem; padding-bottom: max(.8rem, env(safe-area-inset-bottom)); }
  .foot-total strong { font-size: 1.2rem; }
  .waiver-doc { height: 200px; }
}
@media (max-width: 380px) {
  .foot-total em { display: none; }
  .foot-actions .btn { padding: .62rem .8rem; }
}

.sheet { max-width: 640px; padding: clamp(1.75rem, 5vw, 2.75rem) 0 3rem; }
.sheet-head { margin-bottom: 1.5rem; }
.sheet-head h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-bottom: .35rem; }
.sheet-head p { color: var(--ink-2); font-size: .95rem; margin-bottom: 1rem; }
.doc-title { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 .15rem; }
.waiver-doc.tall { height: 300px; }
@media (max-width: 560px) { .waiver-doc.tall { height: 240px; } }

/* --- the shareable rider link --- */
.share {
  border: 1px solid var(--rule); border-radius: 3px; background: var(--wash);
  padding: .85rem .95rem; margin-top: 1rem;
}
.share strong { display: block; font-size: .9rem; margin-bottom: .15rem; }
.share p { font-size: .82rem; color: var(--ink-2); margin: 0 0 .6rem; }
.share-row { display: flex; gap: .4rem; }
.share-row input {
  flex: 1; min-width: 0; font-size: .8rem; background: #fff;
}
.share-row button { flex: none; white-space: nowrap; }

.share-apps { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.chip {
  font: inherit; font-size: .8rem; font-weight: 600; line-height: 1;
  padding: .5rem .8rem; min-height: 38px; display: inline-flex; align-items: center;
  border: 1px solid var(--rule); border-radius: 999px; background: #fff;
  color: var(--ink-2); text-decoration: none; cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }

/* ---------------------------------------------------------------- notes */
.notes { border-top: 1px solid var(--rule); padding: clamp(2.5rem, 6vw, 3.5rem) 0; }
.notes h2 { font-size: clamp(1.4rem, 3vw, 1.7rem); margin-bottom: 1.4rem; }
.notes-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.6rem 2.5rem; }
.notes-list dt { font-weight: 600; font-size: .95rem; margin-bottom: .25rem; }
.notes-list dd { color: var(--ink-2); font-size: .9rem; }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--rule); padding: clamp(2rem, 5vw, 2.75rem) 0 1.25rem; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 2rem; align-items: start; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h3 { font-size: 1.05rem; margin-bottom: .35em; }
.footer-info p { margin-bottom: .4rem; font-size: .92rem; }
.addr { color: var(--ink-2); }
.contact { color: var(--ink-2); }
.contact a { color: var(--brand); }

.map { display: block; position: relative; height: 240px; overflow: hidden; border: 1px solid var(--rule); border-radius: 4px; background: #e8e2d8; }
.map-tiles { position: absolute; left: 50%; top: 50%; }
.map-tiles img { position: absolute; display: block; }
.map-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); line-height: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.map-attr { position: absolute; right: 0; bottom: 0; font-size: .6rem; color: var(--ink-2); background: rgba(255,255,255,.8); padding: .08rem .35rem; }

.footer-base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule-2);
  font-size: .78rem; color: var(--ink-3);
}

@media (max-width: 600px) {
  .masthead-meta { gap: .9rem; font-size: .82rem; }
  .masthead-meta a[id="mapLink"] { display: none; }
  .panel { padding: .9rem; }
  .cnt-word { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
