/* Olio Homestay — booking flow styles
   Sits on top of css/site.css and reuses its tokens, type scale, .field and .btn.
   Nothing here introduces a new typeface, a radius or a shadow; the page stays the
   quiet editorial sheet the rest of the site is. The only new colour is --alert,
   used for nothing but errors. */

:root {
  --alert: #8A2B20;          /* oxblood; errors only */
  --alert-soft: #F6EDEA;
  --line: #A39D93;           /* the field underline already used in site.css */
  --rail: clamp(200px, 20vw, 260px);
}

/* Several things here are flex or grid containers that are sometimes hidden; a display
   value would otherwise beat the [hidden] attribute and leave an empty border on screen. */
[hidden] { display: none !important; }

/* Give the page room to breathe, and leave space under the flow for the phone bar. */
.book { gap: 44px; }
.book main { display: flex; flex-direction: column; gap: clamp(28px, 3vw, 44px); }
.book-head { display: flex; flex-direction: column; gap: 14px; max-width: 46rem; }
.book-title { font-size: clamp(30px, 2.8vw, 42px); line-height: 1.1; }
.book-head .lede { font-size: 17px; line-height: 1.5; max-width: 36rem; color: var(--body); }
.book-head .closing-note { font-size: 14px; color: var(--muted); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 12px 20px;
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase;
}
.skip:focus { left: var(--frame); top: var(--frame); color: var(--paper); }

/* ---------- the two-part frame: a rail that tracks where you are, a panel that holds the step ---------- */
.flow { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
.flow:focus { outline: none; }   /* only ever focused by the skip link, which is its own signal */
.flow-rail { position: sticky; top: var(--frame); display: flex; flex-direction: column; gap: 40px; }
.flow-panel { min-width: 0; max-width: 680px; }

/* ---------- step indicator ----------
   The numerals are the site's gallery numerals, so the flow reads as the same page.
   It is a plain ordered list, so 4 steps or 7 steps need no redesign. */
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.steps li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 2px; align-items: baseline;
  padding: 11px 0; border-top: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps .n { font-size: 12px; letter-spacing: 0.2em; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps .t { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); line-height: 1.35; }
.steps li[data-state="done"] .t, .steps li[data-state="done"] .n { color: var(--body); }
.steps li[data-state="current"] { border-top-color: var(--ink); }
.steps li[data-state="current"] .t, .steps li[data-state="current"] .n { color: var(--ink); }
.steps-now { display: none; }

/* ---------- the running stay summary ---------- */
.stay { display: flex; flex-direction: column; gap: 14px; }
.stay[hidden], .steps-now[hidden] { display: none; }
.stay h2 { font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); }
.stay dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.stay .line { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; font-size: 16px; color: var(--body); }
.stay .line dt { color: var(--muted); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.stay .line dd { margin: 0; text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.stay .total { border-top: 1px solid var(--rule); padding-top: 12px; }
.stay .total dd { font-size: 19px; }

/* ---------- a step ---------- */
.step { display: flex; flex-direction: column; gap: 28px; }
.step > header { display: flex; flex-direction: column; gap: 8px; }
.step h2 { font-size: 26px; line-height: 1.2; }
/* The heading takes focus on every advance so the new step is announced. It is never
   reachable by tabbing, so the mark is kept quiet — present, but not a box around the page. */
.step h2:focus { outline: none; }
.step h2:focus-visible { outline: 1px solid var(--line); outline-offset: 10px; }
.step .note { color: var(--muted); font-size: 16px; max-width: 34rem; }
.step-body { display: flex; flex-direction: column; gap: 30px; }

/* the single quiet motion on this page: the new step settles in. It fills backwards only:
   a forwards fill would leave an identity transform on the step, and that would trap the
   phone's fixed calendar sheet inside it. */
.step { animation: step-in 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) backwards; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- the booking box: arrival, departure, guests ----------
   One bordered group, the way a booking box on a big site is laid out: the two dates side by
   side, the guest counts on a line beneath. Pressing a date field tells the calendar which
   end the next click sets; the active field shows an ink edge, the way a focused field does. */
.box { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.box-field {
  display: flex; flex-direction: column; gap: 4px; text-align: left; min-height: 64px;
  padding: 11px 16px 10px; border: 0; background: transparent; font: inherit; color: var(--ink); cursor: pointer;
  position: relative;
}
.box-field + .box-field { border-left: 1px solid var(--line); }
.box-field:hover { background: var(--slot); }
.box-field.is-active { box-shadow: inset 0 0 0 1px var(--ink); z-index: 1; }
.box-field:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; z-index: 1; }
.box .cap { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.box-field .val { font-size: 18px; line-height: 1.2; font-variant-numeric: lining-nums tabular-nums; }
.box-field .val.is-empty { color: var(--muted); }
.box-guests {
  grid-column: 1 / -1; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding: 11px 16px;
}
.box-guests .counts { display: flex; gap: 8px 28px; flex-wrap: wrap; }
.party { display: flex; align-items: center; gap: 12px; }
.party-label { font-size: 16px; color: var(--body); }
.stepper { display: flex; align-items: center; gap: 2px; }
.stepper button {
  width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; font-size: 18px;
  line-height: 1; cursor: pointer; padding: 0;
}
.stepper button:hover:not([disabled]) { border-color: var(--ink); }
.stepper button:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.stepper button[disabled] { color: var(--rule); cursor: default; }
.stepper output { min-width: 2em; text-align: center; font-size: 18px; font-variant-numeric: lining-nums tabular-nums; }

/* ---------- the calendar popover ----------
   Opens under the box on a desktop, edge to edge with it, paper on a hairline. It sits in
   the flow rather than floating over it, so the page grows to hold it: the continue button
   and the footer move down below it and nothing is ever flush against the bottom of the
   window. On a phone it is the whole screen, with Done at the foot where the thumb is. */
.box-wrap { display: flex; flex-direction: column; gap: 8px; }
.cal-pop {
  background: var(--paper); border: 1px solid var(--line); padding: 20px 20px 14px;
  display: flex; flex-direction: column; gap: 14px;
  animation: pop-in 0.18s ease-out both;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cal-pop-foot { display: flex; justify-content: flex-end; }
.cal-pop .done { border: 0; background: transparent; padding: 0 4px; min-height: 44px; font: inherit; font-size: 12px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; }
.cal-pop .done:hover { color: var(--muted); }
.cal-pop .done:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- calendar ----------
   Small, even cells (a month is never wider than 300px), the month name centred over each
   grid, the paging arrows at the two outer corners, and a one-line readout above it all. */
.cal { display: flex; flex-direction: column; gap: 18px; }
.cal-readout { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px;
  font-size: 18px; color: var(--ink); min-height: 28px; }
.cal-readout p { font-variant-numeric: lining-nums; }
.cal-readout .cal-hint { color: var(--muted); }
.cal-readout .cal-nights { font-size: 22px; }
.cal-readout button.clear { border: 0; background: transparent; padding: 0;
  font: inherit; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  cursor: pointer; text-decoration: underline; text-underline-offset: 4px; min-height: 28px; }
.cal-readout button.clear:hover { color: var(--ink); }

.cal-months { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: space-between; gap: 40px; }
.cal-prev, .cal-next {
  position: absolute; top: -8px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 0;
}
.cal-prev { left: -8px; }
.cal-next { right: -8px; }
.cal-prev:hover:not([disabled]), .cal-next:hover:not([disabled]) { color: var(--muted); }
.cal-prev:focus-visible, .cal-next:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-prev[disabled], .cal-next[disabled] { color: var(--rule); cursor: default; }

.cal-month { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal-month caption { caption-side: top; text-align: center; padding: 0 36px 12px;
  font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); line-height: 20px; }
.cal-month th { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 0 0 6px; }
.cal-month td { padding: 0; }
.cal-day {
  width: 100%; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--body); font: inherit; font-size: 15px;
  font-variant-numeric: lining-nums tabular-nums; cursor: pointer; padding: 0; position: relative;
}
.cal-day:hover:not(.is-out) { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cal-day:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-day.is-within { background: var(--tint); color: var(--ink); }
.cal-day.is-preview { background: var(--tint); color: var(--ink); }
.cal-day.is-end { background: var(--ink); color: var(--paper); }
/* The two ends of the stay are the one place on the site with a radius: the arrival's outer
   left corners and the departure's outer right corners soften, so the run of nights between
   them reads as one bar with a beginning and an end. */
.cal-day.is-arrival { border-radius: 8px 0 0 8px; }
.cal-day.is-departure, .cal-day.is-preview-end { border-radius: 0 8px 8px 0; }
.cal-day.is-end:hover { box-shadow: none; color: var(--paper); }
.cal-day.is-off { color: var(--muted); cursor: default; text-decoration: line-through; text-decoration-thickness: 1px; }
.cal-day.is-out { color: var(--rule); cursor: default; }
.cal-day.is-unreachable { color: var(--rule); cursor: default; }
.cal-day.is-off:hover, .cal-day.is-out:hover, .cal-day.is-unreachable:hover { box-shadow: none; }

/* ---------- room cards ---------- */
.rooms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 34px); list-style: none; margin: 0; padding: 0; }
.room-card { position: relative; display: flex; flex-direction: column; }
.room-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.room-card label {
  display: flex; flex-direction: column; gap: 0; cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); height: 100%;
}
.room-card label:hover { border-color: var(--line); }
.room-card input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 3px; }
.room-card input:checked + label { border-color: var(--ink); }
.room-card .shot { position: relative; height: 0; padding-bottom: 66%; overflow: hidden; background: var(--slot); }
.room-card .shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.room-card .card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1 1 auto; }
.room-card .card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.room-card h3 { font-size: 24px; line-height: 1.1; }
.room-card .facts { font-size: 15px; color: var(--muted); line-height: 1.5; }
.room-card .money { display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 16px; color: var(--body); }
.room-card .money strong { font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
/* the selection mark: a small ink square, filled when chosen — no radius */
.room-card .mark { width: 15px; height: 15px; flex: none; border: 1px solid var(--line); align-self: center; }
.room-card input:checked + label .mark { background: var(--ink); border-color: var(--ink); }
/* ...with a fine tick in paper when chosen: two strokes as thin as the line icons, drawn in CSS.
   Shared by the room cards and the ways to pay. */
.room-card .mark, .pay-way .mark { position: relative; box-sizing: border-box; }
.room-card input:checked + label .mark::after, .pay-way input:checked + label .mark::after {
  content: ''; position: absolute; left: 4.5px; top: 1.5px; width: 3.5px; height: 7.5px;
  border: solid var(--paper); border-width: 0 1.25px 1.25px 0; transform: rotate(45deg); }
.room-card .card-top .who { display: flex; align-items: center; gap: 10px; }
.room-card.is-out label { cursor: default; background: var(--slot); border-style: dashed; }
.room-card.is-out label:hover { border-color: var(--rule); }
.room-card.is-out .shot img { filter: grayscale(1); opacity: 0.4; }
.room-card.is-out h3, .room-card.is-out .money strong { color: var(--muted); }
.room-card .taken { font-size: 15px; color: var(--alert); }
.room-card.is-flagged label { border-color: var(--alert); }

.rooms-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px;
  border-top: 1px solid var(--rule); padding-top: 18px; font-size: 18px; }
.rooms-total .sum { font-variant-numeric: tabular-nums; }
.rooms-total .qual { color: var(--muted); font-size: 16px; }

/* ---------- details form ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px clamp(24px, 4vw, 56px); }
.form-grid .wide { grid-column: 1 / -1; }
.field .hint { font-size: 14px; color: var(--muted); }
.field-error { font-size: 15px; color: var(--alert); }
.field.is-invalid input, .field.is-invalid textarea, .field.is-invalid select { border-bottom-color: var(--alert); }
.counter { font-size: 14px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.counter[data-near="1"] { color: var(--alert); }
.honeypot { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

/* ---------- review ---------- */
.review { display: flex; flex-direction: column; }
.review-group { display: flex; flex-direction: column; }
.review-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  border-top: 1px solid var(--ink); padding: 14px 0 6px; }
.review-head h3 { font-size: 12px; }
.review .line { display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  border-bottom: 1px solid var(--rule); padding: 13px 0; font-size: 17px; }
.review-group .line:last-child { border-bottom: 0; }
.review .grand { display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  border-top: 1px solid var(--ink); padding: 18px 0 0; margin-top: 4px; }
.review .grand dt { color: var(--muted); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.review .grand dd { margin: 0; }
.review .line dt { color: var(--muted); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; }
.review .line dd { margin: 0; text-align: right; color: var(--ink); max-width: 28rem; }
.review .line.grand dd { font-size: 22px; font-variant-numeric: tabular-nums; }
.review dl { margin: 0; }
.review-edit { border: 0; background: transparent; padding: 0; font: inherit; font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 4px;
  min-height: 44px; }
.review-edit:hover { color: var(--ink); }
.promise { border: 1px solid var(--rule); padding: 20px 22px; color: var(--body); font-size: 16px; line-height: 1.55; max-width: 38rem; }
/* While a hold is being changed: what is going on, and the way out. Above the summary, so it
   is read first. */
.changing-note { border-left: 2px solid var(--ink); padding: 4px 0 4px 18px; margin: 0 0 28px; max-width: 38rem; color: var(--body); font-size: 16px; line-height: 1.55; }
.changing-note p { margin: 0 0 10px; }
.changing-leave { border: 0; background: transparent; padding: 0; font: inherit; font-size: 14px; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.changing-leave:hover { color: var(--ink); }
.changing-leave:disabled { cursor: default; text-decoration: none; }
/* The bot check is invisible; the slot only ever holds a zero-size iframe. */
.turnstile-slot { min-height: 0; }
.turnstile-slot:empty { display: none; }
.turnstile-note { font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 34rem; }
.turnstile-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.turnstile-note a:hover { color: var(--ink); }

/* ---------- payment ----------
   Built like a payment page: a small exact ledger and a framed QR on the left, one white
   panel on the right holding the proof control. The panel is the one "card" on the site, a
   deliberate exception so the step reads as a form, not as more prose. Numbers are tabular. */
.pay { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 36px 48px; align-items: start; }
.pay-col { display: flex; flex-direction: column; gap: 26px; }

.pay-col > .fold.booking-details { border-top-color: var(--ink); }
.ledger { margin: 0 0 14px; }
.ledger-row { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.ledger-row:last-child { border-bottom: 0; }
.ledger dt { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.ledger dd { margin: 0; font-size: 14px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ledger dt { white-space: nowrap; }
.pay-change { border: 0; background: transparent; padding: 0; font: inherit; font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.pay-change:hover { color: var(--ink); }
.pay-change[disabled] { cursor: default; opacity: 0.6; }

.qr-panel { margin: 0; border: 1px solid var(--rule); background: #fff; padding: 0; max-width: 320px; overflow: hidden; }
.qr-head { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.qr-head img { display: block; height: 26px; width: auto; }
.qr-frame { padding: 18px 18px 6px; }
.qr-frame svg { display: block; width: 100%; height: auto; }
.qr-cap { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 16px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.qr-cap .qr-amount { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.qr-cap .qr-id { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }

/* the ways to pay: rows in the room cards' manner — a rule, the ink square, the amount */
.pay-ways { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pay-ways legend { padding: 0; margin-bottom: 4px; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); }
.pay-way { position: relative; }
.pay-way input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pay-way label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--rule); background: var(--paper); cursor: pointer;
  font-size: 15px; letter-spacing: normal; text-transform: none; color: var(--body); }
.pay-way label:hover { border-color: var(--line); }
.pay-way input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 3px; }
.pay-way input:checked + label { border-color: var(--ink); background: #fff; }
.pay-way .mark { width: 15px; height: 15px; flex: none; border: 1px solid var(--line); }
.pay-way input:checked + label .mark { background: var(--ink); border-color: var(--ink); }
.pay-way-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-way-text strong { font-weight: 400; font-size: 16px; line-height: 1.25; color: var(--ink); }
.pay-way-text span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.pay-way-amount { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 15px; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
/* the fee under the price, in ink so it reads as part of the price, not as small print */
.pay-way-amount small { font-size: 13px; color: var(--ink); }
.pay-ways.is-invalid .pay-way label { border-color: var(--alert); }
.pay-ways .field-error { color: var(--alert); font-size: 13px; margin: 0; }
.qr-slot { display: flex; flex-direction: column; gap: 0; }
.qr-slot:empty { display: none; }
.qr-slot > .fold { margin-top: 26px; }
.qr-slot > .fold + .fold { margin-top: 0; }
.qr-head .qr-scheme { color: var(--ink); letter-spacing: 0.16em; }
.bank-panel { border: 1px solid var(--rule); background: #fff; padding: 6px 16px; max-width: 360px; }
.bank-panel .ledger { margin: 0; }
.bank-panel .ledger dd { font-size: 15px; }
.qr-slot > .bank-panel { margin-top: 14px; }
.copy-inline { margin-left: 12px; border: 0; background: transparent; padding: 0; font: inherit; font-size: 11px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; }
.copy-inline:hover { color: var(--ink); }

/* stage 1 of the pay step: the choice alone, one column, Continue under it */
.pay.is-choosing { grid-template-columns: minmax(0, 1fr); max-width: 40rem; }
.pay-choose-actions .actions { margin-top: 4px; }
.pay-choose-actions .btn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pay-choose-actions .btn:hover { background: transparent; color: var(--ink); }
/* stage 2: what was chosen, and the quiet way back */
.pay-chosen { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pay-chosen-line { margin: 0; font-size: 16px; color: var(--body); font-variant-numeric: tabular-nums; }
.pay-chosen-line strong { font-weight: 400; color: var(--ink); }
.pay-switch { border-left: 1px solid var(--ink); padding: 2px 0 2px 14px; display: flex; flex-direction: column; gap: 10px; }
.pay-switch p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); max-width: 30rem; }
.pay-switch-actions { display: flex; flex-wrap: wrap; gap: 10px 22px; }

/* the folds */
.fold { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.fold + .fold { border-top: 0; }
.fold summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; padding: 12px 0;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.fold summary::-webkit-details-marker { display: none; }
.fold summary:hover, .fold[open] summary { color: var(--ink); }
.fold summary:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }
.fold-mark { font-size: 15px; line-height: 1; width: 1em; text-align: center; transition: transform 0.25s; }
.fold[open] .fold-mark { transform: rotate(45deg); }
.fold-body { padding: 2px 0 18px 27px; font-size: 15px; line-height: 1.55; color: var(--body); }
.fold:not([open]) > .fold-body { display: none; }   /* belt and braces: a closed fold takes no space anywhere */
.fold-body p { margin: 0; max-width: 34rem; }

.pay-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--body); }
.pay-steps li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 4px; }
.pay-steps .n { color: var(--muted); font-size: 11px; letter-spacing: 0.2em; }

/* the proof panel */
.pay-card { background: #fff; border: 1px solid var(--rule); padding: 26px 28px 22px; display: flex; flex-direction: column; gap: 18px; }
.pay-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.pay-card-head h3 { font-size: 22px; line-height: 1.2; font-weight: 400; }
.pay-card-lede { font-size: 15px; line-height: 1.55; color: var(--body); max-width: 34rem; }
.countdown { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.countdown .left { color: var(--ink); font-variant-numeric: tabular-nums; border: 1px solid var(--rule); padding: 3px 8px; font-size: 13px; }
.countdown.is-late .left { color: var(--alert); border-color: var(--alert); }
.pay-card .fold { border-bottom: 0; }
.pay.is-expired { grid-template-columns: minmax(0, 1fr); max-width: 40rem; }
.pay-expired h3 { font-size: 22px; line-height: 1.2; font-weight: 400; }
.pay-expired .actions { margin-top: 4px; }
.pay-expired .btn[aria-busy="true"] { opacity: 0.6; }
.pay-expired-note { color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 34rem; }
.pay-card-actions .actions { margin-top: 4px; }
.pay-card-actions .btn { width: 100%; box-sizing: border-box; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pay-card-actions .btn:hover { background: transparent; color: var(--ink); }
.pay-card-actions .btn[disabled] { opacity: 0.35; }

.upload { display: flex; flex-direction: column; gap: 8px; }
.upload .field { display: block; }
.upload .drop, .upload .chosen { width: 100%; box-sizing: border-box; }
/* The box is the control: one target, one line, a plus at the edge. Nothing else to read. */
.upload .drop { border: 1px dashed var(--muted); padding: 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 14px; cursor: pointer; transition: border-color 0.2s, background-color 0.2s; background: var(--paper);
  font-size: 15px; letter-spacing: normal; text-transform: none; color: var(--body); }
.upload .drop:hover, .upload .drop:focus-within, .upload .drop.is-over { border-color: var(--ink); background: #fff; }
.upload .drop svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; }
.upload .drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.upload .drop strong { font-weight: 400; color: var(--ink); font-size: 16px; line-height: 1.25; }
.upload .drop span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.upload .drop-mark { font-size: 22px; line-height: 1; color: var(--muted); }
.upload .drop:hover .drop-mark { color: var(--ink); }
.upload input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.upload .chosen { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid var(--ink); padding: 12px 18px 12px 12px; background: #fff; }
.upload .chosen img { width: 40px; height: 54px; object-fit: cover; border: 1px solid var(--rule); background: #fff; }
.upload .chosen svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 1.1; }
.upload .chosen .name { color: var(--ink); font-size: 15px; overflow-wrap: anywhere; }
.upload .chosen .size { color: var(--muted); font-size: 13px; }
.upload .chosen .swap { border: 0; background: transparent; padding: 0; font: inherit; font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.upload .chosen .swap:hover { color: var(--ink); }
.upload .field-error { color: var(--alert); font-size: 13px; }
@media (max-width: 900px) {
  .pay { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .qr-panel { max-width: 300px; }
  .pay-card { padding: 20px 18px 16px; }
}

/* ---------- confirmation ---------- */
.reference { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 26px 0; }
.reference .code { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: 0.06em; line-height: 1; }
.reference .copy { min-height: 44px; border: 1px solid var(--rule); background: transparent; color: var(--ink);
  font: inherit; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; padding: 0 20px; cursor: pointer; }
.reference .copy:hover { border-color: var(--ink); }
.next-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px;
  color: var(--body); font-size: 16px; max-width: 36rem; }
.next-list li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 4px; }
.next-list .n { color: var(--muted); font-size: 12px; letter-spacing: 0.2em; }

/* ---------- actions, pending and errors ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.actions .back { border: 0; background: transparent; padding: 0; font: inherit; font-size: 12px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--muted); cursor: pointer; min-height: 44px; }
.actions .back:hover { color: var(--ink); }
.btn[disabled] { opacity: 0.35; cursor: default; }
.btn[disabled]:hover { background: transparent; color: var(--ink); }
.btn[aria-busy="true"] { opacity: 1; }

.pending { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 16px; }
/* a hairline that breathes rather than a spinner */
.pending::before { content: ""; width: 46px; height: 1px; background: var(--line); transform-origin: 0 50%;
  animation: pending-line 1.5s ease-in-out infinite; }
@keyframes pending-line { 0%, 100% { transform: scaleX(0.12); opacity: 0.45; } 50% { transform: scaleX(1); opacity: 1; } }

.notice { border-left: 1px solid var(--rule); padding: 4px 0 4px 20px; color: var(--body); font-size: 16px;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start; max-width: 38rem; }
.notice.is-alert { border-left-color: var(--alert); color: var(--alert); }
.notice .retry { border: 1px solid currentColor; background: transparent; color: inherit; font: inherit;
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; padding: 0 20px; min-height: 44px; cursor: pointer; }

.flow-fallback { display: flex; flex-direction: column; gap: 24px; max-width: 34rem; }

/* ---------- phone ---------- */
.bar { display: none; }

@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow-rail { position: static; gap: 0; }
  .steps { display: none; }
  .steps-now { display: flex; align-items: baseline; gap: 12px; border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule); padding: 13px 0; margin-top: 6px; }
  .steps-now .n { font-size: 11px; letter-spacing: 0.2em; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .steps-now .t { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); }
  .stay { display: none; }

  .book-title { font-size: 30px; }
  .step h2 { font-size: 24px; }
  .cal-pop { position: fixed; inset: 0; top: 0; z-index: 30; border: 0; overflow: auto;
    padding: 24px var(--frame) calc(16px + env(safe-area-inset-bottom)); gap: 20px; animation: none; }
  .cal-pop .cal { gap: 22px; }
  .cal-pop-foot { margin-top: auto; padding-top: 16px; }
  .cal-pop .done { width: 100%; border: 1px solid var(--ink); text-decoration: none; min-height: 52px; padding: 12px 20px; }
  .cal-pop .done:hover { background: var(--ink); color: var(--paper); }
  .has-sheet body { overflow: hidden; }
  .cal-months { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cal-day { height: 44px; font-size: 16px; }
  .cal-prev { left: -6px; }
  .cal-next { right: -6px; }
  .box-field { min-height: 60px; padding: 10px 14px 9px; }
  .box-guests { padding: 10px 14px; }
  .box-guests .counts { width: 100%; justify-content: space-between; }
  .rooms { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 26px; }
  .step { gap: 24px; }
  .step-body { gap: 24px; }
  .book { gap: 30px; }

  /* the flow gets room for the bar, which carries the same numbers the rail carries on desktop */
  .has-bar .book { padding-bottom: 104px; }
  .bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    align-items: center; justify-content: space-between; gap: 14px;
    background: var(--paper); border-top: 1px solid var(--rule);
    padding: 12px var(--frame) calc(12px + env(safe-area-inset-bottom));
  }
  .bar .sum { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
  .bar .sum span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
  .bar .sum span:empty { display: none; }
  .bar .sum .box { font-size: 14px; line-height: 1.35; color: var(--muted); }
  .bar .sum .cost { font-size: 18px; line-height: 1.3; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
  /* Tighter than the panel's button so the summary beside it is not squeezed to ellipses. */
  .bar .btn { flex: none; padding: 12px 16px; min-height: 48px; font-size: 12px; letter-spacing: 0.16em; }
  .bar[hidden] { display: none; }
  /* The bar carries the continue button on a phone, so the panel does not repeat it at the
     foot of the page. "Back", and the confirmation's link home, stay where they are. */
  .actions [data-continue] { display: none; }
}

@media (min-width: 901px) {
  .bar { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .step { animation: none; }
  .cal-pop { animation: none; }
  .pending::before { animation: none; transform: scaleX(1); }
}
