/* =====================================================================
   AI PILOT Studio — Widgets: Gallery, Reviews, Booking, Contacts, PWA install
   ===================================================================== */

/* =====================================================================
   GALLERY (masonry + lightbox)
   ===================================================================== */
.gallery {
  background: var(--bg-0);
}
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* было 2 — на мобилке тоже 3 для компактности */
  gap: var(--s-2);
}
@media (min-width: 720px) {
  .gallery__grid { grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }   /* десктоп: 4 колонки = премиальнее */
}

.gallery__item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  cursor: zoom-in;
  background: var(--bg-2);
  aspect-ratio: 1 / 1;       /* квадраты компактнее чем 4:5 */
}
.gallery__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .8s var(--ease-out), filter .6s var(--ease-out);
  filter: saturate(0.85) contrast(1.04);
  will-change: transform;
}

/* 8 плиток в 4 колонки на десктопе = ровные 2 ряда */
.gallery__item:hover img {
  transform: scale(1.05);
  filter: saturate(1) contrast(1);
}
.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--bg-0) 50%, transparent));
  opacity: 0;
  transition: opacity .35s var(--ease-out);
}
.gallery__item:hover::after { opacity: 1; }
.gallery__item .gallery__zoom {
  position: absolute;
  bottom: var(--s-4);
  right: var(--s-4);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--t-accent-fg, #1A1408);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.gallery__item:hover .gallery__zoom {
  opacity: 1;
  transform: none;
}

.gallery__cta {
  margin-top: var(--s-7);
  text-align: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg-0) 94%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
}
.lightbox.is-open { display: flex; animation: lb-fade .3s var(--ease-out); }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__img {
  max-width: 100%;
  max-height: 86vh;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  animation: lb-pop .4s var(--ease-spring);
}
@keyframes lb-pop { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--fg-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px var(--border-medium);
  transition: background .25s var(--ease-out);
}
.lightbox__btn:hover { background: var(--accent); color: var(--t-accent-fg, #1A1408); box-shadow: none; }
.lightbox__prev { left: 24px; }
.lightbox__next { right: 24px; }
.lightbox__close {
  top: 24px; right: 24px;
  transform: none;
}
.lightbox__counter {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-60);
}

/* =====================================================================
   PRODUCTS TEASER (Phase 2 — placeholder)
   ===================================================================== */
.products-teaser { background: var(--bg-1); }
.products-teaser__panel {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-9) var(--s-7);
  text-align: center;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.products-teaser__panel::before,
.products-teaser__panel::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}
.products-teaser__panel::before {
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  top: -100px; right: -100px;
}
.products-teaser__panel::after {
  width: 220px; height: 220px;
  background: radial-gradient(circle, var(--accent-deep), transparent 70%);
  bottom: -80px; left: -80px;
}
.products-teaser__badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  position: relative;
  z-index: 2;
}
.products-teaser__panel .section-title { position: relative; z-index: 2; margin-left: auto; margin-right: auto; }
.products-teaser__panel .lede { position: relative; z-index: 2; margin-left: auto; margin-right: auto; max-width: 56ch; }
.products-teaser__meta {
  position: relative; z-index: 2;
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  font-size: 13px;
  color: var(--fg-60);
  letter-spacing: 0.02em;
  justify-content: center;
}
@media (max-width: 768px) {
  .products-teaser__panel { padding: 56px 24px; }
  .products-teaser__meta { gap: var(--s-3); font-size: 12px; }
}

/* =====================================================================
   REVIEWS
   ===================================================================== */
.reviews {
  background: var(--bg-1);
  overflow: hidden;
}
.reviews__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-7);
  flex-wrap: wrap;
}
.reviews__rating {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--bg-2);
  border-radius: var(--r-pill);
  border: 1px solid var(--border-soft);
}
.reviews__rating .num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  font-variation-settings: 'opsz' 144;
  color: var(--accent);
}
.reviews__stars { display: inline-flex; gap: 2px; color: var(--accent); }
.reviews__rating small {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-60);
}

/* Карусель отзывов — на всех ширинах, со scroll-snap и кнопками */
.reviews__nav {
  display: inline-flex;
  gap: var(--s-3);
}
.reviews__nav button {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--fg-100);
  box-shadow: inset 0 0 0 1px var(--border-medium);
  transition: background .3s var(--ease-out), color .3s var(--ease-out);
}
.reviews__nav button:hover { background: var(--accent); color: var(--t-accent-fg, #1A1408); box-shadow: none; }
.reviews__nav button:disabled { opacity: 0.3; cursor: default; }
.reviews__nav button:disabled:hover { background: transparent; color: var(--fg-100); box-shadow: inset 0 0 0 1px var(--border-medium); }

.reviews__rail {
  display: flex;
  gap: var(--s-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 24px;
  padding: 4px 24px var(--s-5);
  margin: 0 -24px;
  scrollbar-width: none;
}
.reviews__rail::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .reviews__rail {
    scroll-padding: 0 40px;
    padding: 4px 40px var(--s-5);
    margin: 0 -40px;
  }
}

.review {
  flex: 0 0 88%;
  scroll-snap-align: start;
  padding: var(--s-7);
  background: var(--bg-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  position: relative;
  min-height: 280px;
}
.review::before {
  content: '“';
  position: absolute;
  top: var(--s-5); right: var(--s-6);
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.18;
  font-style: italic;
}
/* Desktop: 3 карточки в видимой области ровно, без обрезки */
@media (min-width: 900px) {
  .review { flex: 0 0 calc((100% - var(--s-5) * 2) / 3); }
}
@media (min-width: 1280px) {
  .review { flex: 0 0 calc((100% - var(--s-5) * 2) / 3); }
}
.review__stars { display: inline-flex; gap: 2px; color: var(--accent); }
.review__text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  line-height: 1.4;
  letter-spacing: -0.005em;
  color: var(--fg-100);
  margin: 0;
}
.review__author {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-top: auto;
}
.review__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--bg-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--accent);
  font-style: italic;
}
.review__name { font-weight: 500; color: var(--fg-100); }
.review__meta { font-size: 12px; color: var(--fg-60); letter-spacing: 0.05em; }

/* =====================================================================
   BOOKING WIDGET (5 шагов)
   ===================================================================== */
.booking {
  background: var(--bg-0);
}
.booking__shell {
  max-width: 760px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.booking__progress {
  display: flex;
  border-bottom: 1px solid var(--border-soft);
}
.booking__step-tab {
  flex: 1;
  padding: 18px var(--s-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  border-right: 1px solid var(--border-soft);
  position: relative;
  text-align: left;
}
.booking__step-tab:last-child { border-right: 0; }
.booking__step-tab small {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-40);
}
.booking__step-tab .lbl {
  font-size: 13px;
  color: var(--fg-60);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.booking__step-tab.is-active small,
.booking__step-tab.is-active .lbl { color: var(--accent); }
.booking__step-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.booking__step-tab.is-done .lbl { color: var(--fg-100); }
@media (max-width: 700px) {
  .booking__step-tab small { display: none; }
}

.booking__body {
  padding: var(--s-7);
  min-height: 360px;
  position: relative;
}
.booking__step {
  display: none;
  animation: bk-in .35s var(--ease-out);
}
.booking__step.is-active { display: block; }
@keyframes bk-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.booking__step h3 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 500;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-5);
  color: var(--fg-100);
}

.opt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
}
@media (min-width: 540px) { .opt-grid { grid-template-columns: 1fr 1fr; } }
.opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--bg-1);
  cursor: pointer;
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
  text-align: left;
  font-size: 15px;
  color: var(--fg-100);
}
.opt:hover { border-color: var(--border-medium); background: var(--bg-2); }
.opt.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.opt small { color: var(--fg-60); font-size: 12px; }
.opt-mini { font-size: 13px; color: var(--accent); }

.dt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px,1fr)); gap: var(--s-2); }
.dt {
  padding: 10px 6px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  background: var(--bg-1);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dt small { font-size: 10px; color: var(--fg-60); text-transform: uppercase; letter-spacing: 0.1em; }
.dt:hover { border-color: var(--border-medium); background: var(--bg-2); }
.dt.is-selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); }

.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px,1fr)); gap: var(--s-2); }
.slot {
  padding: 12px 6px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  background: var(--bg-1);
  font-size: 14px;
  font-feature-settings: 'tnum';
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.slot:hover { border-color: var(--border-medium); background: var(--bg-2); }
.slot.is-selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); }
.slot:disabled { opacity: 0.3; cursor: default; }

.field {
  display: block;
  margin-bottom: var(--s-4);
}
.field label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-60);
  margin-bottom: var(--s-2);
}
.field input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  color: var(--fg-100);
  font: inherit;
  font-size: 16px;
  transition: border-color .2s;
}
.field input:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}

.booking__nav {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border-soft);
}
.booking__summary {
  font-size: 13px;
  color: var(--fg-60);
}
.booking__summary strong { color: var(--fg-100); font-weight: 500; }

.booking__success {
  text-align: center;
  padding: var(--s-7) var(--s-4);
}
.booking__success .check {
  width: 72px; height: 72px;
  margin: 0 auto var(--s-5);
  border-radius: 50%;
  background: rgba(127,200,154,0.14);
  color: #9DDFB6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =====================================================================
   CONTACTS + MAP
   ===================================================================== */
.contacts {
  background: var(--bg-1);
}
.contacts__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
}
@media (min-width: 900px) {
  .contacts__grid { grid-template-columns: 1fr 1.4fr; }
}
.contacts__info {
  padding: var(--s-6) var(--s-7);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* распределяем содержимое по высоте карты — блоки равны */
  gap: var(--s-4);
}
.contacts__line {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border-soft);
}
.contacts__line:last-child { border-bottom: 0; }
.contacts__line small {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-60);
}
.contacts__line .v {
  font-family: var(--font-display);
  font-size: var(--t-h4);
  font-weight: 500;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -0.01em;
  color: var(--fg-100);
}
.contacts__line a:hover { color: var(--accent); }

.hours {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px var(--s-5);
  font-size: 14px;
  font-feature-settings: 'tnum';
}
.hours dt { color: var(--fg-60); }
.hours dd { color: var(--fg-100); margin: 0; text-align: right; }
.hours dt.is-today, .hours dd.is-today { color: var(--accent); font-weight: 500; }

/* ИИ-администратор — плавающий чат на сайте салона. Тема салона (accent/bg/fg). */
.aichat { position: fixed; right: 18px; bottom: 18px; z-index: 9000; }
.aichat__fab {
  position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--t-accent-fg, #14110a);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.55), 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent);
  transition: transform .15s;
  animation: aichatBob 3.2s ease-in-out infinite;
}
.aichat__fab:hover { transform: scale(1.08) rotate(-4deg); animation-play-state: paused; }
.aichat.is-open .aichat__fab { transform: scale(.9); opacity: .9; animation: none; }
.aichat__fab-icon { display: flex; }
/* Пульсирующее кольцо — привлекает внимание. Гаснет, когда чат открыт. */
.aichat__fab-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); animation: aichatRing 2.1s ease-out infinite; pointer-events: none; }
.aichat.is-open .aichat__fab-ring { display: none; }
@keyframes aichatRing { 0% { transform: scale(1); opacity: .65; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes aichatBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
/* Подсказка-приглашение рядом с кнопкой (с названием салона). */
.aichat__teaser {
  position: absolute; right: 4px; bottom: 76px; width: min(320px, calc(100vw - 36px)); max-width: none;
  box-sizing: border-box;
  background: var(--bg-1); color: var(--fg-100); border: 1px solid var(--border-soft);
  border-radius: 16px; border-bottom-right-radius: 4px;
  font-size: 15px; line-height: 1.45; box-shadow: 0 16px 40px -12px rgba(0,0,0,.55);
  animation: aichatTeaserIn .35s cubic-bezier(.2,.9,.3,1.3) both;
}
.aichat__teaser[hidden] { display: none; }
.aichat__teaser-open {
  width: 100%; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center;
  padding: 14px 44px 14px 14px; border: 0; border-radius: inherit; background: transparent;
  color: inherit; font: inherit; line-height: inherit; text-align: left; cursor: pointer; touch-action: manipulation;
}
.aichat__teaser-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.aichat__teaser-icon {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--bg-2));
}
.aichat__teaser-copy { min-width: 0; display: grid; gap: 2px; }
.aichat__teaser-copy strong { font-family: var(--font-display); font-size: 15px; line-height: 1.25; color: var(--fg-100); }
.aichat__teaser-copy > span { color: var(--fg-60); }
.aichat__teaser-x { position: absolute; z-index: 2; top: 2px; right: 2px; width: 40px; height: 40px; background: 0; border: 0; color: var(--fg-40); font-size: 15px; cursor: pointer; line-height: 1; border-radius: 50%; touch-action: manipulation; }
.aichat__teaser-x:hover, .aichat__teaser-x:focus-visible { color: var(--fg-100); background: var(--bg-3); }
@keyframes aichatTeaserIn { from { opacity: 0; transform: translateY(10px) scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .aichat__fab, .aichat__fab-ring, .aichat__teaser { animation: none; } }
.aichat__panel[hidden] { display: none; } /* перебивает display:flex ниже — иначе hidden не прячет */
.aichat__panel {
  position: absolute; right: 0; bottom: 72px; width: min(380px, calc(100vw - 36px));
  height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column;
  background: var(--bg-1); border: 1px solid var(--border-soft); border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px -16px rgba(0,0,0,.6);
}
.aichat__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border-soft); }
.aichat__title { font-family: var(--font-display); font-size: 16px; color: var(--fg-100); }
.aichat__close { width: 44px; height: 44px; margin: -10px -10px -10px 0; background: 0; border: 0; color: var(--fg-60); font-size: 16px; cursor: pointer; line-height: 1; border-radius: 50%; }
.aichat__close:hover, .aichat__close:focus-visible { color: var(--fg-100); background: var(--bg-3); }
.aichat__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.aichat__msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 15px; line-height: 1.5; }
.aichat__msg--bot { align-self: flex-start; background: var(--bg-3); color: var(--fg-100); border-bottom-left-radius: 4px; }
.aichat__msg--user { align-self: flex-end; background: var(--accent); color: var(--t-accent-fg, #14110a); border-bottom-right-radius: 4px; }
.aichat__msg--typing { opacity: .6; font-style: italic; }
.aichat__msg a { color:var(--accent);font-weight:650;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere; }
.aichat__msg--user a { color:inherit; }
.aichat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border-soft); background: var(--bg-2); }
.aichat__form input { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 999px; border: 1px solid var(--border-soft); background: var(--bg-1); color: var(--fg-100); font: inherit; font-size: 15px; }
.aichat__form input:focus { outline: none; border-color: var(--accent); }
.aichat__form button { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; background: var(--accent); color: var(--t-accent-fg, #14110a); display: flex; align-items: center; justify-content: center; }
@media (max-width: 480px) { .aichat { right: 12px; bottom: 12px; } .aichat__panel { bottom: 70px; } }
/* ИИ-продажник на лендинге Studio: тот же виджет, но гарантируем шрифт заголовка вне темы салона. */
.aichat--studio { --font-display: 'Fraunces', serif; }
.aichat--studio .aichat__title { letter-spacing: .01em; }

/* Соцсети салона — только заполненные (рендерит lib/social.js). flex-wrap → ничего не «уезжает». */
.social-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.social-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border-soft); color: var(--fg-80);
  transition: color .15s, border-color .15s, background .15s;
}
.social-ic:hover { color: var(--accent); border-color: var(--accent); background: rgba(128,128,128,.08); }
.social-ic svg { display: block; }
.site-footer .social-row { margin-top: 4px; }

/* Карта и блок контактов — равной высоты (stretch). Карта задаёт минимум 420px; если контактов
   больше — обе колонки растут вместе. Контакты распределяются space-between, не торчат. */
.contacts__grid { align-items: stretch; }
.contacts__map {
  position: relative;
  min-height: 420px;
  background: var(--bg-3);
}
.contacts__map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  filter: invert(0.92) hue-rotate(180deg) saturate(0.7);
}
@media (max-width: 899px) {
  .contacts__map, .contacts__map iframe { min-height: 320px; }
  .contacts__info { justify-content: flex-start; }
}

/* =====================================================================
   PWA INSTALL PROMO
   ===================================================================== */
.pwa-promo {
  background:
    radial-gradient(ellipse at 80% 20%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    var(--bg-0);
}
.pwa-promo__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  align-items: center;
}
@media (min-width: 900px) {
  .pwa-promo__grid { grid-template-columns: 1.1fr 1fr; }
}
.pwa-promo__copy h2 { margin-bottom: var(--s-4); }
.pwa-promo__bullets {
  list-style: none;
  padding: 0;
  margin: var(--s-5) 0 var(--s-7);
  display: grid;
  gap: var(--s-3);
}
.pwa-promo__bullets li {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  font-size: 15px;
  color: var(--fg-80);
}
.pwa-promo__bullets svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 3px;
}
/* Премиальный мокап телефона: титановая рамка, динамический остров, статус-бар,
   боковые кнопки, стеклянный блик, home-индикатор. Используется демо + всеми салонами. */
.pwa-promo__phone {
  position: relative;
  margin: 0 auto;
  width: 290px;
  aspect-ratio: 9/19.5;
  border-radius: 44px;
  /* металлическая грань: внешний тёмный кант + светлый рефлекс по краю */
  background:
    linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,0) 22%),
    linear-gradient(180deg, #2a2a2e, #0c0c0e);
  padding: 11px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 0 0 2px rgba(0,0,0,.6),
    0 50px 90px -24px rgba(0,0,0,0.75),
    0 24px 48px -24px color-mix(in srgb, var(--accent) 18%, transparent);
}
/* боковые кнопки (питание справа, громкость слева) */
.pwa-promo__phone::before,
.pwa-promo__phone::after {
  content: ""; position: absolute; border-radius: 4px; background: linear-gradient(180deg, #3a3a3e, #18181b);
}
.pwa-promo__phone::before { right: -3px; top: 120px; width: 3px; height: 64px; }            /* power */
.pwa-promo__phone::after  { left: -3px; top: 96px; width: 3px; height: 34px;                 /* volume up */
  box-shadow: 0 46px 0 0 #18181b, 0 46px 0 0 transparent; }
.pwa-promo__screen {
  width: 100%; height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--bg-0);
  position: relative;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5) inset;
}
/* стеклянный блик поверх экрана */
.pwa-promo__screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: linear-gradient(125deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 38%);
}
/* динамический остров */
.pwa-promo__island {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 26px; background: #000; border-radius: 99px; z-index: 5;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 10px;
}
.pwa-promo__island .cam { width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2b3b52, #05070b 70%); box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
/* статус-бар */
.pwa-promo__statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 48px; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px 0; font-size: 12px; font-weight: 600; color: var(--fg-100);
  font-feature-settings: 'tnum';
}
.pwa-promo__statusbar .ind { display: inline-flex; align-items: center; gap: 5px; }
.pwa-promo__statusbar .sig { width: 16px; height: 10px; border-radius: 2px;
  background: linear-gradient(90deg, var(--fg-100) 0 25%, color-mix(in srgb, var(--fg-100) 55%, transparent) 25% 50%, color-mix(in srgb, var(--fg-100) 40%, transparent) 50%); -webkit-mask: linear-gradient(#000 0 0); }
.pwa-promo__statusbar .wifi { width: 14px; height: 10px; background: currentColor; color: var(--fg-100);
  -webkit-mask: radial-gradient(circle at 50% 100%, #000 28%, transparent 30%); mask: radial-gradient(circle at 50% 100%, #000 28%, transparent 30%); opacity: .9; }
.pwa-promo__statusbar .bat { width: 22px; height: 11px; border: 1.5px solid color-mix(in srgb, var(--fg-100) 60%, transparent); border-radius: 3px; position: relative; }
.pwa-promo__statusbar .bat::before { content: ""; position: absolute; inset: 1.5px; width: 70%; background: var(--fg-100); border-radius: 1px; }
.pwa-promo__statusbar .bat::after { content: ""; position: absolute; right: -3px; top: 3px; width: 2px; height: 4px; background: color-mix(in srgb, var(--fg-100) 60%, transparent); border-radius: 0 1px 1px 0; }
/* home-индикатор */
.pwa-promo__home {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 5;
  width: 38%; height: 4px; border-radius: 99px; background: color-mix(in srgb, var(--fg-100) 70%, transparent);
}
.pwa-promo__app {
  height: 100%;
  background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--accent) 10%, var(--bg-1)) 0%, var(--bg-0) 60%);
  padding: 62px 22px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.pwa-promo__cards { margin-top: auto; width: 100%; display: grid; gap: 9px; }
.pwa-card { background: color-mix(in srgb, var(--fg-100) 6%, var(--bg-2)); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 13px 14px; text-align: left; backdrop-filter: blur(4px); }
.pwa-card__lbl { font-size: 10px; color: var(--fg-60); text-transform: uppercase; letter-spacing: 0.14em; }
.pwa-card__title { font-family: var(--font-display); font-size: 16px; margin-top: 5px; color: var(--fg-100); }
.pwa-card__when { font-size: 12px; color: var(--accent); margin-top: 3px; }
.pwa-card--row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.pwa-card__val { font-family: var(--font-display); color: var(--accent); font-size: 15px; }
.pwa-promo__app .icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-4);
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--t-accent-fg, #1A1408);
  font-style: italic;
  font-weight: 600;
  box-shadow: 0 12px 30px -6px color-mix(in srgb, var(--accent) 40%, transparent);
}
.pwa-promo__app .name {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--fg-100);
}
.pwa-promo__app .sub {
  font-size: 12px;
  color: var(--fg-60);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 4px;
}

.install-modal {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg-0) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-5);
}
.install-modal.is-open { display: flex; animation: lb-fade .3s var(--ease-out); }
.install-modal__panel {
  background: var(--bg-2);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-medium);
  max-width: 460px;
  width: 100%;
  padding: var(--s-7);
  position: relative;
  animation: lb-pop .35s var(--ease-spring);
}
.install-modal__close {
  position: absolute;
  top: var(--s-4); right: var(--s-4);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-60);
}
.install-modal__close:hover { color: var(--accent); background: var(--bg-3); }
.install-modal h3 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 500;
  margin: 0 0 var(--s-5);
  letter-spacing: -0.01em;
}
.install-modal ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--s-4);
  counter-reset: step;
}
.install-modal li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3);
  align-items: flex-start;
  font-size: 15px;
  color: var(--fg-80);
  counter-increment: step;
}
.install-modal li::before {
  content: counter(step);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-3);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-style: italic;
}
