/* Общая основа новых вариантов: раскладка и компоненты.
   Цвета, шрифты, радиусы и «характер» — в темах night.css / nordic.css / bright.css. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 6px 0; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.15; letter-spacing: var(--title-track, -0.01em); }
h2 { font-size: 21px; font-weight: var(--title-weight, 700); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.grow { flex: 1; min-width: 0; }

.app { max-width: 600px; margin: 0 auto; padding: 0 16px 40px; }
.app.has-nav { padding-bottom: 110px; }
.loading { color: var(--muted); text-align: center; padding: 48px 0; }

/* ---------- иконки ---------- */
.ic { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic.tiny { width: 13px; height: 13px; }

/* ---------- демо-плашка и переключатель вариантов ---------- */
.demo-strip {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px;
  padding: 7px 12px; font-size: 12.5px;
  background: var(--strip-bg); color: var(--strip-ink);
}
.ui-switch { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--strip-pill); }
.ui-switch a { color: inherit; padding: 3px 10px; border-radius: 999px; font-weight: 600; opacity: .75; text-decoration: none; }
.ui-switch a.on { background: var(--strip-ink); color: var(--strip-bg); opacity: 1; }

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  margin: 0 -16px; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--top-bg);
  -webkit-backdrop-filter: saturate(160%) blur(var(--blur));
  backdrop-filter: saturate(160%) blur(var(--blur));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text span { font-size: 12.5px; color: var(--muted); }
.logo {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: var(--radius-sm); font-family: var(--font-display); font-weight: 700; font-size: 17px;
  background: var(--logo-bg); color: var(--logo-ink);
}
.logo.sm { width: 40px; height: 40px; font-size: 16px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--seg-bg); border: 1px solid var(--line); }
.seg button {
  border: 0; background: none; cursor: pointer; border-radius: 999px;
  padding: 7px 12px; min-height: 36px; font-size: 14px; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s, color .2s;
}
.seg button.on { background: var(--seg-on); color: var(--seg-on-ink); box-shadow: var(--shadow-sm); }
.seg.wide { display: flex; width: 100%; border-radius: var(--radius-sm); }
.seg.wide button { flex: 1; border-radius: calc(var(--radius-sm) - 3px); }
.seg.role { flex: none; }
.seg.role button { padding: 7px 10px; font-size: 13.5px; gap: 5px; }
.seg.role .ic { width: 16px; height: 16px; }
.brand { flex: 1; }
@media (max-width: 340px) { .seg.role button span:not(.badge):not(.ic) { display: none; } }

.badge {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; line-height: 1;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; cursor: pointer; border-radius: var(--radius-btn);
  padding: 10px 16px; min-height: 44px; font-size: 15px; font-weight: 650;
  transition: transform .12s ease, background .2s, box-shadow .2s, opacity .2s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--accent-grad, var(--accent)); color: var(--accent-ink); box-shadow: var(--shadow-accent); }
.btn.soft { background: var(--soft); color: var(--ink); border-color: var(--line); }
.btn.danger { color: var(--danger); }
.btn.primary.danger { color: var(--accent-ink); }
.btn.lg { min-height: 52px; padding: 12px 22px; font-size: 16px; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn.round { width: 52px; height: 52px; padding: 0; border-radius: 50%; font-size: 24px; background: var(--soft); border-color: var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.icon-btn {
  flex: none; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; border: 1px solid var(--line); background: var(--soft);
}
.icon-btn .ic { width: 20px; height: 20px; }
.link { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--accent); font-weight: 700; }

/* ---------- карточки и секции ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); color: inherit; text-align: left; width: 100%;
}
.list { display: grid; gap: 12px; }
.section { margin-top: 30px; scroll-margin-top: 76px; }
.section > h2 { margin-bottom: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 0 12px; }
.section .section-head:first-child { margin-top: 0; }
.count { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 2px 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted); }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.meta .ic { width: 15px; height: 15px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; background: var(--pill-bg); color: var(--pill-ink); border: 1px solid var(--pill-line, transparent);
}
.pill .ic { width: 15px; height: 15px; }
.hint-line { display: flex; gap: 8px; align-items: flex-start; }
.hint-line .ic { margin-top: 2px; width: 16px; height: 16px; color: var(--accent); }

/* ---------- главная гостя ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  margin: 16px 0 0; padding: 26px 20px 22px; border-radius: var(--radius-lg);
  background: var(--hero-bg); color: var(--hero-ink); border: 1px solid var(--hero-line, transparent);
  box-shadow: var(--shadow);
}
.hero-glow { position: absolute; inset: 0; z-index: -1; background: var(--hero-glow, none); pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hero-eyebrow); }
.eyebrow .ic { width: 15px; height: 15px; }
.hero-title { font-size: var(--hero-size, 36px); font-weight: var(--hero-weight, 800); letter-spacing: var(--hero-track, -0.02em); }
.hero-lead { margin: 10px 0 0; font-size: 16px; opacity: .86; max-width: 42ch; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; }
.hero .pill { background: var(--hero-pill); color: inherit; }

/* Фото бани */
.gallery { margin: 14px -16px 0; }
.gallery-track {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 16px 6px;
  scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item {
  flex: 0 0 78%; max-width: 420px; aspect-ratio: 4 / 3; padding: 0; border: 0; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden; background: var(--soft); scroll-snap-align: start;
  box-shadow: var(--shadow);
}
.gallery-item:only-child { flex-basis: 100%; max-width: none; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.03); }
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(10, 8, 6, .92); padding: 56px 12px 40px; animation: rise .2s both;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; user-select: none; }
.lightbox .icon-btn { position: absolute; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.lb-close { top: 12px; right: 12px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 10px; }
.lb-nav.next { right: 10px; }
.ic.flip { transform: scaleX(-1); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: 13px; font-weight: 700; }
body.no-scroll { overflow: hidden; }

.rooms { display: grid; gap: 14px; }
@media (min-width: 520px) { .rooms { grid-template-columns: 1fr 1fr; } }
.room-card {
  display: flex; flex-direction: column; padding: 0; overflow: hidden; cursor: pointer; text-align: left;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .2s, border-color .2s;
}
.enter .room-card { animation: rise .45s both; animation-delay: calc(var(--i, 0) * 60ms); }
.room-card:hover { transform: translateY(-2px); border-color: var(--accent-line, var(--accent)); box-shadow: var(--shadow-lg); }
.room-card:active { transform: scale(.985); }
.room-cover {
  position: relative; height: 112px; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 12px 14px; background: var(--cover-bg); color: var(--cover-ink);
}
.room-card:nth-child(4n+2) .room-cover { background: var(--cover-bg-2, var(--cover-bg)); }
.room-card:nth-child(4n+3) .room-cover { background: var(--cover-bg-3, var(--cover-bg)); }
.room-card:nth-child(4n+4) .room-cover { background: var(--cover-bg-4, var(--cover-bg)); }
.room-cover.has-photo { height: 160px; background: var(--soft); }
.room-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.room-card:hover .room-photo { transform: scale(1.04); }
.room-cover.has-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.25)); pointer-events: none; }
.room-cover.has-photo .room-price { position: relative; z-index: 1; margin-left: auto; }
.room-detail.has-photo { padding-top: 0; overflow: hidden; }
.room-detail-photo { display: block; width: calc(100% + 32px); margin: 0 -16px 4px; height: 180px; object-fit: cover; }
.room-mark { font-family: var(--font-display); font-size: 58px; font-weight: 800; line-height: .8; opacity: .95; letter-spacing: -0.04em; }
.room-price { font-weight: 750; font-size: 14px; padding: 6px 11px; border-radius: 999px; background: var(--price-bg); color: var(--price-ink); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.room-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.room-name { font-family: var(--font-display); font-size: 18px; }
.room-desc { margin: 0; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.room-cta { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; color: var(--accent); }
.room-cta .ic { transition: transform .2s; }
.room-card:hover .room-cta .ic { transform: translateX(3px); }

.facts { display: grid; gap: 12px; }
.about-text { margin: 0 0 4px; }
.fact { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.fact > .ic { margin-top: 1px; width: 20px; height: 20px; color: var(--accent); }

/* ---------- брони ---------- */
.booking { display: grid; gap: 10px; }
.booking-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.booking-head strong { font-size: 16px; }
.booking-when { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.booking-when .ic { color: var(--accent); }
.booking.compact { opacity: .7; padding: 12px 16px; }
.status-pill {
  flex: none; font-size: 12px; font-weight: 750; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--soft); color: var(--muted);
}
.status-pill.s-pending { background: var(--warn-soft); color: var(--warn); }
.status-pill.s-accepted { background: var(--accent-soft); color: var(--accent-strong, var(--accent)); }
.status-pill.s-confirmed { background: var(--ok-soft); color: var(--ok); }
.status-pill.s-rejected, .status-pill.s-cancelled { background: var(--danger-soft); color: var(--danger); }
.booking.s-pending { box-shadow: var(--shadow), inset 3px 0 0 var(--warn); }
.booking.s-accepted { box-shadow: var(--shadow), inset 3px 0 0 var(--accent); }
.booking.s-confirmed { box-shadow: var(--shadow), inset 3px 0 0 var(--ok); }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); overflow-wrap: anywhere; }
.note .ic { margin-top: 2px; width: 16px; height: 16px; color: var(--muted); }
.receipt { border-top: 1px dashed var(--line-strong, var(--line)); padding-top: 10px; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
.total { margin-top: 8px; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.total.big { font-size: 22px; font-family: var(--font-display); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions .btn { flex: 1 1 auto; }

/* ---------- мастер ---------- */
.wiz-top { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; }
.wiz-title { flex: 1; display: grid; gap: 8px; }
.wiz-title strong { font-family: var(--font-display); font-size: 18px; }
.progress { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--accent-grad, var(--accent)); transition: width .4s cubic-bezier(.2,.8,.2,1); }
.room-tabs { margin-bottom: 10px; }
.room-detail { display: grid; gap: 8px; }
.room-detail-head { display: flex; align-items: center; gap: 12px; }
.room-detail-head > div:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 3px; }
.price { font-weight: 750; color: var(--accent); white-space: nowrap; font-size: 15px; }
.tariffs-box summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--accent); list-style: none; padding: 4px 0; }
.tariffs-box summary::-webkit-details-marker { display: none; }
.tariffs-box summary::after { content: ' ▾'; }
.tariffs-box[open] summary::after { content: ' ▴'; }
.tariffs { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 14px; }
.tariffs td { padding: 7px 0; border-top: 1px solid var(--line); }
.tariffs .num { text-align: right; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }

.step { margin-top: 26px; scroll-margin-top: 80px; }
.step.enter, .enter .step { animation: rise .35s both; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.step-head h3 { font-size: 17px; font-weight: 700; }
.step-n {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%;
  font-size: 13.5px; font-weight: 800; background: var(--soft); color: var(--muted); border: 1px solid var(--line);
}
.step-n .ic { width: 15px; height: 15px; }
.step.done .step-n, .step.summary .step-n { background: var(--accent-grad, var(--accent)); color: var(--accent-ink); border-color: transparent; }

.chips { display: flex; gap: 8px; }
.chips.scroll { overflow-x: auto; margin: 0 -16px; padding: 2px 16px 10px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll > * { scroll-snap-align: start; }
.chip {
  flex: 0 0 auto; cursor: pointer; border: 1px solid var(--line); background: var(--chip-bg); color: var(--ink);
  border-radius: var(--radius-chip); padding: 10px 14px; min-height: 44px; font-size: 15px; font-weight: 600;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-variant-numeric: tabular-nums; transition: background .18s, border-color .18s, color .18s, transform .12s;
}
.chip:active:not(:disabled) { transform: scale(.96); }
.chip:hover:not(:disabled):not(.on) { border-color: var(--accent-line, var(--accent)); }
.chip.on { background: var(--accent-grad, var(--accent)); border-color: transparent; color: var(--accent-ink); box-shadow: var(--shadow-accent); }
.chip:disabled { opacity: .38; cursor: not-allowed; }
.chip small { font-size: 11.5px; font-weight: 600; opacity: .75; }
.chip .dow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.chip.date { min-width: 70px; padding: 10px 8px; }
.chip.date b { font-size: 20px; font-family: var(--font-display); line-height: 1.15; }
.chips.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
.chip.time { flex-direction: row; gap: 5px; }
.chip.night:not(.on) { color: var(--night); }
.chips.durs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.chip.dur { align-items: flex-start; padding: 12px 14px; }
.chip.dur b { font-size: 16px; }
.chips.closures { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
.chip.closed:not(.on) { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

.stepper { display: flex; align-items: center; gap: 22px; }
.stepper output { font-family: var(--font-display); font-size: 32px; font-weight: 800; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }

.extras { display: grid; gap: 10px; }
.extra {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer;
  padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s, background .2s;
}
.extra.on { border-color: var(--accent-line, var(--accent)); background: var(--accent-soft); }
.extra-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.extra-text small { color: var(--muted); font-size: 13px; }
.switch {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 48px; height: 28px; border-radius: 999px; background: var(--switch-off); position: relative; transition: background .2s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }

.receipt-card { display: grid; gap: 10px; }
.policy { display: grid; gap: 4px; margin-top: 12px; }
.field { display: grid; gap: 6px; margin: 14px 0 6px; font-weight: 700; font-size: 14px; }
.field textarea {
  font: inherit; font-weight: 400; font-size: 15px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; resize: vertical; min-height: 72px;
}

.with-bar { padding-bottom: 110px; }
.bar {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 576px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 18px; border-radius: var(--radius-lg);
  background: var(--bar-bg); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: saturate(160%) blur(var(--blur)); backdrop-filter: saturate(160%) blur(var(--blur));
}
.bar.enter, .enter .bar { animation: rise .3s both; }
.bar-sum { display: grid; line-height: 1.2; }
.bar-sum small { font-size: 12px; color: var(--muted); font-weight: 600; }
.bar-sum b { font-size: 19px; font-family: var(--font-display); font-variant-numeric: tabular-nums; }

/* ---------- готово ---------- */
.done-page { padding-top: 10px; display: grid; gap: 14px; }
.done { text-align: center; padding: 24px 0 6px; }
.done h2 { font-size: 26px; margin-top: 14px; }
.done-mark {
  width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: var(--ok); color: #fff; box-shadow: 0 0 0 10px var(--ok-soft);
  animation: pop .5s cubic-bezier(.2,1.4,.4,1) both;
}
.done-mark .ic { width: 38px; height: 38px; }
.done-mark svg { stroke-width: 2.6; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .45s .25s forwards; }
.hint { display: grid; gap: 10px; background: var(--accent-soft); border-color: var(--accent-line, transparent); }
.hint-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--surface); color: var(--accent); }

/* ---------- владелец ---------- */
.owner-head { margin: 20px 0 14px; }
.owner-head h1 { font-size: 28px; font-weight: var(--hero-weight, 800); }
.owner .seg.wide { margin-bottom: 14px; }
.day-label { font-weight: 700; margin: 4px 0 10px; }
.row-card { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.row-card > .ic { color: var(--muted); }
.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 28px 18px; }
.empty-mark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); margin-bottom: 4px; }
.empty-mark .ic { width: 24px; height: 24px; }
.empty-page { text-align: center; padding: 60px 0; display: grid; gap: 10px; justify-items: center; }
.link-card { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--ink); }

.owner-nav {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 576px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px; border-radius: var(--radius-lg);
  background: var(--bar-bg); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: saturate(160%) blur(var(--blur)); backdrop-filter: saturate(160%) blur(var(--blur));
}
.nav-item {
  border: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 3px;
  padding: 7px 2px 5px; border-radius: calc(var(--radius-lg) - 6px); color: var(--muted); font-size: 11px; font-weight: 700;
  transition: color .2s, background .2s;
}
.nav-item.on { color: var(--accent); background: var(--nav-on, transparent); }
.nav-ic { position: relative; display: grid; place-items: center; }
.nav-ic .ic { width: 22px; height: 22px; }
.badge.dot { position: absolute; top: -6px; right: -12px; min-width: 17px; height: 17px; font-size: 10px; box-shadow: 0 0 0 2px var(--bar-solid, var(--surface)); }
.nav-item.fab .nav-ic {
  width: 46px; height: 46px; margin-top: -22px; border-radius: 50%;
  background: var(--accent-grad, var(--accent)); color: var(--accent-ink); box-shadow: var(--shadow-accent);
}
.nav-item.fab.on { background: none; }

/* ---------- шахматка ---------- */
.sched-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.sched { border-collapse: separate; border-spacing: 3px; font-size: 12px; font-variant-numeric: tabular-nums; }
.sched th { font-weight: 700; color: var(--muted); padding: 5px 0; min-width: 32px; text-align: center; }
.sched .room-col {
  position: sticky; left: 0; z-index: 1; background: var(--surface); color: var(--ink);
  text-align: left; padding: 0 8px; min-width: 96px; max-width: 116px; font-size: 13px; line-height: 1.2;
}
.cell { height: 42px; min-width: 32px; border-radius: 8px; padding: 0; }
.cell button {
  width: 100%; height: 100%; border: 0; background: none; cursor: pointer; border-radius: 8px;
  color: #fff; font-size: 11px; font-weight: 800; padding: 0 2px; white-space: nowrap; overflow: visible;
}
.cell.free { background: var(--cell-free); }
.cell.free button:hover { box-shadow: inset 0 0 0 2px var(--ok); }
.cell.web { background: var(--cell-web); }
.cell.phone { background: var(--cell-phone); }
.cell.st-pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 4px, transparent 4px 8px); }
.cell.cleanup { background: var(--cell-cleanup); }
.cell.closed { background: repeating-linear-gradient(45deg, var(--cell-off) 0 5px, var(--line) 5px 10px); }
.cell.off, .cell.past { background: var(--cell-off); opacity: .6; }
.cell.sel { box-shadow: 0 0 0 3px var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 12px 0 6px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 16px; height: 16px; min-width: 0; border-radius: 5px; }
#grid-sel { margin-top: 12px; scroll-margin-top: 80px; }

/* ---------- заглушки загрузки ---------- */
.skeleton-row { display: flex; gap: 8px; overflow: hidden; }
.skeleton, .skeleton-card { background: linear-gradient(90deg, var(--soft) 0%, var(--line) 50%, var(--soft) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skeleton { flex: none; width: 70px; height: 66px; border-radius: var(--radius-chip); }
.skeleton-card { height: 120px; border: 0; }

/* ---------- уведомление ---------- */
.toast {
  position: fixed; z-index: 40; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 32px);
  display: flex; gap: 14px; align-items: center; padding: 13px 18px; border-radius: var(--radius);
  background: var(--toast-bg); color: var(--toast-ink); font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: rise .25s both;
}
.toast.above-nav, .with-bar ~ .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
.toast[hidden] { display: none; }
.toast .link { color: var(--toast-link); }

button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
