:root {
  --paper: #f3eee6;
  --card: #fffaf4;
  --ink: #241c16;
  --muted: #6f655c;
  --line: #e6d9cb;
  --green: #1f7a45;
  --green-dark: #166237;
  --danger: #8d3b2f;
  --shadow: 0 10px 30px rgba(48, 32, 16, 0.08);
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

#scroll {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.lang {
  position: relative;
  z-index: 20;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 16px 4px;
  background: var(--paper);
}

.back-link {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  box-shadow: none;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}
.back-link[hidden] { display: none; }

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 148px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

#lang-btn, .lang-menu button {
  background: rgba(255, 250, 244, 0.94);
  color: var(--ink);
  font-weight: 700;
}

#lang-btn {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow);
}

.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  background: transparent;
  font-size: 15px;
  letter-spacing: 0;
}

.lang-menu button[aria-selected="true"] {
  background: #243028;
  color: #fffaf4;
}

#dock:empty { display: none; }

#dock {
  flex: none;
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 20px 20px calc(12px + env(safe-area-inset-bottom));
  background: #f3eee6;
  border-top: 1px solid rgba(36, 28, 22, 0.06);
}

button, .btn {
  font: inherit;
  border: 0;
  cursor: pointer;
}

.cover {
  position: relative;
  height: min(52vh, 440px);
  background: #2c2622;
  overflow: hidden;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  display: block;
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 12, 0) 42%, rgba(20, 16, 12, 0.72));
}

.cover h1 {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 36px;
  margin: 0;
  color: #fffaf4;
  font-family: Literata, Georgia, serif;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-shadow: 0 2px 16px rgba(20, 16, 12, 0.45);
}

.sheet {
  margin-top: -18px;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  position: relative;
  width: min(680px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding: 22px 20px 32px;
  overflow-wrap: break-word;
}

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

.practices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.practices button {
  width: 100%;
  background: var(--card);
  color: var(--ink);
  border-radius: 18px;
  padding: 18px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 18px;
  box-shadow: var(--shadow);
}

.saved-bookings { margin-top: 28px; }
.saved-bookings h3 {
  margin: 0 0 8px;
  font-family: Literata, Georgia, serif;
  font-size: 22px;
  font-weight: 650;
}
.booked-list { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 16px; }
.booked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.booked-item p { margin: 0; }
.cancel-link, .keep-link {
  background: none;
  box-shadow: none;
  padding: 8px 0;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
}
.cancel-link { color: var(--danger); }
.keep-link { color: var(--ink); margin-left: 16px; }
.cancel-ask { margin: 0 0 4px; }
.cancel-error { margin: 6px 0 0; color: var(--danger); font-size: 14px; }
.home-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
}
.home-links .about-link { margin: 0 0 0 16px; }

.contacts {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(36, 28, 22, 0.08);
}
.contacts .kicker { margin-bottom: 16px; text-align: center; }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  flex: none;
  background: var(--card);
  border-radius: 18px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}
.social-link svg { width: 26px; height: 26px; flex: none; }
.social-link:active { background: #f3ebe1; }
.pass-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 20px; }
.pass-card {
  background: var(--card);
  border: 1px solid rgba(36, 28, 22, 0.06);
  border-radius: 16px;
  padding: 14px 18px;
}
.pass-card strong { display: block; margin-bottom: 2px; }
.pass-card p { margin: 0; color: var(--muted); font-size: 15px; }
.mine-list .booked-item { align-items: flex-start; padding: 10px 0; }
.mine-list .booked-item + .booked-item { border-top: 1px solid rgba(36, 28, 22, 0.1); }
.mine-list .booked-item p { line-height: 1.45; }
.mine-sub {
  margin: 28px 0 8px;
  font-family: Literata, Georgia, serif;
  font-size: 20px;
  font-weight: 650;
}
.door-qr {
  display: block;
  width: min(220px, 100%);
  height: auto;
  margin: 8px auto 16px;
  padding: 10px;
  background: #fff;
  border-radius: 14px;
}

/* Страница подтверждения записи */
.sheet.confirm { width: min(560px, 100%); padding: 24px 20px 40px; }
.sheet h2.confirm-title {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
}
.confirm-sub { margin: 0 0 24px; font-size: 17px; line-height: 1.5; }
.confirm-card {
  background: var(--card);
  border: 1px solid rgba(36, 28, 22, 0.06);
  border-radius: 18px;
  padding: 20px 22px;
}
.confirm-card + .confirm-card { margin-top: 12px; }
.confirm-card strong { display: block; font-size: 18px; line-height: 1.4; margin-bottom: 8px; }
.confirm-card p { margin: 0; font-size: 16px; line-height: 1.5; }
.confirm-card .pay { margin-top: 8px; color: var(--muted); font-size: 15px; }
.confirm h3 {
  margin: 28px 0 10px;
  font-family: Literata, Georgia, serif;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.confirm .lines { margin: 0; font-size: 16px; line-height: 1.5; }
.confirm .lines + .lines { margin-top: 8px; }
.confirm .fine { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.map-out {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.qr-box {
  width: 232px;
  max-width: 100%;
  margin: 0 auto 16px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
}
.qr-box img { display: block; width: 200px; height: 200px; max-width: 100%; }
.qr-missing { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.5; }
.steps { margin: 0; padding-left: 22px; font-size: 16px; line-height: 1.5; }
.steps li + li { margin-top: 8px; }
.confirm .arrive { margin-top: 24px; font-size: 16px; }
.confirm-cancel { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; }
.confirm-cancel .cancel-link { font-weight: 600; }
.confirm-cancel .cancel-link + .cancel-link { margin-top: 4px; }
.cancel-dialog {
  width: 100%;
  background: var(--card);
  border: 1px solid rgba(36, 28, 22, 0.06);
  border-radius: 18px;
  padding: 20px 22px;
}
.cancel-dialog p { margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
.cancel-link.wide { width: 100%; text-align: center; margin-top: 4px; }

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0 16px;
  padding: 0;
  background: none;
  box-shadow: none;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  text-align: left;
}

.fact {
  margin: 0 0 14px;
  line-height: 1.45;
}

.fact span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.choice button, .subchoice button, .list button, .quiet {
  background: var(--card);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  box-shadow: var(--shadow);
}

.choice button[aria-pressed="true"], .subchoice button[aria-pressed="true"] {
  background: #243028;
  color: #fffaf4;
}

.subchoice {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.subchoice button { box-shadow: none; border: 1px solid var(--line); }

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.sheet h2, .card h2, .section h2 {
  margin: 0 0 8px;
  font-family: Literata, Georgia, serif;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.meta { margin: 0 0 6px; line-height: 1.45; }
.muted { color: var(--muted); }
.price { margin: 10px 0 0; font-weight: 700; }

.prose { white-space: pre-wrap; line-height: 1.5; margin: 0; }
.prose + .prose { margin-top: 10px; }
.note {
  margin: 0 0 14px;
  font-style: italic;
  line-height: 1.45;
}

.list { display: flex; flex-direction: column; gap: 8px; }
.list button small, .booking small { display: block; color: var(--muted); margin-top: 4px; font-weight: 500; }
.list button[aria-pressed="true"] { outline: 2px solid #1f7a45; }

.section { margin-top: 8px; }
.section h2 { font-size: 22px; }

.pass {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.pass:first-of-type { border-top: 0; }
.pass strong { display: block; margin-bottom: 4px; }

.primary, .dock-btn {
  width: 100%;
  min-height: 48px;
  background: #2a2622;
  color: #fffaf4;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
}

.primary:active, .dock-btn:active { background: #1a1614; }
.primary:disabled, .dock-btn:disabled { opacity: 0.55; }

.ghost {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  color: var(--danger);
  padding: 12px;
  font-weight: 700;
}

.cal { margin: 4px 0 8px; }
.cal-lead {
  margin: 0 0 10px;
  line-height: 1.45;
}
.cal-title {
  margin: 0 0 8px;
  font-weight: 700;
  text-transform: capitalize;
}
.cal-head, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-head {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
}
.cal-day {
  min-height: 48px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #b3a89d;
  font-weight: 600;
  background: transparent;
  padding: 4px 0;
}
.cal-day.is-open {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 700;
}
.cal-day.is-open[aria-pressed="true"] {
  background: #2a2622;
  color: #fffaf4;
  box-shadow: inset 0 0 0 2px #fffaf4, 0 0 0 2px #2a2622;
}
.cal-day.is-open:disabled {
  opacity: 1;
  background: transparent;
  color: #8a8178;
  box-shadow: none;
  cursor: default;
}
.cal-day.is-open:disabled .cal-num { text-decoration: line-through; }
/* Своя дата (уже записаны): видна как карточка с рамкой и галочкой, число не зачёркнуто. */
.cal-day.is-open.is-mine,
.cal-day.is-open.is-mine:disabled {
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px #2a2622;
}
.cal-day.is-open.is-mine:disabled .cal-num { text-decoration: none; }
.cal-day.is-open.is-mine:disabled .cal-seats { color: var(--muted); }
/* Галочка в углу своей даты */
.cal-day.is-open.is-mine { position: relative; }
.cal-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  color: var(--ink);
  line-height: 0;
}
.cal-check { width: 9px; height: 9px; stroke-width: 2.4; }
/* Полная дата: без тени, серая, но нажимается — открывает «Сообщить о свободном месте». */
.cal-day.is-open.is-full {
  background: transparent;
  color: #8a8178;
  box-shadow: inset 0 0 0 1px rgba(36, 28, 22, 0.14);
}
.cal-day.is-open.is-full .cal-num { text-decoration: line-through; }
.cal-day.is-open.is-full[aria-pressed="true"] {
  background: #2a2622;
  color: #fffaf4;
  box-shadow: inset 0 0 0 2px #fffaf4, 0 0 0 2px #2a2622;
}
.cal-day.is-open.is-full[aria-pressed="true"] .cal-num { text-decoration: none; }
.cal-num { line-height: 1.1; }
.cal-bell { width: 10px; height: 10px; margin-left: 3px; vertical-align: -1px; }
.cal-seats {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cal-day.is-open[aria-pressed="true"] .cal-seats { color: rgba(255, 250, 244, 0.75); }
.cal-day.is-open:disabled .cal-seats,
.cal-day.is-open.is-full .cal-seats { color: #8a8178; }
.cal-day.is-open.is-full[aria-pressed="true"] .cal-seats { color: rgba(255, 250, 244, 0.8); }
.cal-legend {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

/* «Сообщить о свободном месте» — карточка под календарём для полной даты */
.wait-card {
  margin-top: 18px;
  padding: 18px 18px 16px;
  background: var(--card);
  border: 1px solid rgba(36, 28, 22, 0.06);
  border-radius: 18px;
}
.wait-meta {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}
.wait-title {
  margin: 0;
  font-family: Literata, Georgia, serif;
  font-size: 20px;
  line-height: 25px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.wait-label { margin-top: 14px; }
.chips.chips-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 8px 0 10px;
  padding: 3px;
  background: var(--paper);
  border-radius: 14px;
}
.chips.chips-seg .chip {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 11px;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
}
.chips.chips-seg .chip[aria-pressed="true"] { background: #2a2622; color: #fffaf4; }
.wait-card .field { margin: 0 0 10px; }
.wait-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  background: #2a2622;
  color: #fffaf4;
  font-size: 16px;
  font-weight: 700;
}
.wait-btn svg { width: 20px; height: 20px; flex: none; }
.wait-btn:disabled { opacity: 0.6; }
.wait-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}
.wait-inchat { text-align: left; margin: 0 0 12px; font-size: 15px; line-height: 20px; }
.wait-bot { text-align: left; font-size: 14px; line-height: 20px; }
.wait-error {
  margin: 0 0 10px;
  color: var(--danger);
  font-size: 14px;
  line-height: 20px;
}
.wait-ok {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}
.wait-ok svg { width: 22px; height: 22px; flex: none; }
.wait-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.sheet h2.hatha-title {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 38px;
  font-weight: 650;
}
.hatha-lead {
  margin: 0;
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
}
.hatha-lead + .hatha-lead { margin-top: 12px; }
.pair {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 28px;
}
.pair p {
  flex: 1 1 140px;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}
.pair span, .price-sub, .pay-note, .date-hint {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
}
.pair span {
  display: block;
  margin-bottom: 6px;
  color: #4e463f;
  font-weight: 500;
}
.where { margin-top: 28px; }
.where p {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}
.where p + p { margin-top: 2px; }
.where + .where { margin-top: 18px; }
.map-link {
  display: inline-block;
  margin-top: 8px;
  color: #241c16;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-underline-offset: 3px;
}
.prices { margin-top: 28px; }
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 14px;
  font-size: 16px;
  line-height: 24px;
}
.price-row:first-child { margin-top: 0; }
.price-row span { min-width: 0; }
.price-row strong {
  flex: none;
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
}
.price-sub {
  margin: 6px 0 0;
  color: #4e463f;
  font-weight: 400;
}
.pay-note {
  margin: 16px 0 0;
  font-style: normal;
  font-weight: 400;
  color: #4e463f;
}
.cal { margin-top: 28px; }
.cal-lead {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.date-hint {
  margin: -4px 0 12px;
  color: var(--danger);
  font-weight: 500;
}
.form-label {
  display: block;
  margin: 18px 0 0;
  font-size: 15px;
  line-height: 20px;
  color: #4e463f;
}
.form-label + .field { margin-top: 8px; }
.chips { display: flex; gap: 8px; margin: 4px 0 6px; }
.chip {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.chip[aria-pressed="true"] { background: #2a2622; color: #fffaf4; }
.divider {
  border: 0;
  border-top: 1px solid rgba(36, 28, 22, 0.12);
  margin: 24px 0 18px;
}
.check {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  font-size: 17px;
  line-height: 24px;
  cursor: pointer;
}
.check input {
  width: 26px;
  height: 26px;
  margin: 0;
  flex: none;
  accent-color: #2a2622;
  cursor: pointer;
}
.check input:disabled + span { color: var(--muted); }
.friends-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.friends-label { font-size: 15px; line-height: 20px; color: #4e463f; }
.party-line { margin: 10px 0 0; font-size: 15px; line-height: 20px; }
.dock-note {
  margin: 10px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
}
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--card);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.step {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  font-weight: 500;
  padding: 0;
}
.step:disabled { opacity: 0.3; }
.step-value {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: 0 8px;
  text-align: center;
}
.step-value strong { font-size: 22px; line-height: 26px; }
.step-value small { color: var(--muted); font-size: 13px; line-height: 16px; }
.party-limit {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}
.party-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #2a2622;
  color: #fffaf4;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  vertical-align: 2px;
}
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid #241c16;
  outline-offset: 3px;
}

.notice {
  background: #fff4e8;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  line-height: 1.45;
}

.field {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  margin: 8px 0 12px;
}

.link {
  display: inline-block;
  margin-top: 8px;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: none;
}

.file {
  display: block;
  width: 100%;
  margin-top: 8px;
}
