:root {
  --ink: #1c1916;
  --muted: #6d655c;
  --line: #e4ddd3;
  --paper: #f7f4ef;
  --panel: #fffdfb;
  --hatch: #ece7e0;
  --accent: #9a3b2f;
  --ok: #1f6b45;
  --shadow: 0 18px 50px rgba(40, 28, 16, 0.08);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.03em; margin: 0; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0;
  background: rgba(247, 244, 239, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #111; }
.brand strong { display: block; font-size: 15px; letter-spacing: 0.08em; }
.brand span { display: block; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.nav { display: flex; gap: 18px; align-items: center; }
.nav a { text-decoration: none; font-size: 15px; }
.nav a.btn, a.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; text-decoration: none;
  border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer;
}
button.btn.ghost, a.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.hero {
  position: relative;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  padding: 0;
  margin-top: -14px; /* tuck under sticky header gap */
}
.hero-frame {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  border-radius: 0;
  overflow: hidden;
  background: #111 center/cover no-repeat;
  background-attachment: scroll;
}
.hero-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.45));
}
.hero-copy {
  position: absolute; z-index: 1; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; color: #fff; padding: 96px 24px 48px;
  max-width: none;
}
.eyebrow {
  letter-spacing: 0.18em; text-transform: uppercase; font-size: 13px; margin-bottom: 14px;
  text-shadow: 0 1px 12px rgba(0,0,0,.45);
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 64px); line-height: 1.05; max-width: 16ch;
  text-shadow: 0 2px 24px rgba(0,0,0,.45);
}
.hero p {
  max-width: 52ch; font-size: clamp(16px, 2vw, 19px); margin: 16px 0 0;
  text-shadow: 0 1px 14px rgba(0,0,0,.4);
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.hero-actions .btn {
  background: #fff; color: var(--ink);
}
.hero-actions .btn.ghost {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.7);
}
.hero-arrow {
  position: absolute; z-index: 2; left: 50%; bottom: 22px; transform: translateX(-50%);
  color: #fff; opacity: .85; font-size: 22px; text-decoration: none;
  animation: heroBob 1.8s ease-in-out infinite;
}
@keyframes heroBob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-arrow { animation: none; }
}

.section { padding: 54px 0; }
.section h2 { font-size: clamp(32px, 4vw, 52px); margin-bottom: 18px; }
.lead { color: var(--muted); max-width: 62ch; }

.halls { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hall {
  position: relative; display: block; min-height: 460px; border-radius: 18px; overflow: hidden;
  text-decoration: none; color: #fff; background: #222 center/cover no-repeat;
}
.hall::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 35%, rgba(0,0,0,0.78) 78%, rgba(0,0,0,0.9));
}
.hall-copy {
  position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 14px;
  display: grid; gap: 6px; padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.62));
  border-radius: 14px; backdrop-filter: blur(2px);
}
.hall-copy strong {
  font-family: var(--serif); font-size: clamp(28px, 3.2vw, 36px); font-weight: 500;
  display: block; line-height: 1.1; letter-spacing: -0.02em;
  text-shadow: 0 1px 10px rgba(0,0,0,.55);
}
.hall-copy .hall-price {
  font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.25;
  color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.hall-copy .hall-meta {
  font-style: normal; color: #f0e6da; font-size: 14px; line-height: 1.3;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}

.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: start; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px;
  box-shadow: var(--shadow);
}
.features { margin: 0; padding: 0; list-style: none; }
.features li { padding: 10px 0; border-top: 1px solid var(--line); }
.features li:first-child { border-top: 0; }
.price { font-family: var(--serif); font-size: 34px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}
.gallery-col { display: grid; gap: 14px; }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; height: auto; aspect-ratio: 3 / 4;
  object-fit: cover; border-radius: 4px; display: block;
}
.gallery figcaption {
  color: var(--ink); font-size: 14px; line-height: 1.35;
  padding-top: 8px; max-width: 36ch;
}
.gallery figcaption:empty { display: none; }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.rules article h3 { font-size: 22px; margin-bottom: 6px; }
.rules p { margin: 0; color: #3c372f; }

.contacts { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: stretch; }
.contacts a { text-decoration: none; }
.socials { display: flex; gap: 14px; flex-wrap: wrap; }
.map-embed {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: #e8e2d8; min-height: 280px; box-shadow: var(--shadow);
}
.map-embed iframe { display: block; width: 100%; height: 320px; border: 0; }
.visit-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.weekbar, .legend, .sheet { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.legend i { display: inline-block; width: 16px; height: 16px; border: 1px solid var(--line); vertical-align: -3px; margin-right: 4px; }
.legend .free i { background: #fff; }
.legend .busy i { background: repeating-linear-gradient(-45deg, #fff, #fff 3px, #ddd 3px, #ddd 6px); }
.legend .sale i { box-shadow: inset 0 0 0 2px var(--accent); }
.grid-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.cal { border-collapse: separate; border-spacing: 0; min-width: 760px; width: 100%; }
.cal th, .cal td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; }
.cal th { font-weight: 500; font-size: 13px; padding: 8px 4px; position: sticky; top: 0; background: #fff; }
.cal td.time { color: var(--muted); font-size: 12px; width: 64px; position: sticky; left: 0; background: #fff; }
.slot { height: 38px; cursor: pointer; background: #fff; position: relative; }
.slot.busy { background: repeating-linear-gradient(-45deg, #fafafa, #fafafa 4px, var(--hatch) 4px, var(--hatch) 8px); cursor: not-allowed; }
.slot.past { background: #f3f1ee; cursor: not-allowed; }
.slot.sale::after { content: "−" attr(data-off) "%"; position: absolute; top: 3px; right: 4px; color: var(--accent); font-size: 10px; }
.slot.on { background: var(--ink); }

.hall-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 18px; }
button.hall-pick, .hall-pick {
  position: relative; width: 100%; min-height: 200px; border: 0; border-radius: 16px; overflow: hidden;
  background: #222 center/cover no-repeat; color: #fff !important; cursor: pointer; text-align: left;
  padding: 0 !important; display: block; appearance: none; -webkit-appearance: none;
  box-shadow: none; font: inherit;
}
button.hall-pick.btn, button.hall-pick.ghost {
  background-size: cover !important; background-position: center !important;
  border-radius: 16px !important; padding: 0 !important; color: #fff !important;
}
.hall-pick::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.08) 30%, rgba(0,0,0,0.8));
}
.hall-pick .hall-copy {
  position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 12px;
  display: grid; gap: 4px; padding: 12px;
  background: rgba(0,0,0,0.55); border-radius: 12px;
}
.hall-pick strong {
  display: block; font-family: var(--serif); font-size: 26px; font-weight: 500;
  line-height: 1.1; color: #fff;
}
.hall-pick .hall-price { display: block; font-size: 15px; font-weight: 600; color: #fff; line-height: 1.25; }
.hall-pick .hall-meta { display: block; font-style: normal; color: #f0e6da; font-size: 13px; line-height: 1.3; }
.hall-pick.is-on { box-shadow: 0 0 0 3px var(--ink); }

.day-strip {
  display: grid; grid-template-columns: repeat(7, minmax(52px, 1fr)); gap: 6px;
  padding: 10px; overflow-x: auto;
}
.day-chip {
  min-height: 72px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  display: grid; gap: 2px; place-content: center; cursor: pointer; padding: 8px 4px;
}
.day-chip span { font-size: 12px; color: var(--muted); text-transform: lowercase; }
.day-chip strong { font-size: 18px; }
.day-chip em { font-style: normal; font-size: 11px; color: var(--muted); }
.day-chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.day-chip.is-on span, .day-chip.is-on em { color: #d8d0c6; }

.hour-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 10px 14px;
}
.hour {
  min-height: 56px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  display: grid; gap: 2px; place-content: center; cursor: pointer; padding: 10px 8px; text-align: center;
}
.hour strong { font-size: 15px; font-weight: 600; }
.hour span { font-size: 12px; color: var(--muted); }
.hour.free { background: #fff; color: var(--ink); }
.hour.busy, .hour.past {
  background: #f1eee9; color: #9a9187; cursor: not-allowed; border-style: dashed;
}
.hour.sale { box-shadow: inset 0 0 0 1.5px var(--accent); }
.hour.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.hour.on span { color: #d8d0c6; }

.sheet {
  position: sticky; bottom: 12px; margin-top: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px;
  justify-content: space-between; box-shadow: var(--shadow); z-index: 5;
}
#price { display: grid; gap: 2px; }
#price strong { font-family: var(--serif); font-size: 24px; font-weight: 500; }
#price span { color: var(--muted); font-size: 13px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: grid; gap: 6px; font-size: 14px; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 90px; resize: vertical; }
.full { grid-column: 1 / -1; }
.note { color: var(--muted); font-size: 14px; }
.error { color: var(--accent); }
.ok { color: var(--ok); }
.stepper {
  display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; background: #fff; width: fit-content;
}
.stepper button {
  width: 44px; height: 44px; border: 0; background: #f7f4ef; cursor: pointer; font-size: 20px;
}
.stepper strong { min-width: 36px; text-align: center; }
.stepper input { display: none; }

table.data { width: 100%; border-collapse: collapse; background: #fff; }
table.data th, table.data td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px; vertical-align: top; font-size: 14px; }
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 20px; }
.admin-nav a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: #fff; }
.login {
  max-width: 420px; margin: 12vh auto; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 24px;
}

@media (max-width: 800px) {
  .nav a:not(.btn) { display: none; }
  .halls, .split, .rules, .form-grid, .contacts, .hall-picker { grid-template-columns: 1fr; display: grid; }
  .map-embed iframe { height: 260px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img { aspect-ratio: 4 / 3; }
  .hero-frame { min-height: 100svh; }
  .hall { min-height: 320px; }
  .hall-pick { min-height: 220px; }
  .grid-scroll { border: 0; background: transparent; }
  .week-view { display: none; }
  .legend { display: none; }
}
@media (min-width: 801px) {
  .day-view { display: none; }
}

#people-hint:not(:empty) { color: var(--accent); }
#phone { letter-spacing: 0.02em; }

.bookings-table { min-width: 760px; }
.bookings-table th, .bookings-table td { vertical-align: top; }
.bookings-table .col-when { width: 18%; white-space: nowrap; }
.bookings-table .col-who { width: 24%; }
.bookings-table .col-sum { width: 14%; white-space: nowrap; }
.bookings-table .col-status, .bookings-table .col-pay { width: 18%; }
.inline-form { margin: 0; display: block; }
.inline-form select {
  width: 100%; max-width: 180px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; font-size: 14px;
}
.inline-form select.is-paid { border-color: var(--ok); color: var(--ok); }
.inline-form select.is-unpaid { border-color: #c4b8a8; }

.client-list { display: grid; gap: 8px; }
.client-item {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.client-summary {
  list-style: none; cursor: pointer; display: grid;
  grid-template-columns: 1.2fr 1.1fr repeat(3, minmax(70px, auto));
  gap: 10px; align-items: center; padding: 12px 14px;
}
.client-summary::-webkit-details-marker { display: none; }
.client-summary__name { font-weight: 600; }
.client-summary__phone, .client-summary__meta { color: var(--muted); font-size: 14px; }
.client-card { border-top: 1px solid var(--line); padding: 14px 16px 18px; background: #faf8f5; }
.client-card__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.client-item[open] .client-summary { background: #f3efe8; }
tr.is-exhausted td { opacity: 0.7; }
@media (max-width: 800px) {
  .client-summary { grid-template-columns: 1fr 1fr; }
  .client-card__grid { grid-template-columns: 1fr; }
}

.pay-qr{display:flex;justify-content:center;margin:16px 0;min-height:240px}
.pay-qr img{border-radius:12px;background:#fff;padding:10px;border:1px solid var(--line)}
