/* KULËK: бронь стола (bron.html). Основа, цвета и форма в style.css, здесь только то, что нужно брони. */

/* ---------- Первый экран: большое слово, кульки вокруг ---------- */

.bron-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  margin: 88px var(--gutter) 0;
  min-height: min(calc(100vh - 112px), 640px);
  min-height: min(calc(100svh - 112px), 640px);
  padding: clamp(18px, 2.6vw, 36px);
  border: var(--frame);
  background: var(--tomato);
  overflow: hidden;
}
.bron-hero__rule { position: relative; z-index: 3; margin-bottom: 0; }
.bron-hero__title {
  position: relative;
  z-index: 1;
  margin: auto 0;
  padding: clamp(20px, 3.4vw, 44px) 0;
  font-size: clamp(52px, 10.4vw, 172px);
  line-height: 0.86;
  letter-spacing: -0.035em;
}
/* Вторая строка со сдвигом: в этот карман залетает кулёк */
.bron-hero__title .line + .line { padding-left: 0.92em; }
.bron-hero .folds { z-index: 0; }
.bron-hero .kulek { z-index: 2; width: clamp(130px, 16vw, 250px); }
.bron-hero .kulek--1 { left: auto; right: 5%; top: 11%; bottom: auto; }
.bron-hero .kulek--2 { left: 0.5%; right: auto; top: 44%; bottom: auto; width: clamp(110px, 13vw, 200px); }
.bron-hero .kulek--3 { left: 50%; right: auto; top: auto; bottom: 3%; width: clamp(100px, 11vw, 180px); }

.bron-hero__foot {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 48px;
  align-items: end;
}
.bron-hero__foot .lead { max-width: 24em; margin-bottom: 18px; }
.bron-hero__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border: var(--frame);
  border-radius: 18px;
  background: var(--paper);
  overflow: hidden;
  font-size: 15px;
}
.bron-hero__facts li { padding: 10px 18px; }
.bron-hero__facts li + li { border-top: var(--hair); }
.bron-hero__facts b { font-weight: 800; text-transform: uppercase; margin-right: 6px; }

@media (max-width: 900px) {
  .bron-hero { margin-top: 80px; min-height: 0; }
  .bron-hero__title { margin: 0; padding: 34vw 0 22px; font-size: 15.4vw; }
  .bron-hero__title .line + .line { padding-left: 0; }
  .bron-hero .kulek { width: 25vw; }
  .bron-hero .kulek--1 { left: 3%; right: auto; top: 54px; }
  .bron-hero .kulek--2 { left: 37%; top: 40px; width: 25vw; }
  .bron-hero .kulek--3 { left: auto; right: 2%; top: 62px; bottom: auto; width: 25vw; }
  .bron-hero__foot { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .bron-hero { margin-top: 76px; padding: 16px; }
  .bron-hero__title { padding-top: 36vw; font-size: 15.6vw; }
  .bron-hero .kulek--1 { top: 48px; }
  .bron-hero .kulek--2 { top: 34px; }
  .bron-hero .kulek--3 { top: 54px; }
  .bron-hero__foot .lead { margin-bottom: 16px; }
  .bron-hero__facts { font-size: 14px; }
  .bron-hero__facts li { padding: 9px 14px; }
}

/* ---------- Секция брони: плотнее, чем анкеты ---------- */

.bron-book { padding: clamp(48px, 6vw, 88px) 0; }
.bron-book .rule { margin-bottom: clamp(20px, 2.4vw, 32px); }
.bron-book .apply { grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); }
@media (max-width: 900px) { .bron-book .apply { grid-template-columns: 1fr; gap: 20px; } }
.bron-book .apply__aside .h2 { font-size: clamp(32px, 3.6vw, 52px); }
.bron-book .apply__aside .lead { margin-top: 14px; font-size: 16px; }
.bron-book .q { grid-template-columns: 44px minmax(0, 1fr); gap: 6px 16px; padding: 20px 0; }
.bron-book .q__icon { width: 44px; height: 44px; }
.bron-book .q__icon .i { width: 21px; height: 21px; }
.bron-book .q__title { font-size: 19px; }
.bron-book .q__control { margin-top: 6px; gap: 10px; }
.bron-book .submit { margin-top: 20px; }
@media (max-width: 520px) {
  .bron-book { padding: 44px 0 52px; }
  .bron-book .q { grid-template-columns: 36px minmax(0, 1fr); gap: 6px 12px; padding: 16px 0; }
  .bron-book .q__icon { width: 36px; height: 36px; }
  .bron-book .q__icon .i { width: 18px; height: 18px; }
  .bron-book .q__title { font-size: 17.5px; }
}

/* ---------- Билет со сводкой ---------- */

.ticket {
  --notch: 13px;
  --cut: 53px; /* высота шапки: вырезы на линии отрыва */
  position: relative;
  margin-top: 24px;
  padding: 20px 20px 18px;
  border: var(--frame);
  border-radius: 18px;
  background: var(--kraft);
  /* Вырезы по бокам на линии отрыва, как у билета */
  -webkit-mask: radial-gradient(circle var(--notch) at 0 var(--cut), transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% var(--cut), transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 var(--cut), transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% var(--cut), transparent 98%, #000) right / 51% 100% no-repeat;
}
.ticket__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1.5px dashed var(--graphite); }
.ticket__head img { height: 16px; width: auto; }
.ticket__rows { margin: 0; padding: 8px 0 12px; }
.ticket__rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; }
.ticket__rows dt { font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(39, 42, 43, 0.62); }
.ticket__rows dd { margin: 0; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ticket__rows dd.is-empty { font-weight: 500; color: rgba(39, 42, 43, 0.5); }
.ticket__foot { padding-top: 14px; border-top: 1.5px dashed var(--graphite); font-size: 14px; line-height: 1.4; }
/* Штамп ложится на подписи слева, значения справа остаются читаемыми */
.ticket__stamp {
  position: absolute;
  left: 12px;
  top: 47%;
  padding: 6px 12px;
  border: 2.5px solid var(--tomato);
  border-radius: 10px;
  color: var(--tomato);
  background: rgba(255, 255, 255, 0.55);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-10deg) scale(1.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.ticket.is-ready .ticket__stamp { opacity: 1; transform: rotate(-10deg) scale(1); }

/* Короткая сводка для телефона: висит сверху, пока заполняют форму */
.ticket-mini {
  display: none;
  position: sticky;
  top: 76px;
  z-index: 5;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  margin-bottom: 4px;
  border: var(--frame);
  border-radius: 999px;
  background: rgba(220, 198, 166, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.25;
}
.ticket-mini .i { width: 20px; height: 20px; }
.ticket-mini.is-ready { background: rgba(255, 97, 68, 0.97); }
@media (max-width: 900px) {
  .ticket-mini { display: flex; }
  .ticket { display: none; }
  .bron-book .ticket-mini + .q { border-top: 0; padding-top: 14px; }
}

/* ---------- Бистро: карточки 2 × 2 ---------- */

.spots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.spot { position: relative; display: block; }
.spot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.spot__card {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  align-content: start;
  gap: 2px 10px;
  height: 100%;
  padding: 12px 14px;
  border: var(--frame);
  border-radius: 16px;
  background: var(--paper);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
@media (hover: hover) { .spot__card:hover { background: var(--linen); } }
.spot input:checked + .spot__card { background: var(--tomato); box-shadow: 0 3px 0 var(--graphite); }
.spot input:focus-visible + .spot__card { outline: 3px solid var(--graphite); outline-offset: 2px; }
.spot input:active + .spot__card { transform: scale(0.98); }
.spot__pin {
  width: 20px; height: 20px;
  border: var(--frame);
  border-radius: 50%;
  background: var(--paper);
  transition: box-shadow 0.15s;
}
.spot input:checked + .spot__card .spot__pin { background: var(--graphite); box-shadow: inset 0 0 0 4px var(--paper); }
.spot__name { font-weight: 800; text-transform: uppercase; font-size: 16.5px; line-height: 1.1; letter-spacing: -0.005em; }
.spot__metro, .spot__addr { grid-column: 2; font-size: 13.5px; line-height: 1.3; }
.spot__addr { color: var(--ink-2); }
.spot input:checked + .spot__card .spot__addr { color: var(--graphite); }
@media (max-width: 520px) {
  .spots { gap: 6px; }
  .spot__card { grid-template-columns: 16px minmax(0, 1fr); gap: 2px 8px; padding: 10px 11px; border-radius: 14px; }
  .spot__pin { width: 16px; height: 16px; }
  .spot__name { font-size: 14px; }
  .spot__metro { font-size: 12.5px; }
  .spot__addr { display: none; }
}

/* Кулёк, который летит за курсором над карточками бистро (только мышь) */
.spot-float {
  position: fixed;
  left: 0; top: 0;
  z-index: 40;
  width: 110px;
  pointer-events: none;
  filter: drop-shadow(0 14px 18px rgba(39, 42, 43, 0.3));
  visibility: hidden;
}

/* ---------- Дни: две недели по семь ---------- */

.cal__month { margin-bottom: 8px; font-weight: 700; font-size: 14.5px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 560px; }
.cal__day { position: relative; }
.cal__day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cal__day span {
  display: grid;
  justify-items: center;
  gap: 1px;
  padding: 6px 0 7px;
  border: var(--frame);
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, transform 0.15s var(--ease);
}
.cal__day small { font-size: 10.5px; font-weight: 600; line-height: 1.2; color: var(--ink-2); text-transform: lowercase; }
.cal__day.is-weekend small { color: var(--tomato); }
.cal__day b { font-size: 18px; font-weight: 800; line-height: 1.1; }
@media (hover: hover) { .cal__day input:not(:disabled) + span:hover { background: var(--linen); } }
.cal__day input:checked + span { background: var(--tomato); }
.cal__day input:checked + span small { color: var(--graphite); }
.cal__day input:focus-visible + span { outline: 3px solid var(--graphite); outline-offset: 2px; }
.cal__day input:active + span { transform: scale(0.95); }
.cal__day input:disabled + span {
  border-color: #dcd7d1;
  color: #b5b0aa;
  background: repeating-linear-gradient(-45deg, var(--paper) 0 5px, #f1ede8 5px 10px);
  cursor: not-allowed;
}
.cal__day input:disabled + span small { color: #c3beb8; }
@media (max-width: 520px) {
  .cal__grid { gap: 4px; }
  .cal__day span { padding: 5px 0 6px; border-radius: 10px; }
  .cal__day small { font-size: 9px; }
  .cal__day b { font-size: 16px; }
}

/* ---------- Время: одна сетка ---------- */

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; max-width: 560px; margin-top: 6px; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot span {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: var(--frame);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, transform 0.15s var(--ease);
}
@media (hover: hover) { .slot input:not(:disabled) + span:hover { background: var(--linen); } }
.slot input:checked + span { background: var(--tomato); }
.slot input:focus-visible + span { outline: 3px solid var(--graphite); outline-offset: 2px; }
.slot input:active + span { transform: scale(0.95); }
.slot input:disabled + span { border-color: #dcd7d1; color: #b5b0aa; text-decoration: line-through; cursor: not-allowed; }
@media (max-width: 520px) {
  .times { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .slot span { min-height: 38px; font-size: 14px; }
}

/* ---------- Гости ---------- */

.stepper {
  display: inline-grid;
  grid-template-columns: 44px minmax(0, auto) 44px;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: var(--frame);
  border-radius: 999px;
  justify-self: start;
}
.stepper__btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--linen);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--ease);
}
.stepper__btn svg { width: 20px; height: 20px; }
@media (hover: hover) { .stepper__btn:hover { background: var(--kraft); } }
.stepper__btn:active { transform: scale(0.92); }
.stepper__btn:disabled { opacity: 0.35; cursor: default; }
.stepper__value { display: flex; align-items: baseline; justify-content: center; gap: 7px; min-width: 112px; }
.field.stepper__input {
  width: 2.2ch;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  text-align: right;
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
}
.field.stepper__input:focus { box-shadow: 0 0 0 3px rgba(255, 97, 68, 0.4); }
.stepper__unit { font-weight: 700; font-size: 17px; }

/* ---------- Повод и пожелания: свёрнуто ---------- */

.extra { border-top: var(--hair); }
.extra summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}
.extra summary::-webkit-details-marker { display: none; }
.extra summary::after {
  content: "+";
  margin-left: auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: var(--frame);
  border-radius: 50%;
  font-weight: 600;
  font-size: 19px;
  line-height: 1;
  transition: transform 0.2s var(--ease);
}
.extra[open] summary::after { transform: rotate(45deg); }
.extra__title { display: grid; line-height: 1.25; }
.extra__title small { font-weight: 500; font-size: 14px; color: var(--ink-2); }
.extra__icon {
  width: 44px; height: 44px;
  flex: none;
  display: grid; place-items: center;
  border: 1.5px dashed var(--graphite);
  border-radius: 50%;
}
.extra__icon .i { width: 21px; height: 21px; }
.extra__body { display: grid; gap: 10px; padding: 0 0 16px 60px; }
.extra .chip span { min-height: 40px; font-size: 15px; padding: 0 14px; }
@media (max-width: 520px) {
  .extra summary { gap: 12px; font-size: 16px; }
  .extra__icon { width: 36px; height: 36px; }
  .extra__icon .i { width: 18px; height: 18px; }
  .extra__body { padding-left: 0; }
}

/* ---------- Подсказки и «Спасибо» ---------- */

.hint { font-size: 14px; color: var(--ink-2); }
.hint:empty { display: none; }

.done .h2 { max-width: 12em; }
.done__call { margin-top: 16px; font-weight: 600; }
.done__call a { white-space: nowrap; }
