: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;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; height: auto; }
button, a.btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
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: transparent;
  border-bottom: 1px solid transparent;
}
.top::before {
  content: "";
  position: absolute; z-index: -1;
  top: 0; bottom: 0; left: 50%;
  width: 100vw; margin-left: -50vw;
  background: rgba(247, 244, 239, 0.94);
  backdrop-filter: blur(10px);
}
.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: 0;
}
.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: #e4ddd4; }
.legend .sale i { background: #fff; box-shadow: inset 0 0 0 2px var(--ok); }
.grid-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.week-hint { margin: 0 0 10px; }
.cal { border-collapse: separate; border-spacing: 0; min-width: 760px; width: 100%; table-layout: fixed; }
.cal th:first-child { width: 72px; }
.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: 12px; padding: 6px 4px; position: sticky; top: 0; background: #fff; vertical-align: bottom; }
.cal th span { display: block; color: var(--muted); font-size: 11px; font-weight: 500; text-transform: lowercase; }
.cal th strong { display: block; font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1; }
.cal th em { display: block; font-style: normal; font-size: 11px; color: var(--accent); margin-top: 2px; }
.cal th.is-today { background: #fff; box-shadow: inset 0 -2px 0 var(--ink); }
.cal td.time { color: var(--ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; width: 64px; position: sticky; left: 0; background: #fff; }
.cal td.slot-cell { padding: 3px; height: 44px; background: #fff; }
.slot {
  width: 100%; height: 100%; min-height: 36px; border: 0; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  padding: 2px 4px; cursor: pointer; background: #fff; color: var(--ink);
  appearance: none; -webkit-appearance: none;
}
.slot .hh { font-size: 14px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.slot .pp { font-size: 14px; font-weight: 600; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; }
.slot .st { font-size: 12px; font-weight: 600; color: #7a7268; letter-spacing: 0.01em; }
.slot.sale .pp { color: var(--ok); }
.slot.free:hover { background: #f7f4ef; }
.slot:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.slot.busy { background: #e4ddd4; cursor: not-allowed; }
.slot.past { background: #f4f1ec; cursor: not-allowed; }
.slot.on { background: var(--ink); color: #fff; }
.slot.on .pp, .slot-len { color: #efeae4; }
.slot.span { border-radius: 8px; }
.slot-sum { font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1; color: #fff; }
.slot-len { font-size: 12px; line-height: 1.1; }
.slot.early { box-shadow: inset 0 0 0 1.5px #8a5a12; }

.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: 168px; 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.02) 42%, rgba(0,0,0,0.42));
}
.hall-pick .hall-copy {
  position: absolute; z-index: 1; left: 12px; right: 12px; bottom: 10px;
  display: grid; gap: 1px; padding: 8px 10px;
  background: rgba(0,0,0,0.28); border-radius: 10px;
}
.hall-pick strong {
  display: block; font-family: var(--serif); font-size: 22px; font-weight: 500;
  line-height: 1.05; 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; -webkit-overflow-scrolling: touch;
}
.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: 16px; }
.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; letter-spacing: -0.02em; }
.hour span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hour.free span { color: var(--ink); }
.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(--ok); }
.hour.sale span { color: var(--ok); }
.hour.early { box-shadow: inset 0 0 0 1.5px #8a5a12; }
.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: 12px 14px;
  font-size: 16px; /* iOS: no auto-zoom */
}
textarea { min-height: 90px; resize: vertical; }
.full { grid-column: 1 / -1; }
.note { color: var(--muted); font-size: 14px; }
.pay-track { max-width: 280px; margin-top: 6px; }
.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 8px; }
.admin-nav a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; background: #fff; }
.admin-nav a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.settings-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.settings-list a.panel { display: block; text-decoration: none; color: inherit; }
.settings-list a.panel h3 { margin: 0 0 6px; }
.settings-list a.panel:hover { border-color: var(--ink); }
.k28-version { margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.k28-version__label {
  appearance: none; border: 0; background: transparent; color: inherit; font: inherit;
  padding: 0; cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px;
}
.k28-version__label:hover, .k28-version__label:focus-visible { color: var(--ink); }
.login .k28-version { margin: 16px 0 0; text-align: center; }
.k28-changelog[hidden] { display: none !important; }
.k28-changelog { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.k28-changelog__backdrop { position: absolute; inset: 0; background: rgba(28, 25, 22, 0.45); }
.k28-changelog__panel {
  position: relative; z-index: 1; width: min(560px, 100%); max-height: min(80vh, 720px);
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: var(--shadow);
}
.k28-changelog__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.k28-changelog__header h2 { font-size: 28px; }
.k28-changelog__close {
  appearance: none; border: 0; background: transparent; color: var(--muted); font-size: 28px;
  line-height: 1; width: 36px; height: 36px; border-radius: 8px; cursor: pointer;
}
.k28-changelog__close:hover { color: var(--ink); background: var(--hatch); }
.k28-changelog__body { overflow: auto; padding: 4px 16px 18px; }
.k28-changelog__entry { padding: 14px 0; border-bottom: 1px solid var(--line); }
.k28-changelog__entry:last-child { border-bottom: 0; }
.k28-changelog__entry-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 10px; margin-bottom: 8px; }
.k28-changelog__ver { font-weight: 650; color: var(--accent); }
.k28-changelog__date { margin-left: auto; color: var(--muted); font-size: 13px; }
.k28-changelog__list { margin: 0; padding-left: 1.15em; color: var(--muted); font-size: 15px; }
.k28-changelog__list li + li { margin-top: 4px; }
body.k28-changelog-open { overflow: hidden; }
.login {
  max-width: 420px; margin: 12vh auto; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; padding: 24px;
}

@media (max-width: 800px) {
  .wrap { width: min(100%, calc(100% - 20px)); }
  .top {
    padding: 10px 0;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    gap: 10px;
  }
  .brand img { width: 36px; height: 36px; }
  .nav a:not(.btn) { display: none; }
  .nav .btn { padding: 10px 14px; font-size: 14px; min-height: 44px; }
  .section { padding: 36px 0; }
  .section h2 { font-size: clamp(28px, 8vw, 40px); }
  .halls, .split, .rules, .form-grid, .contacts, .hall-picker { grid-template-columns: 1fr; display: grid; }
  .map-embed iframe { height: 240px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img { aspect-ratio: 4 / 3; }
  .hero { padding: 8px 0 18px; }
  .hero-frame { min-height: min(100svh, 720px); border-radius: 16px; }
  .hero-copy { left: 16px; right: 16px; bottom: 16px; }
  .hero h1 { font-size: clamp(34px, 11vw, 52px); }
  .hero p { font-size: 16px; }
  .hall { min-height: 280px; border-radius: 16px; }
  .hall-pick { min-height: 148px; }
  .hall-pick strong { font-size: 24px; }
  .grid-scroll { border: 0; background: transparent; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #cal.grid-scroll { overflow: visible; }
  .week-view { display: none; }
  .legend { display: none; }
  .weekbar {
    position: sticky; top: calc(66px + env(safe-area-inset-top, 0px)); z-index: 8;
    background: rgba(247,244,239,0.94); backdrop-filter: blur(8px);
    padding: 8px 0; margin: 0 0 8px; justify-content: space-between;
  }
  .weekbar .btn.ghost { min-width: 44px; min-height: 44px; padding: 0; }
  #week-label { flex: 1; text-align: center; font-size: 15px; }
  .day-strip {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px;
    overflow: visible; padding: 4px 0 12px;
  }
  .day-chip {
    min-width: 0; min-height: 64px; padding: 6px 0; border-radius: 12px;
  }
  .day-chip span { font-size: 11px; }
  .day-chip strong { font-size: 15px; }
  .day-chip em { font-size: 10px; }
  .hour-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 0 12px; }
  .hour { min-height: 64px; border-radius: 16px; padding: 12px 10px; }
  .hour strong { font-size: 15px; }
  .sheet {
    position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    flex-direction: column; align-items: stretch; gap: 8px;
    padding: 14px; border-radius: 18px;
  }
  #price strong { font-size: 28px; }
  .panel { padding: 16px; border-radius: 16px; }
  .stepper button { width: 48px; height: 48px; }
  .btn, button.btn, a.btn { min-height: 48px; padding: 12px 18px; width: 100%; justify-content: center; }
  .nav .btn { width: auto; }
  .weekbar .btn { width: auto; }
  .visit-actions .btn, .visit-actions a.btn { width: auto; flex: 1; }
  .pay-actions { display: grid !important; gap: 10px; }
  .pay-actions .btn { width: 100%; }
  .pay-qr img, .pay-qr svg { width: min(240px, 70vw); height: auto; }
  .social-current, .social-caret { min-width: 44px; min-height: 44px; justify-content: center; }
  .legal-links a, .legal-links button { padding: 10px 0; }
  .mobile-dock {
    display: flex; position: fixed; left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 30; gap: 8px;
  }
  .mobile-dock .btn { box-shadow: var(--shadow); }
  body.has-dock { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .admin-nav a { min-height: 40px; display: inline-flex; align-items: center; }
  .bookings-table { min-width: 640px; }
}
@media (min-width: 801px) {
  .day-view { display: none; }
  .mobile-dock { display: none !important; }
}
@media (max-width: 420px) {
  .hour-grid { grid-template-columns: 1fr; }
  .day-chip { flex-basis: 58px; }
}

#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}
.pay-qr:empty{display:none}
.pay-qr img,.pay-qr svg{width:240px;height:240px;border-radius:12px;background:#fff;padding:10px;border:1px solid var(--line)}
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.book-ticket { max-width: 520px; margin-left: auto; margin-right: auto; }
.book-ticket h2 { font-size: clamp(32px, 5vw, 44px); margin: 0 0 8px; }
.book-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.book-facts { display: grid; gap: 0; margin: 8px 0 18px; }
.book-facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.book-facts dt { color: var(--muted); }
.book-facts dd { margin: 0; text-align: right; }
.book-status {
  display: inline-flex;
  align-items: center;
  margin: 0 0 4px;
  border-radius: 999px;
  padding: 6px 12px;
  background: #e7f3ec;
  color: var(--ok);
  font-weight: 650;
}
.book-status.is-wait { background: var(--hatch); color: var(--ink); }
.book-status.is-bad { background: #f8ece9; color: var(--accent); }
.book-place { margin-top: 14px; }

/* —— Admin statistics —— */
.stats-page { margin-bottom: 48px; }

.stats-hero {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.stats-hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.stats-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stats-title {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.stats-today {
  flex-shrink: 0;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.stats-today:hover { color: var(--ink); border-color: var(--ink); }

.period-seg-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.period-seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.period-seg:hover { color: var(--ink); border-color: #cfc6ba; }
.period-seg.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.period-shift {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.period-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  text-decoration: none;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}
.period-arrow:hover { background: var(--hatch); }
.period-range {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 18ch;
  text-align: center;
}

.stats-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stats-kpi__card {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(40, 28, 16, 0.04);
  transition: border-color .15s ease, transform .15s ease;
}
.stats-kpi__card:hover { border-color: #cfc6ba; transform: translateY(-1px); }
.stats-kpi__card--accent {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.stats-kpi__card--accent .stats-kpi__label { color: rgba(255,255,255,0.65); }
.stats-kpi__label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.stats-kpi__value {
  display: block;
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stats-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 6px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.stats-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
}
.stats-block__head h3 {
  font-size: 18px;
}
.stats-empty { padding: 8px 16px 16px; }

.stat-list { display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.stat-row {
  border-radius: 14px;
  background: #fff;
  border: 1px solid transparent;
  overflow: hidden;
}
.stat-row[open] {
  border-color: var(--line);
  background: #fff;
}
.stat-row > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto auto 28px;
  gap: 10px 14px;
  align-items: center;
  padding: 14px 16px;
}
.stat-row > summary::-webkit-details-marker { display: none; }
.stat-row > summary::marker { content: ""; }
.stat-row__main { min-width: 0; display: grid; gap: 2px; }
.stat-row__label { font-size: 15px; font-weight: 600; }
.stat-row__hint {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-row__value {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stat-row--accent .stat-row__value { color: var(--accent); }
.stat-row__meta {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.stat-row__chev {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  position: relative;
}
.stat-row__chev::before {
  content: "";
  position: absolute;
  top: 10px; left: 9px;
  width: 7px; height: 7px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: rotate(45deg);
  transition: transform .15s ease;
}
.stat-row[open] .stat-row__chev::before {
  top: 12px;
  transform: rotate(225deg);
}
.stat-row__body {
  padding: 0 12px 14px;
  border-top: 1px solid var(--line);
  background: #faf8f5;
}
.stat-row__body .grid-scroll {
  margin-top: 12px;
  border-radius: 12px;
}

.stats-bottom {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: start;
}
.stats-promo-table { margin: 4px 8px 12px; }

@media (max-width: 900px) {
  .stats-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stats-hero__top { flex-direction: column; }
  .period-seg { flex: 1 1 calc(33.33% - 10px); min-width: 0; }
  .stat-row > summary {
    grid-template-columns: minmax(0, 1fr) auto 28px;
  }
  .stat-row__meta { display: none; }
  .stat-row__hint { white-space: normal; }
}

.stats-kpi__card { text-decoration: none; color: inherit; display: block; position: relative; }
.stats-kpi__go {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.stats-kpi__card--accent .stats-kpi__go { color: rgba(255,255,255,0.65); }
.stats-booking-link { text-decoration: none; color: inherit; display: block; }
.stats-booking-row:hover { background: #f3efe8; }
.stats-booking-go { white-space: nowrap; vertical-align: middle; }
.stats-booking-go .btn { padding: 6px 10px; font-size: 13px; }
.stat-row__actions { margin: 10px 0 0; }
.stat-row__open { font-size: 13px; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.stat-row__open:hover { color: var(--ink); border-color: var(--ink); }
.bookings-filter {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.bookings-filter .note { margin: 4px 0 0; }
.booking-row.is-focus td {
  background: #fff4e8;
  box-shadow: inset 3px 0 0 var(--accent);
}

.hall-photos { margin: 12px 0 20px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #faf8f5; }
.hall-photos__head h4 { margin: 0 0 4px; font-size: 16px; }
.hall-photos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 12px 0; }
.hall-photo { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.hall-photo.is-cover { box-shadow: inset 0 0 0 2px var(--ink); }
.hall-photo__preview { aspect-ratio: 4/3; background: #ddd center/cover no-repeat; }
.hall-photo__meta { padding: 8px 10px 0; display: grid; gap: 2px; }
.hall-photo__meta span { font-size: 13px; font-weight: 600; }
.hall-photo__meta code { font-size: 11px; color: var(--muted); word-break: break-all; }
.hall-photo__actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 10px; }
.hall-photo__actions .btn { padding: 6px 10px; font-size: 13px; }
.hall-photo__actions button:disabled { opacity: 0.35; cursor: not-allowed; }
.hall-photos__upload { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hall-photos__file { display: inline-flex; align-items: center; gap: 8px; border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; background: #fff; cursor: pointer; }
.hall-photos__file input { max-width: 220px; }

.btn.danger, button.danger { color: var(--accent); border-color: #e2c4bd; }
.btn.danger:hover, button.danger:hover { background: #fff4f1; }
.col-actions { white-space: nowrap; }
.col-actions .inline-form { display: inline-block; margin: 0 0 4px; }

.site-foot { border-top: 1px solid var(--line); padding-top: 28px; text-align: center; }
.site-foot p { margin: 0 0 8px; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
[hidden] { display: none !important; }
.legal-links a, .legal-links button {
  background: none; border: 0; padding: 0; color: inherit; cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 3px;
}
.prose { max-width: 760px; }
.prose h3 { font-size: 26px; margin: 28px 0 10px; }
.prose p, .prose li { font-size: 16px; }
.prose ul { margin: 8px 0 16px; padding-left: 18px; }
.prose table.req { width: 100%; border-collapse: collapse; background: #fff; margin: 12px 0 8px; }
.prose table.req th, .prose table.req td {
  border-bottom: 1px solid var(--line); text-align: left; vertical-align: top;
  padding: 10px 12px; font-size: 15px;
}
.prose table.req th { width: 38%; color: var(--muted); font-weight: 500; }

.k28-cc { position: fixed; z-index: 40; right: 16px; bottom: 16px; width: min(420px, calc(100% - 24px)); }
.k28-cc[hidden] { display: none; }
.k28-cc__card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: 18px 18px 16px;
}
.k28-cc__card h2 { font-size: 28px; margin-bottom: 8px; }
.k28-cc__card p { margin: 0 0 12px; font-size: 15px; }
.k28-cc__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.k28-cc__text {
  background: none; border: 0; padding: 8px 0; cursor: pointer; font: inherit;
  text-decoration: underline; text-underline-offset: 3px;
}
.k28-cc__cats { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; }
.k28-cc__cats li { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.k28-cc__cats span { display: block; color: var(--muted); font-size: 13px; }
.k28-cc__switch { position: relative; width: 44px; height: 26px; flex: none; }
.k28-cc__switch input { opacity: 0; width: 0; height: 0; }
.k28-cc__switch span {
  position: absolute; inset: 0; background: #ddd; border-radius: 999px; cursor: pointer;
}
.k28-cc__switch span::after {
  content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
}
.k28-cc__switch input:checked + span { background: var(--ink); }
.k28-cc__switch input:checked + span::after { transform: translateX(18px); }
.k28-cc__switch input:disabled + span { opacity: 0.7; cursor: default; }

.social-field { position: relative; }
.social-box {
  position: relative; display: flex; align-items: center; gap: 4px;
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 4px 8px 4px 6px;
  min-height: 48px;
}
.social-box:focus-within { border-color: var(--ink); }
.social-box input {
  border: 0; background: transparent; padding: 8px 4px; width: auto; flex: 1; min-width: 0; border-radius: 0;
}
.social-current, .social-caret {
  border: 0; background: transparent; padding: 0; cursor: pointer; display: flex; align-items: center; color: var(--muted);
}
.social-caret { width: 28px; justify-content: center; font-size: 14px; }
.social-menu {
  position: absolute; z-index: 6; left: 0; right: 0; top: calc(100% - 2px);
  margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
}
.social-menu.is-up { top: auto; bottom: calc(100% - 2px); }
.social-menu button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 0; background: transparent; border-radius: 10px; padding: 8px; cursor: pointer; text-align: left;
}
.social-menu button[aria-selected="true"], .social-menu button:hover { background: var(--hatch); }
.social-menu svg, .social-current svg { display: block; flex: none; }
@media (max-width: 800px) {
  body.has-dock .k28-cc { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .prose table.req th { width: 42%; }
  .legal-links a, .legal-links button { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 4px; }
  .social-caret { width: 44px; min-height: 44px; }
}

.st-created { --st-bg: #d5f2fc; --st-fg: #0f4c66; }
.st-confirmed { --st-bg: #f6e7a8; --st-fg: #6a4b00; }
.st-no_answer { --st-bg: #f7c9c0; --st-fg: #8d3328; }
.st-noshow { --st-bg: #eceae6; --st-fg: #5e5852; }
.st-cancelled { --st-bg: #eee8f3; --st-fg: #6a6470; }
.st-done { --st-bg: #d7f5c8; --st-fg: #1e6b34; }
.st-blocked { --st-bg: #e6e1d8; --st-fg: #3f3a34; }
.st {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 4px 10px; background: var(--st-bg); color: var(--st-fg);
  font-size: 13px; font-weight: 650; line-height: 1.2;
}
.cal-page { margin-bottom: 48px; max-width: 100%; min-width: 0; }
.cal-key { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.cal-board {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: auto;
  max-width: 100%;
}
.cal-day__grid {
  --hour: 52px;
  display: grid;
  grid-template-columns: 58px repeat(var(--halls), minmax(120px, 1fr));
  min-width: 0;
}
.cal-day__corner, .cal-day__hall {
  position: sticky; top: 0; z-index: 3; background: #fff;
  border-bottom: 1px solid var(--line); padding: 10px 8px; font-weight: 600;
}
.cal-times { grid-column: 1; grid-row: 2; }
.cal-day__scroll { max-height: 68vh; overflow: auto; }
.cal-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cal-hero-actions .btn { min-height: 36px; }
.cal-new { margin: 0 0 16px; }
.cal-new h2 { font-size: 26px; }
.cal-new__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-slot {
  position: absolute; left: 3px; right: 3px; z-index: 0;
  border-radius: 10px;
}
.cal-edit { grid-column: 1 / -1; margin-top: 8px; }
.cal-edit summary { cursor: pointer; font-weight: 650; }
.cal-edit form { margin-top: 10px; }
.client-search { display: block; max-width: 420px; margin: 0 0 14px; }
.client-legacy { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.client-legacy h3 { font-size: 18px; margin-bottom: 6px; }
.client-legacy a { margin-right: 8px; }
.cal-day__sum { margin: 0 0 10px; }
.cal-times div {
  height: var(--hour); padding: 2px 8px 0; color: var(--muted); font-size: 12px;
}
.cal-col {
  grid-row: 2; position: relative; height: calc(var(--hours) * var(--hour));
  border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--hour) - 1px),
    var(--line) calc(var(--hour) - 1px),
    var(--line) var(--hour)
  );
}
.cal-event, .cal-chip {
  background: var(--st-bg); color: var(--st-fg); text-decoration: none;
}
.cal-event.hall-big, .cal-chip.hall-big, .hall-swatch.hall-big {
  --hall-bg: #d5e8f8; --hall-fg: #0f4c66;
}
.cal-event.hall-small, .cal-chip.hall-small, .hall-swatch.hall-small {
  --hall-bg: #f6e7a8; --hall-fg: #6a4b00;
}
.cal-event.hall-big, .cal-chip.hall-big,
.cal-event.hall-small, .cal-chip.hall-small,
.hall-swatch.hall-big, .hall-swatch.hall-small {
  background: var(--hall-bg); color: var(--hall-fg);
}
.cal-day__hall.hall-big { box-shadow: inset 0 -3px 0 #7eb6dd; }
.cal-day__hall.hall-small { box-shadow: inset 0 -3px 0 #e4c56a; }
.cal-card.hall-big { border-left: 4px solid #7eb6dd; }
.cal-card.hall-small { border-left: 4px solid #e4c56a; }
.cal-event.st-cancelled, .cal-chip.st-cancelled,
.cal-event.st-blocked, .cal-chip.st-blocked,
.cal-event.st-noshow, .cal-chip.st-noshow,
.cal-event.st-no_answer, .cal-chip.st-no_answer {
  background: var(--st-bg); color: var(--st-fg);
}
.cal-event {
  position: absolute; z-index: 1; overflow: hidden; padding: 4px 6px;
  border-radius: 10px; font-size: 12px; line-height: 1.25;
}
.cal-event strong, .cal-event span { display: block; }
.cal-event.is-focus, .cal-chip.is-focus { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-now {
  position: absolute; left: 0; right: 0; height: 0; z-index: 2;
  border-top: 2px solid var(--accent); pointer-events: none;
}
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(108px, 1fr)); min-width: 756px; }
.cal-week__day { min-height: 280px; padding: 8px; border-left: 1px solid var(--line); }
.cal-week__day:first-child { border-left: 0; }
.cal-week__date { display: flex; flex-direction: column; text-decoration: none; margin-bottom: 8px; }
.cal-week__date span { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.cal-week__date strong { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.cal-week__day.is-today .cal-week__date strong { color: var(--accent); }
.cal-chip {
  display: block; margin: 0 0 6px; padding: 6px 8px; border-radius: 10px;
  font-size: 13px; line-height: 1.3;
}
.cal-chip span { color: inherit; opacity: 0.8; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-width: 640px; }
.cal-month__dow { padding: 8px; color: var(--muted); font-size: 12px; text-align: center; }
.cal-cell { min-height: 112px; border-top: 1px solid var(--line); padding: 6px; display: grid; align-content: start; gap: 4px; }
.cal-cell.is-out { background: #faf8f5; }
.cal-cell__n { text-decoration: none; font-weight: 600; width: fit-content; }
.cal-cell.is-today .cal-cell__n {
  display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--ink); color: #fff;
}
.cal-more { color: var(--muted); font-size: 12px; text-decoration: none; }
.cal-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; padding: 16px; }
.cal-year__month > a { display: block; margin-bottom: 8px; font-family: var(--serif); font-size: 20px; text-decoration: none; }
.cal-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-mini a, .cal-mini span, .cal-mini__dow {
  text-align: center; font-size: 12px; text-decoration: none; min-height: 22px; line-height: 22px;
}
.cal-mini__dow { color: var(--muted); }
.cal-mini a.has-book { background: #f6e7a8; border-radius: 6px; font-weight: 650; }
.cal-mini a.is-today { outline: 1px solid var(--ink); border-radius: 6px; }
.cal-daylist { margin-top: 22px; }
.cal-daylist h2 { margin-bottom: 12px; }
.cal-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 10px;
}
.cal-card.is-focus { box-shadow: inset 3px 0 0 var(--accent); }
.cal-card h3 { font-size: 22px; margin: 6px 0; }
.cal-card__when { margin: 0 0 4px; }
.cal-card__side { display: grid; align-content: start; gap: 8px; }
.cal-card__side > strong { font-family: var(--serif); font-size: 28px; font-weight: 500; }
.cal-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-card .inline-form select { max-width: none; }
.cal-legend, .cal-block { margin-top: 16px; }
.cal-legend summary, .cal-block summary { cursor: pointer; font-weight: 650; }
.cal-legend__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding-top: 12px; }
.cal-legend h3 { font-size: 16px; margin-bottom: 8px; }
.cal-legend p { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; }
.cal-legend i.st { width: 16px; height: 16px; padding: 0; border-radius: 5px; flex: none; margin-top: 3px; }
@media (max-width: 800px) {
  .cal-page .btn, .cal-page a.btn, .cal-page button.btn { width: auto; min-height: 40px; }
  .cal-card { grid-template-columns: 1fr; }
  .cal-card__actions .btn { width: auto; }
}
.price-rule { margin: 0 0 12px; }
.price-rule__grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 12px; }
.price-rule__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.day-checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.day-check {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: #fff;
}
.checkline { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.client-field { position: relative; z-index: 5; }
.client-field:focus-within { z-index: 40; }
.client-suggest {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% - 4px);
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  max-height: 240px; overflow: auto;
}
.client-suggest button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 8px 12px; cursor: pointer;
}
.client-suggest button:last-child { border-bottom: 0; }
.client-suggest button:hover { background: var(--hatch); }
.client-suggest span { color: var(--muted); font-size: 13px; }
@media (max-width: 800px) {
  .price-rule__grid { grid-template-columns: 1fr 1fr; }
}
