:root {
  --bg: #ffffff;
  --ink: #333333;
  --muted: #999999;
  --line: #e5e0da;
  --soft: #f6f3ef;
  --btn: #2c2c2c;
  --warn: #b4532a;
  --ok: #2f6b4f;
  --serif: "Oranienbaum", Georgia, serif;
  --sans: "Corporate A Cond Pro", "Roboto Condensed", Arial, sans-serif;
  --pad: 80px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.35;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }


.kicker { margin: 0 0 12px; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

/* 1. Route hero */
.route-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; padding: 48px 0 56px; align-items: center; }
.route-hero__photo { aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.route-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.route-hero__title { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1.1; margin: 0 0 16px; }
.route-hero__desc { margin: 0 0 28px; font-size: 20px; }
.route-facts { margin: 0 0 24px; border-top: 1px solid var(--line); }
.route-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.route-facts dt { color: var(--muted); }
.route-facts dd { margin: 0; text-align: right; }
.route-facts a { color: var(--ink); text-underline-offset: 3px; }
.route-prices { margin: 0; font-size: 20px; }
.route-prices b { font-weight: 400; }

/* Layout: steps + summary */
.booking { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; padding-bottom: 120px; }
.booking__steps { min-width: 0; }
.step { padding: 36px 0; border-top: 1px solid var(--line); }
.step__title { display: flex; align-items: baseline; gap: 16px; margin: 0 0 20px; font-family: var(--serif); font-weight: 400; font-size: 36px; }
.step__num { font-family: var(--sans); font-size: 14px; letter-spacing: 1px; color: var(--muted); }
.step--promo { padding: 24px 0; }

.hint { margin: 12px 0 0; font-size: 16px; color: var(--muted); }
.hint--small { font-size: 14px; }
.hint--warn { color: var(--warn); }
.hint--ok { color: var(--ok); }

/* 2. Date strip */
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.day {
  flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 4px; border: 1px solid var(--line); background: var(--bg); cursor: pointer;
}
.day__wd { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.day__num { font-family: var(--serif); font-size: 28px; line-height: 1; }
.day__month { font-size: 13px; color: var(--muted); }
.day__note { font-size: 12px; color: var(--warn); }
.day:hover:not(:disabled) { border-color: var(--ink); }
.day[aria-selected="true"] { background: var(--btn); border-color: var(--btn); color: #fff; }
.day[aria-selected="true"] .day__wd, .day[aria-selected="true"] .day__month { color: #ccc; }
.day:disabled { cursor: default; opacity: .38; }
.day--soldout:disabled { opacity: .6; }
.day--soldout .day__num { text-decoration: line-through; }

/* 3. Slots */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.slot {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px;
  border: 1px solid var(--line); background: var(--bg); text-align: left; cursor: pointer;
}
.slot__time { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.slot__seats { font-size: 15px; }
.slot__seats--low { color: var(--warn); }
.slot__ship { font-size: 13px; color: var(--muted); }
.slot:hover:not(:disabled) { border-color: var(--ink); }
.slot[aria-pressed="true"] { background: var(--btn); border-color: var(--btn); color: #fff; }
.slot[aria-pressed="true"] .slot__ship { color: #ccc; }
.slot[aria-pressed="true"] .slot__seats--low { color: #f3c4ae; }
.slot:disabled { cursor: default; background: var(--soft); color: var(--muted); }
.slot:disabled .slot__time { text-decoration: line-through; }
.slot__reason { font-size: 14px; color: var(--warn); }

/* 4. Tickets */
.tickets { border-top: 1px solid var(--line); }
.ticket { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ticket__name { font-size: 20px; }
.ticket__hint { display: block; font-size: 15px; color: var(--muted); }
.ticket__right { display: flex; align-items: center; gap: 24px; }
.ticket__price { min-width: 80px; text-align: right; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; cursor: pointer; }
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper output { width: 36px; text-align: center; font-size: 20px; }

/* 5. Contacts */
/* имя и телефон в ряд, email — на всю ширину: длинный адрес помещается целиком.
   minmax(0, …) и min-width: 0 не дают полю распирать сетку */
.fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; min-width: 0; border-right: 1px solid var(--line); }
.field:nth-child(2), .field:last-child { border-right: 0; }
.field:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.field__label { font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.field input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 0; font-size: 20px; background: none; text-overflow: ellipsis; }
.field input::placeholder { color: #c4c0bb; }
.field__hint { font-size: 14px; color: var(--muted); }
.field__error { display: none; font-size: 14px; color: var(--warn); }
.field.is-invalid .field__hint { display: none; }
.field.is-invalid .field__error { display: block; }
.field:focus-within { box-shadow: inset 0 -2px 0 var(--ink); }

/* 6. Promo */
.link-button { padding: 0; border: 0; background: none; font-size: 18px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.promo { display: flex; gap: 8px; margin-top: 14px; max-width: 420px; }
.promo input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); outline: 0; text-transform: uppercase; }
.promo input:focus { border-color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  padding: 16px 24px; border: 1px solid var(--btn); background: var(--btn); color: #fff;
  font-size: 17px; letter-spacing: 1px; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.btn--outline { background: none; color: var(--ink); }
.btn--small { padding: 8px 14px; font-size: 14px; }
.btn:disabled { background: #bdb8b2; border-color: #bdb8b2; cursor: not-allowed; }

/* 5a. Payment method */
.paymethods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.paymethod { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); cursor: pointer; }
.paymethod input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--btn); flex: none; }
.paymethod b { display: block; font-weight: 400; font-size: 19px; }
.paymethod span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.paymethod.is-on { border-color: var(--ink); }
.paymethod.is-disabled { cursor: not-allowed; color: var(--muted); background: var(--soft); }
.paymethod.is-disabled b { color: var(--muted); }

/* 7. Summary */
.summary { position: sticky; top: calc(var(--header-h, 0px) + 24px); padding: 28px; border: 1px solid var(--line); background: var(--bg); }
.summary__bar { display: none; }
.summary__title { margin: 0 0 8px; font-family: var(--serif); font-weight: 400; font-size: 30px; }
.summary__trip { margin: 0 0 16px; color: var(--muted); }
.summary__lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.summary__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.summary__discount { display: flex; justify-content: space-between; margin: 10px 0 0; color: var(--ok); font-size: 17px; }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 20px; }
.summary__total strong { font-family: var(--serif); font-weight: 400; font-size: 40px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 15px; cursor: pointer; }
.check input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--btn); flex: none; }
.check.is-invalid { color: var(--warn); }
.btn--pay { width: 100%; margin-top: 8px; }
.summary__error { margin: 10px 0 0; font-size: 15px; color: var(--warn); }
.summary__note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* Alerts */
.alert { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 24px; padding: 16px 20px; border: 1px solid var(--warn); color: var(--warn); }
.alert strong { font-weight: 400; }

/* Redirect overlay */
.redirect { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(255, 255, 255, .92); }
.redirect__box { text-align: center; font-size: 22px; }

/* 8. Success */
.success { padding: 64px var(--pad) 120px; }
.success__card { max-width: 560px; margin: 0 auto; text-align: center; }
.success__title { margin: 0 0 28px; font-family: var(--serif); font-weight: 400; font-size: 52px; }
.success__facts { margin: 0 0 28px; border-top: 1px solid var(--line); text-align: left; }
.success__facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.success__facts dt { color: var(--muted); }
.success__facts dd { margin: 0; text-align: right; }
.success__qr { display: flex; justify-content: center; margin-bottom: 28px; }
.qr { width: 168px; height: 168px; display: grid; grid-template-columns: repeat(21, 1fr); border: 8px solid #fff; outline: 1px solid var(--line); }
.qr i { background: var(--ink); }
.qr i.o { background: transparent; }
.memo { margin: 28px 0 0; padding: 20px 24px; list-style: none; background: var(--soft); text-align: left; }
.memo li { padding: 4px 0 4px 18px; position: relative; }
.memo li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }

/* Tablet */
@media (max-width: 1024px) {
  :root { --pad: 40px; }
  .route-hero { grid-template-columns: 1fr; gap: 32px; }
  .booking { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
  .fields { grid-template-columns: 1fr; }
  .field { border-right: 0; border-bottom: 1px solid var(--line); }
  .field:last-child { border-bottom: 0; border-top: 0; }
}

/* Mobile: summary becomes a fixed bottom panel */
@media (max-width: 760px) {
  :root { --pad: 16px; }
  body { font-size: 17px; }
  .route-hero { padding: 0 0 32px; margin: 0 calc(-1 * var(--pad)); gap: 24px; }
  .route-hero__info { padding: 0 var(--pad); }
  .route-hero__title { font-size: 40px; }
  .step__title { font-size: 30px; }
  .booking { display: block; padding-bottom: 260px; }
  .slots { grid-template-columns: repeat(2, 1fr); }
  .ticket { flex-wrap: wrap; }
  .ticket__right { gap: 16px; }
  .ticket__price { min-width: 0; }

  .summary {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 20;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    border: 0; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0, 0, 0, .06);
    max-height: 85vh; overflow-y: auto;
  }
  .summary__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
  .summary__bar-label { display: block; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
  .summary__bar-total { font-family: var(--serif); font-size: 30px; }
  .summary__body { display: none; }
  .summary.is-open .summary__body { display: block; }
  .summary.is-open .summary__title { display: none; }
  .summary__total { display: none; }
  .summary__note { font-size: 13px; }
  #hold-note { display: none; }
  .success__title { font-size: 40px; }
}
