/* Стили мини-приложения MAX (/app/...). Переменные цвета берём из style.css
   (подключается раньше в <head>) — здесь только то, что специфично для
   встроенного окна внутри MAX: нет десктопного header/footer сайта, вместо
   них — компактная шапка и нижняя панель вкладок, как в мобильных приложениях. */

body.miniapp-body {
  padding-bottom: 86px; /* место под нижнюю панель вкладок (подросла вместе с иконками), чтобы контент не перекрывался */
  -webkit-tap-highlight-color: transparent;
}

.miniapp-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.miniapp-topbar img { height: 28px; width: 28px; border-radius: 8px; flex-shrink: 0; }
.miniapp-topbar .miniapp-title { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.tgapp-account-link { display: flex; align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0; }

.miniapp-main { padding: 16px; max-width: 640px; margin: 0 auto; }

.miniapp-tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(46,43,40,0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.miniapp-tabbar a {
  flex: 1 1 0;
  min-width: 0; /* без этого 5 вкладок при крупном шрифте на узком экране раздвигали панель за край (Android, «крупный» шрифт) */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  transition: color 0.15s ease;
  text-overflow: ellipsis; white-space: nowrap; /* метка «Записаться» при 160% шрифта обрезается многоточием, а не ломает панель */
}
/* Пилюля вокруг иконки была 30x22 при иконке 20px — почти без запаса по
   высоте (1px сверху/снизу), из-за чего скруглённые углы пилюли почти
   упирались в саму иконку и она выглядела "обрезанной" (живая жалоба
   владельца). Сделали пилюлю заметно просторнее и почти квадратной — как у
   круглых иконок-чипов на плитках выше (.miniapp-tile .icon), для единого
   стиля и ощущения "можно нажать", а не "втиснуто". */
.miniapp-tabbar a .icon {
  display: flex; align-items: center; justify-content: center; line-height: 1;
  width: 42px; height: 32px; border-radius: 12px; transition: background 0.15s ease, transform 0.15s ease;
}
.miniapp-tabbar a .icon svg { display: block; }
.miniapp-tabbar a.active { color: var(--gold-dark); }
.miniapp-tabbar a.active .icon { background: var(--cream-2); }
.miniapp-tabbar a:active .icon { transform: scale(0.92); }

/* ==== "Профессиональнее" — живая просьба владельца после второго захода
   ("отступы и вёрстка выглядят самодельно", "иконкам/цветам не хватает
   стиля", "карточки/кнопки плоские, нет глубины"). Три конкретных приёма
   ниже: (1) box-shadow как у десктопных .card (var(--shadow)) — раньше у
   мини-аппа были только плоские border, ни одной тени; (2) иконки плиток
   теперь в цветном круге-чипе, а не голым контуром на белом; (3) осязаемый
   tap-фидбэк (:active { transform: scale(...) }) — на телефоне без hover,
   без нажатия карточки выглядят "неживыми". */
.miniapp-hero-banner {
  background: linear-gradient(135deg, var(--ink) 0%, #423C34 100%);
  border-radius: var(--radius);
  padding: 24px 20px;
  color: var(--white);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.miniapp-hero-banner h1 { color: var(--white); font-size: 1.3rem; margin-bottom: 6px; }
.miniapp-hero-banner p { color: rgba(255,255,255,0.72); margin: 0 0 14px; font-size: 0.9rem; }

.miniapp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.miniapp-tile {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.miniapp-tile:active { transform: scale(0.96); box-shadow: 0 4px 14px rgba(46,43,40,0.1); }
.miniapp-tile .icon {
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; margin: 0 auto 10px; border-radius: 50%;
  background: var(--cream-2); color: var(--gold-dark);
}
.miniapp-tile .icon svg { display: block; }

/* ЖИВАЯ ПРАВКА владельца: разноцветные плитки (золото/терракота/шалфей/
   пыльная роза) не понравились ("стало ещё хуже, натянуто, цвета плохие") —
   откатываем обратно на единый золотой кружок для всех плиток, как было
   изначально. Оставляем только аккуратный tap-фидбэк. */
.miniapp-tile:active .icon { transform: scale(0.92); }
.miniapp-tile .icon { transition: transform 0.15s ease; }
.miniapp-tile .lbl { font-weight: 600; font-size: 0.88rem; }

.miniapp-master-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.miniapp-master-card:active { transform: scale(0.98); }
.miniapp-master-card img {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--cream-2); border: 2px solid var(--cream-2);
}
.miniapp-master-card .name { font-weight: 700; font-size: 0.95rem; }
.miniapp-master-card .role { font-size: 0.8rem; color: var(--ink-soft); }

.miniapp-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.miniapp-gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }

.miniapp-service-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.miniapp-service-row:last-child { border-bottom: none; }
.miniapp-service-row .name { font-weight: 500; font-size: 0.9rem; }
.miniapp-service-row .price { font-weight: 700; color: var(--gold-dark); white-space: nowrap; font-size: 0.9rem; }

.miniapp-loading { text-align: center; padding: 40px 16px; color: var(--ink-soft); }
.miniapp-spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--cream-2); border-top-color: var(--gold);
  animation: miniapp-spin 0.7s linear infinite;
  margin: 0 auto 14px;
}
@keyframes miniapp-spin { to { transform: rotate(360deg); } }

/* ==== Визард онлайн-записи в мини-аппах (public/js/booking-wizard.js +
   views/partials/booking_wizard.ejs) — общий для MAX и Telegram ==== */
.bw-list-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; font: inherit; cursor: pointer;
  box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.bw-list-btn:active { transform: scale(0.98); }
.bw-list-btn .name { font-weight: 500; font-size: 0.9rem; }
.bw-list-btn .price { font-weight: 700; color: var(--gold-dark); white-space: nowrap; font-size: 0.9rem; }
/* Мастер ещё не выбран, а цены по мастерам разные (server/services/pricing.js) — «от N ₽» в самой
   цене плюс кто дешевле отдельной строкой пониже, не встык с названием. */
/* Разбивка цены по мастерам в мастере записи (каталог услуг + шапка экрана выбора мастера) — прямая
   просьба владельца: должна быть ХОРОШО ВИДНА, поэтому не приглушённый текст, а золотистый акцент. */
.bw-price-breakdown { font-size: 0.78rem; font-weight: 600; color: var(--gold-dark); margin-top: 4px; line-height: 1.35; }
.bw-master-price { font-weight: 700; color: var(--gold-dark); }
/* Метка «эконом-мастер» / «топ-мастер» рядом с именем — прямая просьба владельца: цена мастера
   отличается от обычной, это должно быть видно не только в цифре после «—». */
.bw-master-tier { font-weight: 500; font-size: 0.85em; color: var(--ink-soft); font-style: italic; }

.bw-master-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 10px; font: inherit; cursor: pointer;
  box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.bw-master-btn:active { transform: scale(0.98); }
.bw-master-btn img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--cream-2); border: 2px solid var(--cream-2); }
.bw-master-btn .name { font-weight: 700; font-size: 0.95rem; }
.bw-master-btn .bio { font-size: 0.8rem; color: var(--ink-soft); margin-top: 2px; }

.bw-chip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.bw-chip {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 8px; text-align: center; font-size: 0.88rem; cursor: pointer;
  box-shadow: 0 3px 10px rgba(46,43,40,0.05); transition: transform 0.15s ease, background 0.15s ease;
}
.bw-chip:active { background: var(--cream-2); transform: scale(0.96); }
.bw-chip-discount { border-color: var(--gold); background: var(--cream); }
.bw-chip-discount .bw-chip-discount-badge { display: block; font-size: 0.72rem; color: var(--gold-dark); margin-top: 2px; }

.bw-summary-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.bw-summary-row:last-child { border-bottom: none; }
.bw-summary-row > :last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; } /* 07.10: длинное название услуги прилипало к «Услуга» */

/* ==== Экран "С чего начнём?" в визарде записи (views/partials/booking_wizard.ejs).
   Прямая просьба владельца: дать человеку выбрать, что для него важнее —
   услуга, мастер или время — и сделать это ЗАМЕТНЫМ, чтобы было понятно, что
   идти по нашему порядку необязательно. Поэтому это не мелкие ссылки, а три
   крупные карточки с иконкой: их видно первым экраном и мимо не пройдёшь. ==== */
.bw-entry-grid { display: grid; gap: 12px; }
.bw-entry-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  width: 100%; text-align: left;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; cursor: pointer; font: inherit; color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.bw-entry-btn:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(46,43,40,0.12); }
.bw-entry-btn:active { transform: scale(0.99); }
.bw-entry-icon {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--cream-2); color: var(--gold-dark); margin-bottom: 8px;
}
.bw-entry-title { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.05rem; }
.bw-entry-sub { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.4; }

/* На широком экране три карточки встают в ряд — так сразу видно, что это
   равнозначные варианты, а не список шагов один за другим. */
@media (min-width: 720px) {
  .bw-entry-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Сноска про Instagram/Meta в мини-аппах — см. такой же блок в style.css.
   Тут подложка светлая, поэтому цвет свой. */
.miniapp-legal {
  margin-top: 16px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--ink-soft);
  opacity: 0.8;
}

/* ==================================================================
   РЕДИЗАЙН МИНИ-ПРИЛОЖЕНИЙ (прямая просьба владельца: «и в мини аппках
   тоже редизайн», «с анимками как на основной странице», «навигацию
   интуитивнее и красивее»). Визуальный язык — тот же, что у сайта:
   фото + тёмный градиент в шапке экрана, карточки с тенью, золотой
   акцент на действии «Записаться».
   ================================================================== */

/* ---- Фото-шапка экрана (views/partials/miniapp_page_hero.ejs) ----
   Раньше внутренние экраны начинались сразу со списка — было непонятно,
   куда ты попал, и всё выглядело как служебный список, а не как студия. */
.miniapp-hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  padding: 26px 20px 22px;
  margin-bottom: 18px;
  background: var(--ink);
  box-shadow: var(--shadow);
}
.miniapp-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.miniapp-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(120deg, rgba(20,18,15,0.94) 0%, rgba(20,18,15,0.82) 55%, rgba(20,18,15,0.45) 100%);
}
.miniapp-hero-content { position: relative; z-index: 2; }
.miniapp-hero-content .eyebrow { color: var(--gold); }
.miniapp-hero-content h1 { color: var(--white); font-size: 1.45rem; line-height: 1.2; margin: 6px 0 8px; }
.miniapp-hero-content p { color: rgba(255,255,255,0.78); font-size: 0.9rem; line-height: 1.5; margin: 0; }
.miniapp-hero-content .btn { margin-top: 16px; }

/* ---- Нижние вкладки: «Запись» — главное действие ----
   Раньше все пять вкладок были одинаковыми, и кнопка записи терялась
   между «Мастерами» и «Кабинетом». Теперь она по центру и золотая —
   то же решение, что и на сайте (.mobile-nav-cta в style.css). */
.miniapp-tabbar a.tab-cta { color: var(--gold-dark); }
.miniapp-tabbar a.tab-cta .icon {
  background: var(--gold); color: var(--white);
  width: 46px; height: 36px; border-radius: 13px;
  box-shadow: 0 6px 16px rgba(184,152,95,0.45);
}
.miniapp-tabbar a.tab-cta.active .icon { background: var(--gold-dark); }

/* ---- Заголовок раздела внутри экрана ---- */
.miniapp-section-head {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; /* wrap: «вся галерея →» при крупном шрифте на 320px не помещалась и вылезала за край */
  gap: 4px 12px; margin: 22px 0 12px;
}
.miniapp-section-head h2 { margin: 0; font-size: 1.15rem; }
.miniapp-section-head span { font-size: 0.76rem; color: var(--ink-soft); white-space: nowrap; }

/* ---- Липкая полоса категорий (экран «Услуги») ----
   Прайс в мини-аппе был одной длинной лентой: чтобы дойти до педикюра,
   нужно было пролистать весь маникюр. */
.miniapp-chips {
  position: sticky; top: var(--app-header-h, 57px); z-index: 15; /* высоту шапки меряет site-animations.js */
  display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 -16px 14px; padding: 10px 16px;
  background: rgba(250,246,236,0.97); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.miniapp-chips::-webkit-scrollbar { display: none; }
.miniapp-chips a {
  flex-shrink: 0; padding: 7px 14px; border-radius: 999px;
  background: var(--cream-2); color: var(--ink-soft);
  font-size: 0.8rem; font-weight: 600; text-decoration: none;
  font-family: 'Montserrat', sans-serif;
}
.miniapp-chips a.active { background: var(--gold); color: var(--white); }

/* ---- Карточка услуги: цена крупно справа, вся строка кликабельна ----
   Колонка справа (цена/«Записаться») узкая и text-align:right — не место для разбивки цены по
   нескольким мастерам (3+ имени с ценами там не поместились бы в одну строку). Поэтому карточка —
   flex-column: сверху обычная строка имя/цена (.miniapp-service-row), под ней, во всю ширину,
   отдельным блоком — разбивка «кто почём» (прямая просьба владельца, должна быть ХОРОШО ВИДНА). */
.miniapp-service-tile {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px;
  text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.miniapp-service-tile:active { transform: scale(0.98); }
.miniapp-service-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; }
.miniapp-service-row > span:first-child { min-width: 0; }
.miniapp-service-row > span:last-child { flex-shrink: 0; text-align: right; }
.miniapp-service-tile .name { display: block; font-weight: 600; font-size: 0.92rem; line-height: 1.3; overflow-wrap: anywhere; }
.miniapp-service-tile .meta { display: block; font-size: 0.78rem; color: var(--ink-soft); margin-top: 3px; }
.miniapp-service-tile .price { display: block; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1rem; color: var(--gold-dark); white-space: nowrap; }
.miniapp-service-tile .go { display: block; font-size: 0.72rem; color: var(--ink-soft); margin-top: 4px; white-space: nowrap; }
.miniapp-price-breakdown { display: flex; flex-wrap: wrap; gap: 6px; }
.miniapp-price-breakdown .price-breakdown-item {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 600;
  color: var(--gold-dark); background: rgba(184, 152, 95, 0.14); border: 1px solid rgba(184, 152, 95, 0.35);
  white-space: nowrap;
}

/* ---- Карточка отзыва ---- */
.miniapp-review {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 16px; margin-bottom: 12px;
  box-shadow: var(--shadow); overflow: hidden;
}
.miniapp-review::before {
  content: "”"; position: absolute; top: -12px; right: 12px;
  font-family: 'Playfair Display', serif; font-size: 4rem; color: var(--gold); opacity: 0.16;
}
.miniapp-review p { margin: 8px 0; font-size: 0.9rem; line-height: 1.55; }
.miniapp-review .author { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 0.82rem; }

/* ---- Короткие факты в ряд ---- */
.miniapp-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.miniapp-fact { text-align: center; }
.miniapp-fact .v { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--gold); display: block; line-height: 1; }
.miniapp-fact .l { font-size: 0.72rem; color: rgba(255,255,255,0.7); display: block; margin-top: 6px; line-height: 1.3; }

/* ---- Карточка мастера покрупнее: фото, роль и явное «Записаться» ---- */
.miniapp-master-card .bio { font-size: 0.78rem; color: var(--ink-soft); margin-top: 3px; line-height: 1.4; }
.miniapp-master-card .go { margin-left: auto; color: var(--gold-dark); flex-shrink: 0; }

/* ---- Просмотр фото крупнее в мини-аппе ---- */
/* Фото — в кнопке (клик обрабатывает она): у самих <img> отключены события указателя,
   см. защиту фото в style.css. */
.miniapp-photo {
  display: block; padding: 0; border: 0; background: none; min-width: 0;
  border-radius: 8px; overflow: hidden; cursor: zoom-in; transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.miniapp-photo:active { transform: scale(0.96); }
.miniapp-photo img { display: block; }

/* ---- Кнопка «Ещё» в шапке мини-аппки ----
   Тот же смысл, что у бургера на сайте: пять вкладок внизу — главное,
   всё остальное — здесь, а не «откройте сайт в браузере». */
.miniapp-topbar .miniapp-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.miniapp-more-btn {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--white);
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  transition: transform 0.15s ease;
}
.miniapp-more-btn:active { transform: scale(0.92); }
.miniapp-more-bars { display: block; width: 16px; height: 11px; position: relative; }
.miniapp-more-bars i {
  position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform 0.22s ease, opacity 0.18s ease, top 0.22s ease;
}
.miniapp-more-bars i:nth-child(1) { top: 0; }
.miniapp-more-bars i:nth-child(2) { top: 4.5px; }
.miniapp-more-bars i:nth-child(3) { top: 9px; }
.miniapp-more-btn.is-open .miniapp-more-bars i:nth-child(1) { top: 4.5px; transform: rotate(45deg); }
.miniapp-more-btn.is-open .miniapp-more-bars i:nth-child(2) { opacity: 0; }
.miniapp-more-btn.is-open .miniapp-more-bars i:nth-child(3) { top: 4.5px; transform: rotate(-45deg); }

/* ---- Лист «Все разделы» ---- */
.app-sheet-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(20,18,15,0.5); backdrop-filter: blur(2px);
  animation: appFadeIn 0.2s ease;
}
.app-sheet-backdrop[hidden], .app-sheet[hidden] { display: none; }
@keyframes appFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes appSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.app-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-height: 84vh; overflow-y: auto;
  background: var(--cream);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 50px rgba(20,18,15,0.28);
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0));
  animation: appSheetUp 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.app-sheet-handle { width: 42px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 10px; }
.app-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 8px; }
.app-sheet-close { background: none; border: 0; font-size: 1.7rem; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 0 4px; }
.app-sheet-list { display: flex; flex-direction: column; }
.app-sheet-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 8px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem;
}
.app-sheet-item:last-child { border-bottom: none; }
.app-sheet-item.is-current { color: var(--gold-dark); }
.app-sheet-item:active { background: var(--cream-2); }
.app-sheet-icon {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--cream-2); color: var(--gold-dark);
  display: flex; align-items: center; justify-content: center;
}
.app-sheet-go { margin-left: auto; color: var(--ink-soft); display: flex; }
.app-sheet-foot { display: flex; flex-direction: column; gap: 9px; padding-top: 14px; }

/* ---- Карта клуба внутри мини-аппки ----
   Раньше карту приходилось открывать на сайте в браузере — на кассе это
   лишние секунды и лишний экран. Крупный номер видно с расстояния вытянутой
   руки, мастеру достаточно его прочитать. */
.app-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1c1915 0%, #35302a 55%, #4a4038 100%);
  border-radius: 20px; padding: 22px 20px 20px; color: var(--white);
  box-shadow: 0 18px 44px rgba(20,18,15,0.32);
}
.app-card::after {
  content: ""; position: absolute; right: -40px; top: -60px;
  width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,152,95,0.35), transparent 70%);
  pointer-events: none;
}
.app-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-card-top .eyebrow { color: var(--gold); }
.app-card-top img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; opacity: 0.9; }
.app-card-holder { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1.05rem; margin-top: 14px; }
.app-card-code { margin-top: 16px; }
.app-card-code .lbl { display: block; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.app-card-code .val {
  display: block; font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: 2.6rem; line-height: 1.1; letter-spacing: 0.04em; color: var(--white);
  user-select: all;
}
.app-card-primary { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.app-card-primary .v { font-family: 'Playfair Display', serif; font-size: 1.9rem; color: var(--gold); line-height: 1; }
.app-card-primary .l { font-size: 0.8rem; color: rgba(255,255,255,0.65); }

/* ---- Карточка статьи блога в мини-аппке ---- */
.miniapp-post-card {
  display: flex; gap: 12px; align-items: stretch;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; margin-bottom: 10px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform 0.15s ease;
}
.miniapp-post-card:active { transform: scale(0.98); }
.miniapp-post-cover { flex-shrink: 0; width: 88px; border-radius: 10px; overflow: hidden; background: var(--cream-2); }
.miniapp-post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.miniapp-post-cover-fallback { background: linear-gradient(135deg, var(--ink) 0%, #423C34 100%); display: flex; align-items: center; justify-content: center; }
.miniapp-post-cover-letter { font-family: 'Montserrat', sans-serif; font-weight: 800; color: rgba(255,255,255,0.2); font-size: 1.9rem; }
.miniapp-post-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 4px 4px 4px 0; justify-content: center; }
.miniapp-post-body .t { font-weight: 750; font-size: 1rem; line-height: 1.3; }
.miniapp-post-body .x { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.45; }

/* ---- Экран мастера: крупное фото и понятное действие ---- */
.master-hero {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--cream-2); box-shadow: var(--shadow); margin-bottom: 16px;
}
.master-hero-photo { aspect-ratio: 4/5; }
.master-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.master-hero-photo.is-placeholder img { object-fit: contain; padding: 18%; }
.master-hero-body {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px; color: #fff;
  background: linear-gradient(transparent, rgba(20,18,15,0.88));
}
.master-hero-body h1 { color: #fff; font-size: 1.45rem; margin: 0 0 2px; }
.master-hero-body .role { font-size: 0.85rem; color: rgba(255,255,255,0.75); }

/* ---- Полоска баланса на главном экране ----
   Раньше, чтобы увидеть баллы, нужно было идти в «Кабинет». Для постоянного
   клиента это главное, что он хочет знать, открывая аппку. */
.app-balance-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, #1e1b17 0%, #3a342d 100%);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px;
  text-decoration: none; color: var(--white);
  box-shadow: 0 12px 30px rgba(20,18,15,0.22);
  transition: transform 0.15s ease;
}
.app-balance-strip:active { transform: scale(0.98); }
.app-balance-left .l { display: block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.app-balance-left .v { display: block; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--gold); margin-top: 3px; }
.app-balance-left .v .u { font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.7); }
.app-balance-right { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.75); font-size: 0.8rem; }

/* ---- Завершение воронки на последнем экране ----
   Раньше низ главной был просто карточкой с адресом — человек долистывал и
   упирался в тупик. Теперь это явное предложение записаться и запасной
   вариант (позвонить), если он сомневается. */
.miniapp-cta {
  background: linear-gradient(135deg, #1e1b17 0%, #35302a 100%);
  border-radius: var(--radius-lg); padding: 26px 20px 22px;
  margin: 22px 0 14px; text-align: center; color: var(--white);
  box-shadow: 0 16px 40px rgba(20,18,15,0.24);
}
.miniapp-cta h3 { color: var(--white); margin: 0 0 6px; font-size: 1.2rem; }
.miniapp-cta p { color: rgba(255,255,255,0.75); font-size: 0.88rem; line-height: 1.5; margin: 0 0 16px; }


/* ---- Экран «Услуги»: плитки-категории (общие .svc-* — в style.css) ----
   В мини-аппке плитки чуть компактнее, а внутри панели услуги — как раньше
   (.miniapp-service-tile), одной колонкой. */
.miniapp-main .svc-tile { min-height: 104px; }
.miniapp-main .svc-panel-title h2 { font-size: 1.15rem; }
.miniapp-main .svc-panel .miniapp-service-tile:last-child { margin-bottom: 0; }

/* MAYA-SEO-UX-20261001-v1 */
button.bw-chip { font: inherit; min-height: 44px; background: var(--white, #fff); color: inherit; }
.bw-chip:focus-visible, .bw-list-btn:focus-visible { outline: 3px solid var(--gold, #b8985f); outline-offset: 3px; }
#bw-root { scroll-margin-top: 72px; }

/* 02.10: «Повторить прошлый визит» на первом экране записи */
.bw-repeat { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--ink); color: var(--white); text-decoration: none; box-shadow: var(--shadow); }
.bw-repeat[hidden] { display: none; }
.bw-repeat:hover { background: #3a352f; }
.bw-repeat-icon { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: var(--gold); color: var(--ink); }
.bw-repeat-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.bw-repeat-text b { font-size: 1rem; }
.bw-repeat-text span { font-size: 0.86rem; opacity: 0.85; }
.bw-repeat-go { font-size: 1.2rem; color: var(--gold); }

/* 02.10 (v6): лист ожидания и допродажа в записи */
.bw-wl { margin-top: 18px; padding: 14px 16px; border: 1px dashed var(--line, #e6dccb); border-radius: var(--radius, 14px); background: rgba(184, 152, 95, 0.06); display: grid; gap: 10px; justify-items: start; }
.bw-wl[hidden] { display: none; }
.bw-wl-text { font-size: 0.92rem; color: var(--ink-soft, #6b6259); line-height: 1.45; }
.bw-wl-link { color: var(--gold-dark, #8a6d3b); font-weight: 600; font-size: 0.92rem; }
.bw-wl-btn { min-height: 40px; }
.bw-wl-msg { font-size: 0.88rem; color: var(--ink, #2e2b28); }
.bw-wl-msg:empty { display: none; }
.bw-extras { margin: 0 0 16px; padding: 14px 16px; border-radius: var(--radius, 14px); background: var(--white, #fff); border: 1px solid var(--line, #e6dccb); }
.bw-extras[hidden] { display: none; }
.bw-extras-title { font-weight: 700; margin-bottom: 10px; }
.bw-extras-list { display: grid; gap: 8px; }
.bw-extra { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line, #e6dccb); cursor: pointer; min-height: 44px; }
.bw-extra input { width: 18px; height: 18px; accent-color: var(--gold, #b8985f); flex: 0 0 auto; }
.bw-extra-name { flex: 1; min-width: 0; font-size: 0.92rem; }
.bw-extra-price { font-weight: 700; color: var(--gold-dark, #8a6d3b); white-space: nowrap; font-size: 0.9rem; }
.bw-extra.on { border-color: var(--gold, #b8985f); background: rgba(184, 152, 95, 0.08); }
#bw-extras-note:empty { display: none; }
