/* ============================================================
   PANDABOOKING — общая дизайн-система (Mini App, клиентская часть)
   Тёмная тема. Передаётся в разработку как готовый набор токенов
   и компонентов. Точные цвета: #003d58 / #f96855 / #efefef.
   ============================================================ */

:root {
  /* ---- Поверхности ---- */
  --bg:          #003d58;   /* основной фон приложения */
  --bg-deep:     #00293c;   /* подложка вокруг экрана (вне Mini App) */
  --surface:     #0b4a66;   /* карточки */
  --surface-2:   #11577a;   /* карточки/инпуты повыше */
  --surface-glass: rgba(17, 87, 122, 0.45);
  --hairline:    rgba(157, 184, 198, 0.16);
  --hairline-2:  rgba(157, 184, 198, 0.28);

  /* ---- Текст ---- */
  --text:        #efefef;
  --muted:       #9db8c6;

  /* ---- Акцент ---- */
  --accent:      #f96855;
  --accent-press:#e2543f;
  --accent-soft: rgba(249, 104, 85, 0.14);
  --on-accent:   #efefef;

  /* ---- Статусы заявок ---- */
  --st-new:      #3b82f6;   /* Новая */
  --st-work:     #eab308;   /* В работе */
  --st-done:     #22c55e;   /* Завершено */
  --st-cancel:   #ef4444;   /* Отменена */

  /* ---- Форма ---- */
  --radius:      14px;
  --radius-sm:   12px;
  --radius-lg:   18px;
  --radius-pill: 999px;
  --shadow:      0 10px 30px rgba(0, 18, 28, 0.35);
  --shadow-soft: 0 6px 18px rgba(0, 18, 28, 0.28);

  --pad:         18px;
  --gap:         12px;

  --font: 'Manrope', 'Tilda Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Никакого горизонтального «таскания» страницы вбок на телефоне */
  overflow-x: hidden;
  max-width: 100%;
}

/* ----------------------------------------------------------
   Каркас экрана 390×844 (Telegram Mini App, iPhone-класс)
   ---------------------------------------------------------- */
.app {
  position: relative;
  width: 390px;
  min-height: 844px;
  margin: 0 auto;
  background:
    radial-gradient(130% 50% at 12% -8%, rgba(54, 192, 196, 0.30) 0%, rgba(54, 192, 196, 0) 52%),
    radial-gradient(120% 55% at 92% 4%, rgba(31, 142, 168, 0.34) 0%, rgba(31, 142, 168, 0) 55%),
    radial-gradient(150% 80% at 80% 108%, rgba(249, 104, 85, 0.16) 0%, rgba(249, 104, 85, 0) 50%),
    linear-gradient(180deg, #024b6b 0%, var(--bg) 30%, #00344c 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Тонкое зерно поверх фона — снимает «пластиковость» градиентов */
.app::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0;
  opacity: 0.32; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}
.app > * { position: relative; z-index: 1; }
/* sticky-панель и нижний док сохраняют собственные слои/прилипание */
@media (max-width: 430px) {
  .app { width: 100%; min-height: 100dvh; }
}

/* Контентная область со скроллом + место под нижнюю панель */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 var(--pad) calc(var(--pad) + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.screen::-webkit-scrollbar { width: 0; }

/* ---- iOS статус-бар (верхняя safe-area под «остров») ---- */
.statusbar {
  flex: none;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px 6px;
  color: var(--text);
  position: relative;
  z-index: 30;
  pointer-events: none;
}
.sb-time {
  font-size: 15.5px; font-weight: 800; letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  min-width: 54px;
}
.sb-ind { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.sb-ind svg { display: block; }

/* ---- Верхняя панель ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px var(--pad) 12px;
  background: linear-gradient(180deg, rgba(0,61,88,.96) 62%, rgba(0,61,88,0));
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
.topbar .back {
  width: 40px; height: 40px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--hairline-2);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px -8px rgba(0,18,28,.7), inset 0 1px 0 rgba(255,255,255,.07);
  transition: border-color .15s, transform .1s;
}
.topbar .back:hover { border-color: var(--accent); }
.topbar .back:active { transform: scale(.94); }
.topbar .ttl { font-size: 17px; font-weight: 700; letter-spacing: -.01em; flex: 1; min-width: 0; }
.topbar .ttl small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.topbar .link {
  color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none;
  padding: 8px 12px; border-radius: var(--radius-pill); background: var(--surface);
  border: 1px solid var(--hairline);
}

/* ---- Бренд / логотип ---- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
/* Логотип — круглая картинка (своя жёлтая окантовка), белая подложка не нужна */
.brand .panda {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0, 18, 28, .4), 0 0 22px rgba(54, 192, 196, .22);
}
.brand .panda svg { display: block; }
.brand .wm { font-weight: 800; letter-spacing: .02em; font-size: 19px; }
.brand .wm b { color: var(--accent); }

/* ---- Иконки (штриховой набор) ---- */
[data-icon] svg, .ico-inl svg { display: block; }
[data-icon] { display: inline-grid; place-items: center; color: currentColor; }
.ico-btn { width: 18px; height: 18px; }
.ico-btn svg { width: 18px; height: 18px; }
/* Бейдж-иконка в кружке (инфо/почта/предупреждение и т.п.) */
.ico-badge {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--muted);
}
.ico-badge svg { width: 20px; height: 20px; }
.ico-badge.accent { background: var(--accent-soft); color: var(--accent); }
.ico-badge.info   { background: rgba(59,130,246,.14); color: var(--st-new); }
.ico-badge.warn   { background: rgba(234,179,8,.14); color: var(--st-work); }
.ico-badge.danger { background: rgba(239,68,68,.14); color: var(--st-cancel); }

/* ---- Кнопки ---- */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius);
  font-family: inherit; font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: transform .1s ease, background .15s ease, opacity .15s ease;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn [data-icon] { color: currentColor; }

.btn-accent {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ff8068 0%, var(--accent) 48%, #ee5340 100%);
  color: var(--on-accent);
  box-shadow:
    0 10px 26px rgba(249, 104, 85, .4),
    0 1px 0 rgba(255, 255, 255, .28) inset,
    0 -8px 16px rgba(180, 40, 25, .18) inset;
}
/* мягкий диагональный блик */
.btn-accent::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .35), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  transition: left .5s ease;
}
.btn-accent:hover::after { left: 130%; }
.btn-accent:active { background: linear-gradient(135deg, #ee5340, var(--accent-press)); }

.btn-secondary {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0) 50%),
    var(--surface-2);
  color: var(--text);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.btn-secondary:hover { border-color: var(--hairline-2); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--hairline); }

.btn[disabled], .btn.is-disabled {
  background: var(--surface);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: .7;
  pointer-events: none;
}

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
/* Одиночная кнопка по центру (под основным рядом дока) */
.btn-row-center { display: flex; justify-content: center; }
.btn-row-center .btn { width: auto; min-width: 220px; padding: 0 28px; }
.btn-sm { min-height: 46px; font-size: 14px; }

/* ---- Нижняя закреплённая панель действий ---- */
.dock {
  position: sticky;
  bottom: 0;
  margin: 0 calc(-1 * var(--pad));
  padding: 12px var(--pad) calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(rgba(0, 61, 88, 0), var(--bg) 32%);
  display: flex; flex-direction: column; gap: 10px;
}

/* ---- Карточки ---- */
.card {
  position: relative;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 40%),
    var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    var(--shadow-soft);
}
.card-pad { padding: 16px; }

/* Карточка-кнопка услуги */
.svc {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  padding: 14px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 42%),
    var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  color: var(--text);
  cursor: pointer; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), var(--shadow-soft);
  transition: transform .14s ease, border-color .15s, box-shadow .2s;
}
.svc:active { transform: scale(.99); }
.svc:hover {
  border-color: rgba(249, 104, 85, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 26px rgba(0, 18, 28, .4), 0 0 0 1px rgba(249, 104, 85, .12);
}
.svc:hover .chev { color: var(--accent); transform: translateX(2px); }
.svc .chev { transition: color .15s, transform .15s; }
/* Иллюстрация-«открытка» достопримечательности (рендер из JS: pbSceneSvg) */
.scene {
  flex: none;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #063145;
  border: 1px solid rgba(157, 184, 198, .22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 0 0 1px rgba(255, 255, 255, .04),
    0 6px 16px rgba(0, 18, 28, .34);
}
/* лёгкий стеклянный блик поверх сцены */
.scene::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 42%);
  pointer-events: none;
}
.scene svg { display: block; width: 100%; height: 100%; }
/* Загруженная картинка-иконка (услуга/город) заполняет контейнер */
.art-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.svc .scene { width: 58px; height: 58px; }
.svc .body { flex: 1; min-width: 0; }
.svc .name { font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; }
.svc .meta { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.svc .meta svg { width: 13px; height: 13px; flex: none; opacity: .8; }
.svc .price { font-weight: 800; font-size: 15px; color: var(--accent); margin-top: 7px; }
.svc .chev { color: var(--muted); width: 22px; height: 22px; flex: none; display: grid; place-items: center; }
.svc .chev svg { width: 20px; height: 20px; }

/* ---- Чипы статусов ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-new    { color: var(--st-new);    background: rgba(59, 130, 246, .14);  border-color: rgba(59, 130, 246, .3); }
.chip-work   { color: var(--st-work);   background: rgba(234, 179, 8, .14);   border-color: rgba(234, 179, 8, .3); }
.chip-done   { color: var(--st-done);   background: rgba(34, 197, 94, .14);   border-color: rgba(34, 197, 94, .3); }
.chip-cancel { color: var(--st-cancel); background: rgba(239, 68, 68, .14);   border-color: rgba(239, 68, 68, .3); }

/* ---- Заголовки секций ---- */
.section-label {
  display: flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 22px 2px 12px;
}
.section-label::before {
  content: ""; width: 16px; height: 2px; border-radius: 2px; flex: none;
  background: linear-gradient(90deg, var(--accent), rgba(249, 104, 85, 0));
}
.h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.lead { color: var(--muted); font-size: 14.5px; }

/* ---- Поля ввода ---- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 2px 7px; }
.input {
  width: 100%; min-height: 50px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--text); font-family: inherit; font-size: 15.5px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: rgba(157, 184, 198, .6); }

/* ---- Чекбокс ---- */
.check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 24px; height: 24px; flex: none; margin-top: 1px;
  border-radius: 7px; border: 2px solid var(--hairline-2);
  display: grid; place-items: center;
  background: var(--surface-2);
  transition: background .15s, border-color .15s;
}
.check .box svg { width: 14px; height: 14px; opacity: 0; transform: scale(.6); transition: .15s; }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .box svg { opacity: 1; transform: scale(1); }
.check .txt { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.check .txt a { color: var(--accent); font-weight: 700; text-decoration: underline; }

/* ---- Степпер ---- */
.stepper { display: inline-flex; align-items: center; gap: 0; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.stepper button {
  width: 52px; height: 50px; border: 0; background: transparent; color: var(--text);
  font-size: 24px; font-weight: 600; cursor: pointer; transition: background .12s;
}
.stepper button:active { background: var(--surface); }
.stepper button[disabled] { color: var(--muted); opacity: .45; cursor: not-allowed; }
.stepper .val { min-width: 46px; text-align: center; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---- Календарь ---- */
.cal { background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head .m { font-weight: 800; font-size: 15px; text-transform: capitalize; }
.cal-nav { display: flex; gap: 8px; }
.cal-nav button {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--hairline);
  background: var(--surface); color: var(--text); font-size: 16px; cursor: pointer;
}
.cal-nav button[disabled] { opacity: .35; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: transparent; color: var(--text);
  border: 1px solid transparent;
  cursor: pointer; transition: background .12s, color .12s;
}
.cal-day.empty { visibility: hidden; }
.cal-day:hover:not(.blocked):not(.sel) { background: var(--surface); }
.cal-day.blocked { color: rgba(157, 184, 198, .35); text-decoration: line-through; cursor: not-allowed; }
.cal-day.sel {
  background: linear-gradient(140deg, #ff8068, var(--accent));
  color: var(--on-accent); font-weight: 800;
  box-shadow: 0 4px 14px rgba(249, 104, 85, .5), 0 0 0 1px rgba(255, 255, 255, .15) inset;
  transform: scale(1.04);
}
.cal-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 11.5px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; }

/* ---- Строка "Итого" ---- */
.total-row {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; margin-top: 14px; min-height: 64px;
  background:
    radial-gradient(120% 200% at 100% 0%, rgba(249, 104, 85, .22), rgba(249, 104, 85, 0) 60%),
    var(--accent-soft);
  border: 1px solid rgba(249, 104, 85, .35);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.total-row .lbl { font-size: 14px; font-weight: 700; color: var(--text); }
.total-row .sum { font-size: 24px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap; }

/* ---- Хелпер-подсказка ---- */
.hint { font-size: 12.5px; color: var(--muted); margin: 8px 2px 0; }
.hint.warn { color: var(--st-work); }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  max-width: 340px; width: calc(100% - 36px);
  background: #06303f; color: var(--text);
  border: 1px solid var(--hairline-2); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
  font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Модалка ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 18, 28, .6); backdrop-filter: blur(3px);
  display: none; align-items: flex-end; justify-content: center; z-index: 150;
}
.modal-overlay.show { display: flex; }
.modal {
  width: 100%; max-width: 390px;
  background: var(--surface); border-top-left-radius: 22px; border-top-right-radius: 22px;
  border: 1px solid var(--hairline); border-bottom: 0;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow);
  animation: sheet-up .26s cubic-bezier(.2, .8, .2, 1);
}
.modal h3 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.modal p { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.modal .grip { width: 40px; height: 4px; border-radius: 4px; background: var(--hairline-2); margin: -8px auto 16px; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ---- Утилиты ---- */
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.stack > * + * { margin-top: 10px; }
.spacer { flex: 1; }
.mt-auto { margin-top: auto; }
.center { text-align: center; }

/* ============================================================
   Пикер иконок (админка). Используется на экране 08 и в модалке
   создания/редактирования услуги. Самодостаточный компонент.
   ============================================================ */
.icon-picker { display: flex; flex-direction: column; min-height: 0; }

.ip-search { position: relative; margin-bottom: 14px; }
.ip-search-ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}
.ip-search-ico svg { width: 18px; height: 18px; }
.ip-input {
  width: 100%; height: 46px; padding: 0 14px 0 42px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  font: inherit; font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.ip-input::placeholder { color: var(--muted); }
.ip-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.ip-scroll { overflow-y: auto; min-height: 0; padding-right: 2px; }
.ip-scroll::-webkit-scrollbar { width: 8px; }
.ip-scroll::-webkit-scrollbar-thumb { background: var(--hairline-2); border-radius: 999px; }

.ip-group {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 16px 2px 10px; display: flex; align-items: center; gap: 9px;
}
.ip-group::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.ip-group:first-child { margin-top: 2px; }

.ip-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px;
}
.ip-cell {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 6px 9px; cursor: pointer; text-align: center;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); color: var(--text);
  transition: transform .14s, border-color .14s, background .14s, box-shadow .14s;
}
.ip-cell:hover { transform: translateY(-2px); border-color: var(--hairline-2); background: var(--surface-2); }
.ip-cell:active { transform: translateY(0) scale(.97); }
.ip-glyph {
  width: 26px; height: 26px; color: var(--text);
  display: grid; place-items: center; transition: color .14s;
}
.ip-glyph svg { width: 26px; height: 26px; }
.ip-name {
  font-size: 10.5px; line-height: 1.2; font-weight: 600; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.ip-cell.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 22px -10px var(--accent);
}
.ip-cell.selected .ip-glyph { color: var(--accent); }
.ip-cell.selected .ip-name { color: var(--text); }

/* ---- Способы оплаты (карта ₽) ---- */
.pay-methods { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pay-method {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--radius-md, 14px);
  background: var(--surface);
  border: 1px solid var(--hairline);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method .pm-ic {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--hairline);
  transition: color .15s, background .15s, border-color .15s;
}
.pay-method .pm-ic svg { width: 22px; height: 22px; }
.pay-method .pm-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pay-method .pm-txt b { font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.pay-method .pm-txt small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.pay-method .pm-amt {
  font-size: 13px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  padding-right: 24px;
}
.pay-method .pm-dot {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--hairline-2); transition: border-color .15s, background .15s;
}
.pay-method.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 30px -16px var(--accent);
}
.pay-method.is-active .pm-ic { color: var(--accent); background: rgba(249,104,85,.12); border-color: rgba(249,104,85,.4); }
.pay-method.is-active .pm-dot { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 42%, transparent 46%); }
.ip-empty { color: var(--muted); text-align: center; padding: 40px 0; font-size: 14px; }

/* ============================================================
   Контекст «сайт» (браузер, вне Telegram). Веб-шапка + адаптивная
   подача экрана: на ПК — карточка-устройство по центру, на телефоне
   — во весь экран. В Telegram (data-pb-ctx="tg") всё это скрыто.
   ============================================================ */
[data-pb-ctx="site"] .statusbar { display: none; }

body.has-web-header {
  display: flex; flex-direction: column;
  min-height: 100dvh;
  background:
    radial-gradient(90% 60% at 50% -10%, rgba(31,147,192,.16), transparent 60%),
    radial-gradient(70% 50% at 50% 110%, rgba(249,104,85,.08), transparent 60%),
    var(--bg-deep);
}

.web-header {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 22px;
  background: rgba(0, 41, 60, .82);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--hairline);
}
.wh-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.wh-panda {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0,18,28,.4), 0 0 18px rgba(54,192,196,.22);
}
.wh-wm { font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.wh-wm b { color: var(--accent); }
.wh-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wh-link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 700;
  padding: 9px 12px; border-radius: 11px; transition: color .14s, background .14s;
}
.wh-link svg { width: 17px; height: 17px; }
.wh-link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.wh-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 16px; border-radius: 12px;
  font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.wh-btn svg { width: 16px; height: 16px; }
.wh-btn.ghost { color: var(--text); border: 1px solid var(--hairline-2); background: rgba(255,255,255,.03); }
.wh-btn.ghost:hover { border-color: var(--accent); }
.wh-btn.accent {
  color: var(--on-accent);
  background: linear-gradient(135deg, #ff8068, var(--accent));
  box-shadow: 0 10px 26px -10px rgba(249,104,85,.6);
}
.wh-btn.accent:hover { filter: brightness(1.05); }
.wh-burger {
  display: none; width: 42px; height: 42px; flex: none; margin-left: auto;
  border-radius: 11px; background: var(--surface-2); border: 1px solid var(--hairline);
  color: var(--text); cursor: pointer; place-items: center;
}
.wh-burger svg { width: 20px; height: 20px; }

/* Подвал сайта по умолчанию скрыт — показывается только на ПК-сайте (ниже). */
.web-footer { display: none; }

/* На сайте (есть верхняя веб-шапка) внутристраничная «шапка» главной дублирует
   её — скрываем, оставляя один общий хедер. В Telegram (без .has-web-header)
   веб-шапки нет, поэтому там home-head остаётся как заголовок экрана. */
body.has-web-header[data-pb-page="index.html"] .home-head { display: none; }

/* ============================================================
   ПК/планшет-сайт (вне Telegram): НАСТОЯЩАЯ широкая раскладка.
   Раньше экран показывался «телефоном-карточкой» по центру; теперь
   контент занимает страницу по-десктопному (центрированный контейнер,
   списки — сеткой). Телефон-сайт (≤640) и Telegram Mini App (там нет
   класса .has-web-header) остаются мобильными — «как на телефоне».
   Имя страницы берётся из body[data-pb-page] (выставляет js/app.js).
   ============================================================ */
@media (min-width: 641px) {
  /* Страница листается целиком (а не внутренний скролл «телефона») */
  body.has-web-header { height: auto; }

  /* .app перестаёт быть телефоном — это обычный контентный контейнер,
     который занимает по высоте ровно столько, сколько нужно контенту
     (на телефоне он растягивался на весь экран — на ПК это давало пустоту). */
  body.has-web-header .app {
    width: 100%;
    max-width: 1160px;
    height: auto;
    min-height: 0;
    margin: 0 auto;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }
  body.has-web-header .app::before { display: none; }  /* «зерно» фона телефона не нужно */

  /* Распорка, которая на телефоне прижимала док к низу экрана, на ПК не нужна */
  body.has-web-header .spacer { display: none; }

  body.has-web-header .screen {
    overflow: visible;
    padding: 6px 40px 56px;
  }

  /* Внутри-экранная панель (стрелка назад + заголовок) — обычная широкая строка */
  body.has-web-header .topbar {
    position: static;
    background: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    padding: 26px 0 8px;
  }
  body.has-web-header .topbar .ttl { font-size: 27px; letter-spacing: -.02em; }
  body.has-web-header .topbar .ttl small { font-size: 13px; }
  body.has-web-header .home-head { padding: 24px 0 8px; }
  body.has-web-header .home-head .wm { font-size: 22px; }

  /* Нижний док действий больше не «прилипает» — обычный блок во всю ширину
     контентной колонки (совпадает с шириной календаря/карточек над ним). */
  body.has-web-header .dock {
    position: static;
    margin: 28px 0 0;
    padding: 0;
    background: none;
  }
  /* Где в доке только вторичные кнопки (главная/услуги/мои брони) — не растягиваем
     их на всю широкую страницу: держим компактно и по центру. */
  body.has-web-header[data-pb-page="index.html"] .dock,
  body.has-web-header[data-pb-page="services.html"] .dock,
  body.has-web-header[data-pb-page="my.html"] .dock {
    max-width: 520px;
    margin: 28px auto 0;
  }

  /* ---- Главная: направления и преимущества — сеткой ---- */
  body.has-web-header[data-pb-page="index.html"] #cities {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px;
  }
  body.has-web-header[data-pb-page="index.html"] #cities .city { margin-bottom: 0; min-height: 210px; }
  body.has-web-header[data-pb-page="index.html"] #cities .cities-2 { display: contents; }

  /* ---- Списки услуг / броней — адаптивная сетка карточек вместо столбца ---- */
  body.has-web-header[data-pb-page="services.html"] #list,
  body.has-web-header[data-pb-page="my.html"] #list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 16px; align-items: start;
  }
  /* Карточки услуг в одном ряду — одной высоты, цена прижата к низу (на одной линии) */
  body.has-web-header[data-pb-page="services.html"] #list { align-items: stretch; }
  body.has-web-header[data-pb-page="services.html"] #list .svc { align-items: stretch; }
  body.has-web-header[data-pb-page="services.html"] #list .svc .scene,
  body.has-web-header[data-pb-page="services.html"] #list .svc .chev { align-self: center; }
  body.has-web-header[data-pb-page="services.html"] #list .svc .body { display: flex; flex-direction: column; }
  body.has-web-header[data-pb-page="services.html"] #list .svc .price { margin-top: auto; padding-top: 7px; }
  body.has-web-header[data-pb-page="services.html"] #list > * + *,
  body.has-web-header[data-pb-page="my.html"] #list > * + * { margin-top: 0; }

  /* ---- Бронирование: читаемая колонка по центру ---- */
  body.has-web-header[data-pb-page="booking.html"] .app { max-width: 720px; }
  body.has-web-header[data-pb-page="booking.html"] .cal-day { font-size: 15px; }

  /* ---- Статусные экраны — узкая центральная карточка ---- */
  body.has-web-header[data-pb-page="success.html"] .app,
  body.has-web-header[data-pb-page="error.html"] .app { max-width: 560px; }

  /* ---- Чат: центрированная высокая панель с внутренним скроллом ---- */
  body.has-web-header[data-pb-page="chat.html"] .app {
    max-width: 760px;
    height: calc(100dvh - 64px - 48px);
    min-height: 0;
    margin: 24px auto;
    background: var(--bg);
    border: 1px solid var(--hairline-2);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 40px 100px -50px rgba(0,8,14,.9);
  }
  body.has-web-header[data-pb-page="chat.html"] .topbar { position: sticky; padding: 14px var(--pad); }
  body.has-web-header[data-pb-page="chat.html"] .msg { max-width: 66%; }

  /* «Прижатый» подвал: контент растёт и толкает подвал вниз, короткие
     страницы перестают обрываться пустотой. Чат — фикс. высоты, не растёт. */
  body.has-web-header .app { flex: 1 0 auto; }
  body.has-web-header[data-pb-page="chat.html"] .app { flex: none; }

  .web-footer { display: block; }
  .wf-inner {
    max-width: 1160px; margin: 0 auto; padding: 24px 40px;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  }
  .wf-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
  .wf-brand .wh-panda { width: 32px; height: 32px; }
  .wf-brand .wh-wm { font-size: 16px; font-weight: 800; }
  .wf-brand .wh-wm b { color: var(--accent); }
  .wf-tag { color: var(--muted); font-size: 13px; font-weight: 600; }
  .wf-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
  .wf-links a { color: var(--muted); font-size: 13.5px; font-weight: 700; text-decoration: none; transition: color .14s; }
  .wf-links a:hover { color: var(--text); }
  .wf-copy { color: var(--muted); font-size: 12.5px; opacity: .8; width: 100%; }
}

/* Широкий десктоп — больше воздуха по бокам */
@media (min-width: 1000px) {
  body.has-web-header .screen { padding-left: 56px; padding-right: 56px; }
}
/* Телефон-сайт: во весь экран, выпадающее меню по бургеру */
@media (max-width: 760px) {
  .web-header .wh-burger { display: grid; }
  .web-header .wh-nav {
    position: absolute; top: 64px; right: 12px; left: 12px;
    flex-direction: column; align-items: stretch; gap: 6px; padding: 12px;
    background: var(--surface); border: 1px solid var(--hairline-2);
    border-radius: 16px; box-shadow: var(--shadow); display: none;
  }
  .web-header .wh-nav.open { display: flex; }
  .web-header .wh-link, .web-header .wh-btn { width: 100%; justify-content: center; height: 46px; }
}
@media (max-width: 640px) {
  body.has-web-header .app { width: 100%; max-width: none; min-height: calc(100dvh - 64px); }
}

/* ============================================================
   Веб-авторизация (Вход / Регистрация) — site-only экраны.
   ============================================================ */
.auth-wrap {
  flex: 1; display: grid; place-items: center;
  padding: 40px 20px calc(40px + env(safe-area-inset-bottom, 0px));
}
.auth-card {
  width: 100%; max-width: 420px;
  background:
    linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,0) 42%),
    var(--surface);
  border: 1px solid var(--hairline-2); border-radius: 22px;
  padding: 32px 28px; box-shadow: 0 44px 110px -44px rgba(0,8,14,.92);
}
.auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-bottom: 24px; }
.auth-brand .panda { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 10px 28px rgba(0,18,28,.4), 0 0 22px rgba(54,192,196,.24); }
.auth-brand .wm { font-size: 21px; font-weight: 800; }
.auth-brand .wm b { color: var(--accent); }
.auth-brand .sub { font-size: 13px; color: var(--muted); font-weight: 600; }
.auth-card .btn { margin-top: 6px; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 18px; }
.auth-alt a { color: var(--accent); font-weight: 700; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
