/* Booking: steps on the left, the live key card + bill on the right */
.book {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 470px);
  gap: clamp(2rem, 5vw, 5rem);
  padding: 7.5rem var(--pad) 5rem;
  align-items: start;
}
.book__head { display: grid; gap: 1.2rem; margin-bottom: 2.6rem; }
.book__head h1 { font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.04em; }
.book__side { align-self: stretch; }
.book__sticky { position: sticky; top: 6.5rem; display: grid; gap: 1.4rem; justify-items: center; }
.book__sticky .key { width: 100%; }

.bstep { padding: 2rem 0 2.4rem; border-top: 1px solid var(--line); transition: opacity 0.5s; }
.bstep.is-locked { opacity: 0.32; pointer-events: none; }
.bstep h2 { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 0.9rem; margin-bottom: 1.3rem; }
.bstep h2 span { font-size: var(--t-xs); letter-spacing: 0.2em; color: var(--led); }
.bstep__hint { color: var(--mute); font-size: var(--t-sm); margin: -0.5rem 0 1.2rem; min-height: 1.4em; }
.bstep__hint.is-warn { color: #ffb36b; }
.bstep__fine { color: var(--mute); font-size: var(--t-xs); margin-top: 1rem; max-width: 52ch; line-height: 1.5; }

/* ── Unit cards ── */
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.8rem; }
.unit {
  --u: #888;
  position: relative;
  display: grid;
  gap: 0.2rem;
  padding: 0 0 0.9rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--ink-2);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.4s, transform 0.3s var(--ease);
}
.unit:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--u) 50%, transparent); }
.unit[aria-checked='true'] { border-color: var(--u); box-shadow: 0 0 0 1px var(--u), 0 0 34px -10px var(--u); }
.unit__img { aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 0.6rem; position: relative; }
.unit__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease), filter 0.5s; filter: brightness(0.75); }
.unit:hover .unit__img img, .unit[aria-checked='true'] .unit__img img { transform: scale(1.05); filter: none; }
.unit__img::after { content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 2px; background: var(--u); box-shadow: 0 0 12px 1px var(--u); opacity: 0.6; transition: opacity 0.3s; }
.unit[aria-checked='true'] .unit__img::after { opacity: 1; }
.unit b { font: 800 1.35rem/1 var(--f-display); padding: 0 0.9rem; }
.unit small { padding: 0 0.9rem; color: var(--mute); font-size: var(--t-xs); }
.unit__price { padding: 0.4rem 0.9rem 0; font-size: var(--t-sm); }
.unit__price strong { font-family: var(--f-display); }

/* ── Calendar ── */
.cal { position: relative; }
.cal__bar { position: absolute; right: 0; top: -3.3rem; display: flex; gap: 0.4rem; }
.cal__nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.cal__nav:hover:not([disabled]) { border-color: var(--led); background: var(--led-faint); }
.cal__nav[disabled] { opacity: 0.25; cursor: default; }
.cal__months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.month h3 { font: 600 var(--t-base)/1 var(--f-body); letter-spacing: 0; text-transform: capitalize; margin-bottom: 0.9rem; }
.month__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.month__dow { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); text-align: center; padding-bottom: 0.4rem; }
.day {
  position: relative;
  aspect-ratio: 1 / 1.05;
  display: grid;
  place-content: center;
  gap: 1px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font: 600 0.92rem/1 var(--f-body);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.day small { font: 500 0.6rem/1 var(--f-body); color: var(--mute); letter-spacing: 0.02em; }
.day:hover:not([disabled]) { border-color: var(--led); }
.day.is-weekend small { color: color-mix(in oklab, var(--led) 70%, white); }
.day[disabled] { cursor: default; background: transparent; color: rgba(238, 236, 232, 0.22); }
.day[disabled] small { visibility: hidden; }
.day.is-busy { color: rgba(238, 236, 232, 0.3); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 3px, transparent 3px 7px); }
.day.is-busy::after { content: ''; position: absolute; left: 22%; right: 22%; top: 50%; height: 1px; background: rgba(238, 236, 232, 0.35); transform: rotate(-20deg); }
.day.is-hold { color: rgba(255, 211, 107, 0.6); background: rgba(255, 211, 107, 0.06); border: 1px dashed rgba(255, 211, 107, 0.35); }
.day.is-checkout-only { color: var(--marble); }
.day.is-in-range { background: var(--led-faint); border-radius: 4px; }
.day.is-start, .day.is-end { background: var(--led); color: #0a0a0c; border-color: transparent; box-shadow: 0 0 18px -2px var(--led); }
.day.is-start small, .day.is-end small { color: rgba(10, 10, 12, 0.7); visibility: visible; }
.day.is-today::before { content: ''; position: absolute; top: 5px; right: 6px; width: 4px; height: 4px; border-radius: 50%; background: var(--led); }
.day.is-preview { background: color-mix(in oklab, var(--led) 8%, transparent); }
.cal__legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; padding: 0; margin: 1.2rem 0 0; font-size: var(--t-xs); color: var(--mute); }
.cal__legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 0.45rem; vertical-align: -1px; }
.lg-free { background: rgba(255, 255, 255, 0.08); }
.lg-busy { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 4px); }
.lg-hold { border: 1px dashed rgba(255, 211, 107, 0.6); }
.cal.is-loading .cal__months { opacity: 0.4; }

/* ── Guests & extras ── */
.guests { display: flex; align-items: center; gap: 1rem 1.4rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.stepper button { width: 42px; height: 42px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; border-radius: 50%; }
.stepper button:hover:not([disabled]) { color: var(--led); }
.stepper button[disabled] { opacity: 0.25; }
.stepper output { min-width: 2.2ch; text-align: center; font: 700 1.2rem/1 var(--f-display); }
.guests small { color: var(--mute); font-size: var(--t-xs); }
.extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.7rem; }
.extra { position: relative; display: grid; gap: 0.3rem; padding: 1rem 4.2rem 1rem 1.1rem; border-radius: var(--r); border: 1px solid var(--line); cursor: pointer; transition: border-color 0.25s, background 0.25s; }
.extra input { position: absolute; opacity: 0; pointer-events: none; }
.extra b { font-weight: 600; }
.extra small { color: var(--mute); font-size: var(--t-xs); }
.extra span { position: absolute; top: 1rem; right: 1.1rem; font: 700 var(--t-sm)/1 var(--f-display); }
.extra:has(input:checked) { border-color: var(--led); background: var(--led-faint); }
.extra:has(input:focus-visible) { outline: 2px solid var(--led); outline-offset: 2px; }

/* ── Fields ── */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.45rem; font-size: var(--t-sm); color: var(--mute); }
.field--wide { grid-column: 1 / -1; }
.field em { font-style: normal; opacity: 0.7; }
.field input, .field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--marble);
  font: 400 var(--t-base)/1.4 var(--f-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--led); box-shadow: 0 0 0 3px var(--led-faint); }
.field textarea { resize: vertical; min-height: 90px; }
.hp { position: absolute; left: -9999px; }
.form-error { margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 12px; background: rgba(255, 110, 110, 0.1); color: #ff9a9a; font-size: var(--t-sm); }
.btn--big { margin-top: 1.4rem; min-height: 56px; padding-inline: 2rem; font-size: var(--t-base); }
.btn.is-busy { pointer-events: none; opacity: 0.7; }

/* ── Bill under the key ── */
.bill { width: 100%; padding: 1.2rem 1.3rem; border-radius: var(--r); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); font-size: var(--t-sm); }
.bill__empty { color: var(--mute); }
.bill ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.bill li { display: flex; justify-content: space-between; gap: 1rem; color: rgba(238, 236, 232, 0.8); }
.bill li.bill__total { margin-top: 0.5rem; padding-top: 0.8rem; border-top: 1px dashed var(--line); color: var(--marble); font: 700 1.3rem/1 var(--f-display); }
.bill__pay { margin-top: 0.8rem; color: var(--mute); font-size: var(--t-xs); }

/* ── Issued state ── */
.issued { padding: 0 var(--pad) 4rem; display: grid; justify-items: center; text-align: center; gap: 1.2rem; }
.issued h1 { font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.04em; }
.issued__lead { max-width: 52ch; color: var(--mute); }
.issued__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 0.6rem; }
body.is-issued .book { grid-template-columns: 1fr; justify-items: center; padding-bottom: 2rem; }
body.is-issued .book__flow { display: none; }
body.is-issued .book__side { width: min(100%, 520px); }
body.is-issued .book__sticky { position: static; width: 100%; }
body.is-issued .bill { display: none; }


@media (max-width: 980px) {
  .book { grid-template-columns: 1fr; padding-top: 6.5rem; }
  .book__side { order: -1; }
  .book__sticky { position: static; }
  .book__sticky .key { width: min(100%, 420px); }
  .cal__months { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .fields { grid-template-columns: 1fr; }
  .units { grid-template-columns: 1fr 1fr; }
  .day { font-size: 0.85rem; border-radius: 7px; }
}
