/* ============================================================
   godnailz — Telegram Mini App
   Тёплый минимализм: нейтральный off-white, near-black текст,
   плоские чёрные кнопки, сдержанные пастели (без жёлтого),
   без градиентов. Bricolage Grotesque + Hanken Grotesk.
   Только светлая тема (единый бренд-вид).
   ============================================================ */

:root {
  /* нейтрали БЕЗ желтизны/песка — прохладный оттенок (B ≥ R) */
  --bg-rgb:      244, 242, 246;
  --bg:          rgb(var(--bg-rgb));
  --bg-sink-rgb: 234, 231, 238;
  --bg-sink:     rgb(var(--bg-sink-rgb));
  --surface:     #FFFFFF;
  --surface-2:   #F7F6FA;
  --sel-fill:    #F6F1F8;   /* фон выбранной услуги */

  --ink:         #1A191E;
  --ink-2:       #555159;
  --ink-3:       #6B6773;   /* muted-текст, ≥4.5:1 и на bg, и на белом */
  --line:        #E7E3EC;
  --line-2:      #D9D4E1;

  /* сдержанные пастели — точки категорий (--d-*) и пустые состояния (--c-lilac), без жёлтого */
  --c-lilac:  #E7DFF6;  --d-lilac:  #C4B2E8;
  --d-rose:   #E3A2BC;
  --d-sky:    #A4C2DF;
  --d-sage:   #AAC59B;
  --d-peri:   #ADB4E6;

  --accent:      #E2725B;   /* акцент фокуса (клавиатурная навигация) */
  --danger:      #C4443A;

  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 30px;
  --r-full: 999px;

  --sh-2: 0 10px 30px rgba(27, 26, 23, .12);
  --sh-3: 0 -12px 44px rgba(27, 26, 23, .14);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: 220ms;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --font-body: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bricolage Grotesque', var(--font-body);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100dvh; }

/* видимый фокус для клавиатурной навигации на всех интерактивных элементах */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}
.viewer :focus-visible { outline-color: #fff; }
[inert] { pointer-events: none; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
  letter-spacing: -0.01em;
}
button { font: inherit; color: inherit; }
svg { display: block; }

.app { max-width: 620px; margin: 0 auto; padding-bottom: 0; }

/* ---------- boot ---------- */
.boot { min-height: 74dvh; display: grid; place-content: center; justify-items: center; gap: 18px; text-align: center; }
.boot__mark { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -.02em; }
.boot__spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hero (обложка меняется мастером) ---------- */
/* full-bleed: без отступов от краёв, скругление только снизу */
.hero {
  position: relative; margin: 0; min-height: 220px;
  border-radius: 0 0 var(--r-xl) var(--r-xl); overflow: hidden; display: flex; align-items: flex-end;
  padding: calc(var(--safe-t) + 26px) 22px 22px;
}
.hero--plain { background: var(--c-lilac); }
.hero--photo {
  background-image: linear-gradient(to top, rgba(15,10,20,.62), rgba(15,10,20,.12) 52%, rgba(15,10,20,.22)), var(--cover);
  background-size: cover, cover; background-position: center;
}
.hero__content { position: relative; z-index: 1; width: 100%; }
.hero__row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.hero__name { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 9vw, 44px); line-height: .98; letter-spacing: -.03em; color: var(--ink); }
.hero--photo .hero__name { color: #fff; }
.hero__badges { flex: none; display: flex; gap: 9px; }
.hero__ic {
  width: 40px; height: 40px; flex: none; display: grid; place-content: center;
  border-radius: 50%; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; transition: transform var(--dur) var(--ease);
}
.hero__ic:active { transform: scale(.9); }
.hero__ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* оптическое центрирование «плоскости» Telegram внутри круга (масса смещена — двигаем влево) */
.hero__ic--tg svg { transform: translate(-1.5px, 0.5px); }
.hero--photo .hero__ic { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* ---------- sections ---------- */
.section { padding: 0 22px; margin-top: 24px; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.section__title { font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: -.02em; }

/* панель-«меню» услуг: отдельный тон + скругление сверху — разрывает ритм с галереей */
.menu {
  margin-top: 34px; padding: 28px 0 24px;
  background: var(--bg-sink); border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.menu .section__title { font-size: 24px; }

/* ---------- portfolio strip ---------- */
/* margin компенсирует padding секции (0 22px), а padding возвращает отступ 22px у краёв ленты */
.gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 22px; padding: 2px 22px 6px; margin: 0 -22px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery::-webkit-scrollbar { display: none; }
.gallery__item {
  scroll-snap-align: start; flex: 0 0 auto; width: 62%; max-width: 240px; aspect-ratio: 4 / 5;
  border-radius: 24px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line);
  position: relative; cursor: pointer; padding: 0;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: opacity var(--dur) var(--ease); }
.gallery__item:active img { opacity: .85; }

.gallery__all {
  scroll-snap-align: start; flex: 0 0 auto; width: 42%; max-width: 170px; align-self: stretch;
  border-radius: 24px; background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--ink); transition: transform var(--dur) var(--ease);
}
.gallery__all:active { transform: scale(.97); }
.gallery__all-arr { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-content: center; }
.gallery__all-arr svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gallery__all-t { font-weight: 600; font-size: 14px; }

.gallery-empty {
  flex: 0 0 84%; scroll-snap-align: start; aspect-ratio: 16/10; display: grid; place-content: center; text-align: center;
  padding: 24px; background: var(--c-lilac); border-radius: var(--r-lg); cursor: default;
}
.gallery-empty .empty__title { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 5px; }
.gallery-empty .empty__text { font-size: 13.5px; color: var(--ink-2); }

/* ---------- badges ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-block; max-width: 100%; font-size: 11.5px; font-weight: 600; line-height: 1.35;
  padding: 5px 9px; border-radius: var(--r-full); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  background: var(--bg-sink); color: var(--ink-2);
}
.badge--over { background: rgba(255,255,255,.95); color: var(--ink); box-shadow: 0 1px 5px rgba(27,26,23,.18); }
.badge--more { background: rgba(27,26,25,.85); color: #fff; }
/* компактная строка тегов на плитке — всегда в одну строку */
.badge-strip { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; }
/* радиус 16 = радиус плитки(24) − отступ(8): угол бейджа концентричен углу плитки */
.badge-strip .badge { padding: 9px 13px; border-radius: 16px; }
.badge-strip .badge--over { flex: 0 1 auto; min-width: 0; }
.badge-strip .badge--more { flex: none; }

/* ---------- price list ---------- */
.cat { margin-top: 22px; }
.cat__title { display: flex; align-items: center; gap: 10px; padding: 0 22px; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.cat__dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.cat--0 .cat__dot { background: var(--d-lilac); }
.cat--1 .cat__dot { background: var(--d-rose); }
.cat--2 .cat__dot { background: var(--d-sage); }
.cat--3 .cat__dot { background: var(--d-sky); }
.cat--4 .cat__dot { background: var(--d-peri); }

.cat:first-child { margin-top: 4px; }
.list { margin-top: 12px; padding: 0 22px; display: flex; flex-direction: column; gap: 10px; }

.srv {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 13px 13px 13px 17px;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.srv.is-selected { border-color: var(--ink); background: var(--sel-fill); }
.srv.is-inactive { opacity: .5; }

.srv__body { display: flex; align-items: center; gap: 12px; min-width: 0; background: none; border: none; padding: 0; text-align: left; cursor: pointer; transition: opacity var(--dur) var(--ease); }
.srv__body:active { opacity: .6; }
.srv__text { min-width: 0; flex: 1; }
.srv__title { font-weight: 600; font-size: 16px; line-height: 1.28; letter-spacing: -.01em; }
.srv__price-line { margin-top: 6px; display: flex; align-items: baseline; gap: 5px; }
.srv__amount { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.srv__from { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.srv__unit { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.srv__thumbs { display: flex; margin-left: 4px; }
.srv__thumbs img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; border: 2px solid var(--surface); margin-left: -8px; }
.srv__thumbs img:first-child { margin-left: 0; }
.srv__chev { flex: none; width: 18px; height: 18px; color: var(--ink-3); }
.srv__chev svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.srv__badge-off { display: inline-block; margin-top: 7px; font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--bg-sink); padding: 2px 8px; border-radius: var(--r-full); }

.srv__toggle {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-content: center;
  background: var(--bg-sink); border: 1.5px solid var(--line-2); color: var(--ink);
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.srv__toggle:active { transform: scale(.86); }
.srv__toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.srv.is-selected .srv__toggle { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  font-weight: 600; border: none; border-radius: var(--r-full); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--ink); color: #fff;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--book { width: 100%; height: 56px; font-size: 16.5px; letter-spacing: -.01em; }
.btn--outline { background: var(--surface); color: var(--ink); border: 1.5px solid var(--ink); }

/* ---------- estimate / booking bar ---------- */
/* фон уходит в прозрачность вверх — контент мягко исчезает под плашкой */
.booking-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: 620px; margin: 0 auto; padding: 30px 8px calc(8px + var(--safe-b));
  background: linear-gradient(to top, var(--bg-sink) 60%, rgba(var(--bg-sink-rgb), 0) 100%);
  pointer-events: none;
}
.booking-bar > * { pointer-events: auto; }
.estimate {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 14px 16px; box-shadow: var(--sh-2);
}
.estimate__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.estimate__count { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.estimate__clear { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: none; color: var(--ink-3); font-size: 12.5px; font-weight: 600; padding: 4px 2px; min-height: 44px; }
.estimate__clear:active { color: var(--ink); }
.estimate__clear svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.estimate__total { font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 5px 0 13px; }
.estimate__total small { font-size: 14px; color: var(--ink-3); font-weight: 600; }

/* ---------- bottom sheet ---------- */
.sheet, .screen { position: fixed; inset: 0; z-index: 60; }
.sheet[hidden], .screen[hidden] { display: none; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(27, 26, 23, .44); animation: fade 280ms var(--ease); }
/* плавающий лист — уже краёв, все углы скруглены, «карточный» язык */
.sheet__panel {
  position: absolute; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); margin: 0 auto; max-width: 604px;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-3);
  max-height: 90dvh; overflow-y: auto; padding-bottom: 0;
  animation: rise 380ms var(--ease);
}
/* футер попапа: кнопки прибиты к низу, контент скроллится над ними */
.sheet-footer {
  position: sticky; bottom: 0; z-index: 2;
  margin: 18px -22px 0; padding: 14px 22px 16px;
  background: var(--surface);
}
/* мягкое затухание контента над кнопкой — текст не обрывается резко */
.sheet-footer::before {
  content: ''; position: absolute; left: 0; right: 0; top: -26px; height: 26px;
  background: linear-gradient(to top, var(--surface), rgba(255, 255, 255, 0)); pointer-events: none;
}
@keyframes rise { from { transform: translateY(calc(100% + 16px)); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet__panel:focus { outline: none; }
.sheet__handle { position: sticky; top: 0; z-index: 2; display: block; width: 100%; padding: 12px 0 8px; background: var(--surface); border: none; cursor: pointer; }
.sheet__handle::before { content: ''; display: block; width: 42px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 0 auto; }
.sheet__body { padding: 4px 22px 0; }

.detail__hero { margin: 14px 0 2px; }
.detail__photos { display: flex; gap: 10px; overflow-x: auto; padding: 0; scroll-snap-type: x mandatory; scrollbar-width: none; }
.detail__photos::-webkit-scrollbar { display: none; }
/* квадратная рамка во всю ширину блока; несколько фото — свайп-карусель */
.detail__photos img { scroll-snap-align: start; flex: 0 0 100%; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--line); }
.detail__title { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.detail__price { margin-top: 16px; display: flex; align-items: baseline; gap: 6px; }
.detail__price .a { font-weight: 700; font-size: 21px; font-variant-numeric: tabular-nums; }
.detail__price .u { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.detail__desc { margin-top: 14px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.detail__cta .btn { width: 100%; height: 56px; font-size: 16.5px; }

.detail-empty { margin: 14px 0 0; border-radius: var(--r-lg); background: var(--c-lilac); padding: 26px 22px; text-align: center; }
.detail-empty__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.detail-empty__text { font-size: 13.5px; color: var(--ink-2); }

/* ---------- booking confirmation ---------- */
.book { padding-top: 6px; }
.book__title { font-family: var(--font-display); font-weight: 700; font-size: 25px; letter-spacing: -.02em; }
.book__list { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.book__row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; font-size: 15px; }
.book__row-t { color: var(--ink); }
.book__row-p { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.book__total { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.book__total span { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.book__total b { font-family: var(--font-display); font-weight: 700; font-size: 23px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.book__steps { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.book__step { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--ink-2); }
.book__num { flex: none; width: 23px; height: 23px; border-radius: 50%; background: var(--bg-sink); color: var(--ink); font-weight: 700; font-size: 12.5px; display: grid; place-content: center; }
.book__msg { margin-top: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 15px; font-size: 14px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; user-select: text; -webkit-user-select: text; }
.book__msg::selection { background: var(--d-lilac); }
.book__note { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--ink-2); text-align: center; }
.book__actions .btn--book { width: 100%; }
.btn.is-done { background: var(--ink); opacity: .9; }
.btn--ghost2 { margin-top: 10px; width: 100%; height: 46px; background: transparent; color: var(--ink-2); border: none; font-size: 14.5px; font-weight: 600; }
.btn--ghost2:active { color: var(--ink); }

/* ---------- fullscreen gallery (Pinterest-like) ---------- */
.screen { background: var(--bg); overflow-y: auto; animation: screenIn 300ms var(--ease); }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.screen__bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-t) + 14px) 18px 12px; background: var(--bg);
}
.screen__back {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-content: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  transition: transform var(--dur) var(--ease);
}
.screen__back:active { transform: scale(.9); }
.screen__back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.screen__title { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }

.pin-grid { column-count: 2; column-gap: 12px; padding: 4px 18px 40px; }
.pin-item { display: block; width: 100%; padding: 0; break-inside: avoid; margin-bottom: 12px; border-radius: 24px; overflow: hidden; position: relative; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.pin-item img { width: 100%; display: block; transition: opacity var(--dur) var(--ease); }
.pin-item:active img { opacity: .85; }

/* photo viewer (single work fullscreen) */
.viewer { background: #0E0D0C; }
.viewer .screen__bar { background: transparent; }
.viewer .screen__back { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; }
.viewer__wrap { min-height: 100dvh; display: flex; flex-direction: column; }
.viewer__img { flex: 1; display: grid; place-items: center; padding: 0 8px; }
.viewer__img img { max-width: 100%; max-height: 74dvh; border-radius: var(--r-md); object-fit: contain; }
.viewer__tags { padding: 16px 18px calc(26px + var(--safe-b)); }
.viewer__tags .label { color: rgba(255,255,255,.82); font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
.viewer__tags .badge { background: rgba(255,255,255,.14); color: #fff; font-size: 13px; padding: 7px 12px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--barh, 86px) + var(--safe-b) + 22px); transform: translateX(-50%);
  z-index: 90; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-full);
  font-size: 14px; font-weight: 500; box-shadow: var(--sh-2); max-width: 90%; text-align: center;
}
.toast.is-error { background: var(--danger); }

/* ---------- corner smoothing (squircle) — только для скруглённых ПРЯМОУГОЛЬНИКОВ ---------- */
@supports (corner-shape: squircle) {
  .hero, .menu, .srv, .gallery__item, .gallery__all, .pin-item, .estimate, .sheet__panel,
  .detail-empty, .gallery-empty, .book__msg, .viewer__img img,
  .detail__photos img, .srv__thumbs img, .badge-strip .badge {
    corner-shape: squircle;
  }
}

/* ---------- мягкое появление контента ---------- */
.hero { animation: reveal 420ms var(--ease) both; }
.reveal { animation: reveal 460ms var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
/* появление нижней плашки при смене режима */
.bar-enter { animation: barEnter 340ms var(--ease) both; }
@keyframes barEnter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .hero, .reveal, .bar-enter, .sheet__panel, .sheet__scrim, .screen { animation: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .boot__spinner { animation: none !important; border-top-color: var(--line-2); }
}

/* ============================================================
   Админ-панель
   ============================================================ */
.admin-fab {
  position: fixed; top: calc(var(--safe-t) + 12px); left: 12px; z-index: 55;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-content: center;
  background: rgba(20, 18, 24, .5); color: #fff; border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform var(--dur) var(--ease);
}
.admin-fab:active { transform: scale(.9); }
.admin-fab svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.admin { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
.admin[hidden] { display: none; }
.admin__bar {
  display: flex; align-items: center; gap: 12px; padding: calc(var(--safe-t) + 14px) 16px 12px;
  background: var(--bg);
}
.admin__note {
  margin: 2px 16px 0; padding: 12px 14px; display: flex; gap: 11px; align-items: center;
  background: var(--c-lilac); border-radius: var(--r-md); font-size: 12.5px; line-height: 1.42; color: var(--ink);
}
.admin__note-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-content: center; background: rgba(255,255,255,.55); color: var(--ink); }
.admin__note-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.admin__tabs { display: flex; gap: 6px; padding: 14px 16px 6px; background: var(--bg); }
.admin__tab {
  flex: 1; height: 40px; border-radius: var(--r-full); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.admin__tab.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.admin__body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 16px calc(40px + var(--safe-b)); }

/* --- inputs (общие для админки/модалок) --- */
.a-inp {
  width: 100%; max-width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--surface-2);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; -webkit-appearance: none;
}
.a-inp:focus { outline: none; border-color: var(--ink); background: var(--surface); }
textarea.a-inp { resize: vertical; line-height: 1.45; }
.a-price { display: flex; align-items: center; gap: 8px; }
.a-price .a-inp { flex: 1; font-variant-numeric: tabular-nums; font-weight: 700; }
.a-price span { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.a-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 16px 0 7px; }
.a-hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; margin: 6px 0 12px; }
.a-hint--top { margin-top: 4px; }
.a-mt { margin-top: 22px; }
.a-danger.btn--book { background: var(--danger); }
.a-danger.btn--ghost2 { color: var(--danger); }

/* чекбокс с длинной подписью */
.a-chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.a-chk input { flex: none; width: 20px; height: 20px; accent-color: var(--ink); }
.a-chk--row { display: flex; align-items: flex-start; margin: 12px 0 2px; line-height: 1.4; }
.a-chk--row input { margin-top: 1px; }

/* переключатель видимости */
.a-switch { display: flex; align-items: flex-start; gap: 12px; margin: 18px 0 2px; cursor: pointer; }
.a-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.a-switch__track { flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; transition: background var(--dur) var(--ease); margin-top: 1px; }
.a-switch__thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.22); transition: transform var(--dur) var(--ease); }
.a-switch input:checked + .a-switch__track { background: var(--ink); }
.a-switch input:checked + .a-switch__track .a-switch__thumb { transform: translateX(18px); }
.a-switch__txt { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.a-switch__txt small { display: block; font-weight: 500; font-size: 12.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.42; }

/* --- УСЛУГИ: разделы + компактные строки --- */
.a-cat { margin-top: 24px; }
.a-cat__head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.a-cat__head .cat__dot { width: 11px; height: 11px; }
.a-cat__name { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 700; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-cat__btn { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-content: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); cursor: pointer; }
.a-cat__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.a-cat-del { color: var(--danger); }

.a-rows { display: flex; flex-direction: column; gap: 8px; }
.a-row { display: flex; align-items: center; gap: 10px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 14px; text-align: left; cursor: pointer; transition: transform var(--dur) var(--ease); }
.a-row:active { transform: scale(.99); }
.a-row.is-off { opacity: .55; }
.a-row__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.a-row__name { min-width: 0; font-weight: 600; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-row__hidden { flex: none; font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--bg-sink); padding: 2px 7px; border-radius: 999px; }
.a-row__price { flex: none; font-size: 13.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.a-row__edit { flex: none; color: var(--ink-3); }
.a-row__edit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.a-row__empty { color: var(--ink-3); font-size: 13px; padding: 2px; }

.a-add { width: 100%; height: 44px; border-radius: var(--r-full); border: 1.5px dashed var(--line-2); background: transparent; color: var(--ink-2); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.a-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.a-srv-add { margin-top: 10px; height: 42px; }
.a-add--wide { margin: 24px 0 4px; }

/* фото в редакторе */
.a-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.a-thumb { position: relative; width: 60px; height: 60px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.a-thumb img { width: 100%; height: 100%; object-fit: cover; }
.a-thumb__x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: rgba(20,18,24,.72); color: #fff; border: none; display: grid; place-content: center; cursor: pointer; }
.a-thumb__x svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.a-photo-add { width: 60px; height: 60px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: var(--surface-2); color: var(--ink-3); display: grid; place-content: center; cursor: pointer; position: relative; }
.a-photo-add svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.a-photo-add svg:last-child { width: 13px; height: 13px; position: absolute; right: 9px; bottom: 9px; stroke-width: 2.6; }

/* --- ГАЛЕРЕЯ --- */
.a-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.a-work { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.a-work__ph { position: relative; }
.a-work__ph img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.a-home { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-content: center; background: rgba(255,255,255,.9); color: var(--ink-3); border: none; cursor: pointer; box-shadow: 0 1px 4px rgba(27,26,23,.18); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.a-home svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.a-home.is-on { background: var(--ink); color: #fff; }
.a-home.is-on svg { fill: #fff; }
.a-work__tags { padding: 8px 10px 4px; display: flex; flex-wrap: wrap; gap: 5px; min-height: 20px; }
.a-work__tags .badge { background: var(--bg-sink); color: var(--ink-2); }
.a-muted { color: var(--ink-3); font-size: 12px; }
.a-work__act { display: flex; gap: 6px; padding: 6px 8px 10px; }
.a-mini { flex: 1; height: 38px; border-radius: var(--r-full); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.a-mini svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.a-mini--del { flex: none; width: 44px; color: var(--danger); }
.a-mini--danger { color: var(--danger); }
.a-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-2); padding: 30px 10px; }

/* --- модалки --- */
.a-modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-end; }
.a-modal__scrim { position: absolute; inset: 0; background: rgba(27,26,23,.44); animation: fade 240ms var(--ease); }
.a-modal__panel { position: relative; width: 100%; max-width: 604px; margin: 0 auto; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 22px 20px calc(22px + var(--safe-b)); max-height: 88dvh; overflow-y: auto; overflow-x: hidden; animation: rise 340ms var(--ease); }
.a-modal__title { font-family: var(--font-display); font-weight: 700; font-size: 21px; margin-bottom: 12px; }
.a-modal__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.a-chip { padding: 9px 13px; border-radius: var(--r-full); border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.a-chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.a-chip__off { color: var(--ink-3); font-weight: 500; }
.a-chip.is-on .a-chip__off { color: rgba(255,255,255,.7); }
.a-confirm { font-size: 16px; line-height: 1.5; color: var(--ink); margin-bottom: 20px; }

/* --- ОФОРМЛЕНИЕ --- */
.a-field { margin-top: 4px; }
.a-cover { height: 150px; border-radius: var(--r-lg); background-size: cover; background-position: center; border: 1px solid var(--line); }
.a-cover.is-empty { display: grid; place-content: center; color: var(--ink-3); background: var(--bg-sink); font-size: 14px; }
.a-cover__act { display: flex; gap: 8px; margin-top: 8px; }
.a-cover__act .a-mini { flex: 0 1 auto; padding: 0 16px; }

@supports (corner-shape: squircle) {
  .a-row, .a-work, .a-work__ph img, .a-thumb, .a-photo-add, .a-modal__panel, .a-cover, .a-inp, .a-cat__btn, .admin__note { corner-shape: squircle; }
}
