/* ============================================================
   screens.css — стили конкретных экранов.
   Главная · Каталог · Услуга · Выбор времени · Подтверждение · Готово ·
   Мои записи · Детали · Портфолио · Просмотр фото · Контакты · Политика.
   Все размеры шрифта ≥ 14px, нажимаемые зоны ≥ 44px.
   ============================================================ */

/* ---------- Миниатюра в строке ---------- */
.row__thumb { flex: none; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: var(--press); }
.row--svc { min-height: 88px; padding-top: 10px; padding-bottom: 10px; }
.row--svc + .row--svc::before { left: 86px; }
.row--svc .row__title { font-weight: 600; line-height: 1.25; }
.row--svc .row__sub { margin-top: 2px; }
.row__price { margin-top: 3px; font-size: 16px; font-weight: 700; color: var(--accent-text); }
.row--svc .row__end svg { opacity: .35; }
.row--mini { min-height: 72px; }
.row--mini + .row::before { left: 16px; }
.row--was .row__sub { text-decoration: line-through; }
.row.is-open .row__end svg { transform: rotate(90deg); }
.row__end svg { transition: transform .2s ease; }

/* ---------- 1. Главная ---------- */
/* Шапка в строку: фото слева, имя и адрес справа — освобождает место под услуги */
.hero { display: flex; align-items: center; gap: 16px; padding: 12px var(--gutter) 4px; }
.hero__avatar {
  flex: none; width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
  border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--accent);
}
.hero__info { flex: 1; min-width: 0; }
.hero__name { font-size: 22px; line-height: 1.15; font-weight: 700; letter-spacing: -.3px; }
.hero__spec { margin-top: 3px; font-size: 15px; color: var(--hint); }
.pill {
  margin-top: 6px; margin-left: -4px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 22px;
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent-text); font-size: 15px; font-weight: 500;
}
.pill svg { width: 20px; height: 20px; color: var(--accent-text); }

/* Категории — кружки как сторис, всегда 4 в ряд (без прокрутки вбок) */
.stories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 14px var(--gutter) 2px; }
.story { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 44px; }
.story__ring { width: 68px; max-width: 100%; aspect-ratio: 1; padding: 2px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, #1B86C9); }
.story__img { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 3px solid var(--bg); background: var(--card); }
.story__label { max-width: 100%; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* «Популярное» — сетка 2 в ряд (прокрутка только вертикальная) */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); align-items: start; gap: 18px 12px; padding: 0 var(--gutter) 4px; }
.card { display: block; min-width: 0; }
.card__img { display: block; aspect-ratio: 1; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: var(--press); }
.card__title { display: block; margin-top: 8px; font-size: 15px; font-weight: 600; line-height: 1.25; }
.card__price { display: block; margin-top: 2px; font-size: 15px; font-weight: 700; color: var(--accent-text); }

/* Сетка работ */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 var(--gutter); }
.grid__item { display: block; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--press); }
.grid--full { gap: 3px; padding: 0 3px; }
.grid--full .grid__item { border-radius: 4px; }

/* ---------- 3. Услуга ---------- */
.service { margin-top: calc(-1 * (var(--safe-top) + 8px)); }       /* карусель — от самого верха */
.svc-cover { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; max-height: 58vh; overflow: hidden; background: var(--press); }
.svc-cover__count {
  position: absolute; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px;
  background: rgba(0, 0, 0, .5); color: #fff; font-size: 14px; font-weight: 600;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.svc-cover__count svg { width: 18px; height: 18px; }
.service__head { padding: 18px var(--gutter) 6px; }
.service__title { font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.3px; }
.service__price { margin-top: 6px; font-size: 22px; font-weight: 700; color: var(--accent-text); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fact { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 500; }
.fact svg { width: 18px; height: 18px; color: var(--accent-text); }
.check-row { min-height: 50px; }
.check-row + .check-row::before { left: 56px; }
.check-row__mark { flex: none; width: 24px; height: 24px; color: var(--accent-text); }
.check-row__mark svg { width: 22px; height: 22px; }
.tip { margin: 12px var(--gutter) 0; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; background: var(--accent-soft); color: var(--text); font-size: 15px; line-height: 1.35; }
.tip svg { flex: none; width: 22px; height: 22px; color: var(--accent-text); margin-top: 1px; }

/* ---------- 4. Выбор времени ---------- */
/* Календарь месяца: 7 колонок, листается кнопками ‹ › */
.cal { margin: 16px 12px 0; padding: 4px 6px 10px; background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); }
.cal__head { display: flex; align-items: center; justify-content: space-between; }
.cal__title { font-size: 17px; font-weight: 700; }
.cal__nav { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--accent-text); }
.cal__nav:active:not(:disabled) { background: var(--press); }
.cal__nav:disabled { opacity: .3; cursor: default; }
.cal__nav svg { width: 22px; height: 22px; }
.cal__wd, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal__wd span { padding: 4px 0 6px; text-align: center; font-size: 14px; color: var(--hint); }
.date {
  position: relative; height: 46px; min-width: 0; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  transition: background-color .18s ease, color .18s ease, transform .14s ease;
}
.date:active:not(:disabled) { transform: scale(.94); }
.date__n { font-size: 17px; font-weight: 600; }
.date.is-today::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.date.is-off { background: transparent; opacity: .35; cursor: default; }
.date.is-off .date__n { font-weight: 400; }
.date.is-active { background: var(--accent); }
.date.is-active .date__n { color: #fff; }
.date.is-active::after { background: #fff; }
.slots { padding: 8px var(--gutter) 0; }
.slots__label { margin: 14px 0 8px; font-size: 14px; font-weight: 600; color: var(--hint); }
.slots__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot {
  height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow); font-size: 16px; font-weight: 600;
  transition: background-color .15s ease, color .15s ease, transform .12s ease;
}
.slot:active { transform: scale(.94); }
.slot.is-active { background: var(--accent); color: #fff; }

/* ---------- 5. Подтверждение ---------- */
.field__grow { flex: 1; min-width: 0; display: flex; align-items: center; }
.field__grow .field__input { width: 100%; }
.field__done { font-size: 17px; color: var(--ok); font-weight: 500; min-height: 44px; display: flex; align-items: center; }
.field__input[disabled] { opacity: .6; }

/* ---------- 6. Готово ---------- */
.done { padding-top: 12px; }
.done__check { display: grid; place-items: center; margin: 8px 0 8px; }
.done__check svg { overflow: visible; }
.done__check .c { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .55s ease forwards; transform-origin: center; }
.done__check .t { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .4s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done__title { text-align: center; font-size: 28px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 18px; }

/* ---------- 7–8. Мои записи, детали ---------- */
.booking-row { min-height: 68px; }
.datebox { flex: none; width: 48px; height: 52px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.datebox__n { font-size: 20px; font-weight: 700; }
.datebox__m { font-size: 14px; font-weight: 500; }
.booking-row + .booking-row::before { left: 78px; }
.details__top { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 4px var(--gutter) 14px; }

/* ---------- 10. Просмотр фото ---------- */
.viewer { background: #000; padding: 0; overflow: hidden; touch-action: none; }
.viewer__track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; touch-action: pan-x; }
.viewer__track::-webkit-scrollbar { display: none; }
.viewer__slide { flex: none; width: 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; }
.viewer__slide img { width: 100%; max-height: 100%; object-fit: contain; }
.viewer__count {
  position: absolute; top: calc(var(--safe-top) + 12px); left: 50%; transform: translateX(-50%);
  padding: 7px 14px; border-radius: 16px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 14px; font-weight: 600;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.viewer__close {
  position: absolute; top: calc(var(--safe-top) + 6px); right: 8px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.viewer__close svg { width: 22px; height: 22px; }
.viewer__caption {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--safe-bottom) + 88px);
  min-height: 52px; padding: 8px 16px; border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(30, 30, 34, .66); color: #fff;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.viewer__cap-title { font-size: 16px; font-weight: 600; }
.viewer__cap-price { font-size: 15px; opacity: .8; white-space: nowrap; }
html:not(.has-main) .viewer__caption { bottom: calc(var(--safe-bottom) + 24px); }

/* ---------- 11. Контакты ---------- */
.cover { height: 190px; overflow: hidden; }
.screen[data-screen="contacts"] { padding-top: 0; }
.hours-row { min-height: 48px; background: var(--card); }
.hours-row + .hours-row::before { left: 16px; }
.hours-row .row__title { font-size: 15px; flex: 1; }

/* ---------- 12. Политика ---------- */
.prose__block { padding: 14px 16px; }
.prose__block + .prose__block { border-top: 1px solid var(--sep); }
.prose__h { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.prose__p { font-size: 15px; color: var(--hint); line-height: 1.45; }

/* ---------- Приветствие (первое открытие) ---------- */
.welcome { padding: 28px 0 8px; text-align: center; }
.welcome__emoji {
  display: flex; align-items: center; justify-content: center;
  width: 104px; height: 104px; margin: 0 auto 18px;
  border-radius: 50%; background: var(--accent-soft);
  font-size: 58px; line-height: 1;
}
.welcome__title { padding: 0 var(--gutter); font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.welcome__text { padding: 0 24px; margin-top: 10px; font-size: 16px; line-height: 1.4; color: var(--hint); text-wrap: balance; }
/* Пункты — подсказки, а не кнопки: без белой карточки и разделителей, чтобы не казались нажимаемыми */
.welcome__list { margin-top: 26px; text-align: left; background: none; box-shadow: none; }
.welcome__list .row + .row::before { display: none; }
@media (max-height: 640px) {
  .welcome { padding-top: 8px; }
  .welcome__emoji { width: 76px; height: 76px; font-size: 42px; margin-bottom: 12px; }
  .welcome__list { margin-top: 16px; }
}
