/* Мастерская Виктора — общие стили. Mobile-first, БЭМ. */

/* Шрифт Rubik (лицензия SIL OFL), вариативный, лежит локально */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/rubik-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215;
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/rubik-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2113;
}

:root {
  --c-bg: #f8f3ea;
  --c-surface: #ffffff;
  --c-surface-alt: #efe5d3;
  --c-ink: #22252a;
  --c-ink-soft: #565b63;
  --c-line: #dfd2ba;
  --c-accent: #a8620f;
  --c-accent-dark: #7d4808;
  --c-wood: #c39a62;
  --c-wood-dark: #8d6a3a;
  --c-dark: #2a2622;
  --c-ok: #2f6b3c;
  --c-error: #b3261e;

  --font-base: "Rubik", "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Rubik", "Segoe UI", Roboto, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 28px rgba(34, 37, 42, 0.1);
  --gap: 16px;
  --container: 1240px;
  --header-h: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  padding-bottom: 64px; /* место под нижнюю панель связи на мобильном */
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-bg);
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--c-accent-dark);
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 5.2vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.section {
  padding: 48px 0;
}

.section--alt {
  background: var(--c-surface-alt);
}

.section--dark {
  background: var(--c-dark);
  color: #f3eee6;
}

.section__head {
  max-width: 720px;
  margin-bottom: 28px;
}

.section__lead {
  color: var(--c-ink-soft);
  font-size: 1.05rem;
}

.section--dark .section__lead {
  color: #c9c2b6;
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--c-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--c-accent-dark);
}

.btn--ghost {
  border-color: var(--c-ink);
  color: var(--c-ink);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--c-ink);
  color: #fff;
}

.btn--light {
  border-color: #f3eee6;
  color: #f3eee6;
  background: transparent;
}

.btn--light:hover {
  background: #f3eee6;
  color: var(--c-dark);
}

.btn--small {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 0.95rem;
}

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 243, 234, 0.96);
  border-bottom: 1px solid var(--c-line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--c-ink);
  text-decoration: none;
}

.logo__mark {
  flex: none;
  width: 40px;
  height: 40px;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo__name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
}

.logo__tag {
  font-size: 0.72rem;
  color: var(--c-ink-soft);
}

.header__phone {
  display: none;
  font-weight: 700;
  color: var(--c-ink);
  text-decoration: none;
  white-space: nowrap;
}

.header__cta {
  display: none;
}

.burger {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.js .burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.burger__lines,
.burger__lines::before,
.burger__lines::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-ink);
  border-radius: 2px;
  transition: transform 0.25s, background-color 0.25s;
}

.burger__lines {
  position: relative;
}

.burger__lines::before,
.burger__lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger__lines::before {
  top: -7px;
}

.burger__lines::after {
  top: 7px;
}

.burger[aria-expanded="true"] .burger__lines {
  background: transparent;
}

.burger[aria-expanded="true"] .burger__lines::before {
  transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__lines::after {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  width: 100%;
  padding-bottom: 12px;
}

/* Без JS меню просто стоит под логотипом; с JS — прячется за бургером */
.header__inner {
  flex-wrap: wrap;
}

.js .nav {
  display: none;
}

.js .nav.is-open {
  display: block;
}

.nav__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
  color: var(--c-ink);
  font-weight: 600;
  text-decoration: none;
  border-top: 1px solid var(--c-line);
}

.nav__link:hover {
  color: var(--c-accent-dark);
}

/* ---------- Первый экран ---------- */

.hero {
  padding: 28px 0 40px;
}

.hero__inner {
  display: grid;
  gap: 24px;
}

.hero__kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--c-surface-alt);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-wood-dark);
}

.hero__lead {
  max-width: 34em;
  font-size: 1.1rem;
  color: var(--c-ink-soft);
}

.hero__facts {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.hero__fact {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.hero__fact::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c-accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M6 11.5l3.2 3.2L16 8' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__media {
  position: relative;
  margin: 0;
}

.hero__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(42, 38, 34, 0.88);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.3;
}

.hero__badge strong {
  display: block;
  font-size: 1.05rem;
}

/* ---------- Слайдер работ ---------- */

.slider {
  position: relative;
}

.slider__track {
  display: flex;
  gap: var(--gap);
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.slider__track::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 100%;
  display: grid;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--c-surface);
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.slide__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.slide__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px;
}

.slide__type {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-accent-dark);
}

.slide__title {
  margin: 0;
  font-size: 1.4rem;
}

.slide__text {
  margin: 0;
  color: var(--c-ink-soft);
}

.slide__price {
  font-weight: 700;
  font-size: 1.1rem;
}

.slider__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.slider__arrow {
  display: none;
  width: 44px;
  height: 44px;
  border: 2px solid var(--c-ink);
  border-radius: 50%;
  background: transparent;
  color: var(--c-ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.js .slider__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.slider__arrow:hover {
  background: var(--c-ink);
  color: #fff;
}

.slider__dots {
  display: flex;
  gap: 4px;
}

.slider__dot {
  position: relative;
  width: 28px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.slider__dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--c-line);
  transform: translate(-50%, -50%);
  transition: width 0.25s, background-color 0.25s;
}

.slider__dot.is-active::before {
  width: 26px;
  background: var(--c-accent);
}

/* ---------- Быстрый выбор ---------- */

.quick {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--c-surface);
  box-shadow: var(--shadow);
}

.quick__title {
  margin: 0;
  font-size: 1.25rem;
}

.quick__row {
  display: grid;
  gap: 10px;
}

/* ---------- Поля форм ---------- */

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: 0.9rem;
  font-weight: 600;
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  font: inherit;
  transition: border-color 0.2s;
}

.field__input:hover {
  border-color: var(--c-wood);
}

.field__input:focus {
  border-color: var(--c-accent);
  outline: none;
}

.field__error {
  display: none;
  font-size: 0.85rem;
  color: var(--c-error);
}

.field--error .field__input {
  border-color: var(--c-error);
  background: #fdf3f2;
}

.field--error .field__error {
  display: block;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.check__input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--c-accent);
}

.check--error {
  color: var(--c-error);
}

.form__status {
  display: none;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.form__status.is-ok {
  display: block;
  background: #e4f1e6;
  color: var(--c-ok);
}

/* ---------- Факты ---------- */

.facts {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--c-surface);
}

.fact__icon {
  flex: none;
  width: 64px;
  height: 64px;
}

.fact__value {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
}

.fact__text {
  color: var(--c-ink-soft);
  font-size: 0.95rem;
}

/* ---------- Шаги ---------- */

.steps {
  position: relative;
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 4px 16px;
  counter-increment: step;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 60px;
  bottom: -16px;
  left: 27px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, #76706a 0 6px, transparent 6px 12px);
}

.step__icon {
  grid-row: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #3b3631;
  color: #f0cf9c;
}

.step__icon svg {
  width: 30px;
  height: 30px;
}

.step__title {
  margin: 4px 0 0;
  font-size: 1.1rem;
}

.step__title::before {
  content: counter(step) ". ";
  color: #e8b25c;
}

.step__text {
  margin: 0;
  color: #c9c2b6;
  font-size: 0.95rem;
}

/* ---------- Мини-конструктор ---------- */

.mini {
  display: grid;
  gap: 24px;
}

.mini__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--c-surface);
  box-shadow: var(--shadow);
}

.mini__svg {
  width: 100%;
  max-height: 380px;
}

.mini__panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.range {
  display: grid;
  gap: 4px;
}

.range__head {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.range__value {
  font-variant-numeric: tabular-nums;
  color: var(--c-accent-dark);
}

.range__input {
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: var(--c-accent);
}

.mini__note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

/* ---------- Карточки работ ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--c-surface);
  transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
}

.card__type {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-accent-dark);
}

.card__title {
  margin: 0;
}

.card__title a {
  color: inherit;
  text-decoration: none;
}

.card__title a:hover {
  color: var(--c-accent-dark);
}

.card__text {
  margin: 0;
  color: var(--c-ink-soft);
  font-size: 0.95rem;
}

.card__price {
  margin-top: auto;
  padding-top: 8px;
  font-size: 1.15rem;
  font-weight: 700;
}

.cards__more {
  margin-top: 24px;
  text-align: center;
}

.note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

/* ---------- Форма подбора ---------- */

.finder {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--c-surface);
}

/* ---------- Отзывы ---------- */

.review {
  flex: 0 0 100%;
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--c-surface);
  scroll-snap-align: start;
}

.review__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review__avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-wood);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
}

.review__name {
  display: block;
  font-weight: 700;
}

.review__date {
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.review__stars {
  color: #d99413;
  letter-spacing: 2px;
}

.review__text {
  margin: 0;
  font-size: 1.05rem;
}

.review__source {
  font-size: 0.85rem;
}

/* ---------- Доверие ---------- */

.trust {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust__item {
  padding: 18px;
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
}

.trust__title {
  margin: 0 0 4px;
}

.trust__text {
  margin: 0;
  color: var(--c-ink-soft);
  font-size: 0.95rem;
}

/* ---------- Заявка ---------- */

.lead {
  display: grid;
  gap: 24px;
}

.lead__form {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  background: #f3eee6;
  color: var(--c-ink);
}

.lead__alt {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Подвал ---------- */

.footer {
  padding: 40px 0 24px;
  background: #1d1a17;
  color: #c9c2b6;
  font-size: 0.95rem;
}

.footer a {
  color: #f3eee6;
}

.footer__grid {
  display: grid;
  gap: 28px;
}

.footer__title {
  margin: 0 0 10px;
  font-family: var(--font-base);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8e8779;
}

.footer__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  text-decoration: none;
}

.footer__list a:hover {
  text-decoration: underline;
}

.footer__phone {
  font-size: 1.3rem;
  font-weight: 700;
}

.footer .logo {
  margin-bottom: 12px;
  color: #f3eee6;
}

.footer .logo__tag {
  color: #8e8779;
}

.footer__bottom {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid #3b3631;
  font-size: 0.85rem;
}

/* ---------- Нижняя панель связи (мобильные) ---------- */

.callbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(248, 243, 234, 0.97);
  border-top: 1px solid var(--c-line);
}

.callbar .btn {
  min-height: 48px;
  padding: 8px 10px;
}

/* ---------- Появление при прокрутке ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============ от 600 px ============ */

@media (min-width: 600px) {
  .quick__row {
    grid-template-columns: 1fr auto;
  }

  .facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust {
    grid-template-columns: repeat(2, 1fr);
  }

  .finder {
    grid-template-columns: 1fr 1fr;
  }

  .finder__wide {
    grid-column: 1 / -1;
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ от 769 px: планшет и десктоп ============ */

@media (min-width: 769px) {
  :root {
    --gap: 24px;
    --header-h: 76px;
  }

  body {
    padding-bottom: 0;
  }

  .section {
    padding: 72px 0;
  }

  /* структурное изменение 6: нижняя панель связи только на мобильных */
  .callbar {
    display: none;
  }

  .header__phone {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .slide {
    grid-template-columns: 1.2fr 1fr;
    align-items: stretch;
  }

  .slide__img {
    height: 100%;
    aspect-ratio: 16 / 10;
  }

  .slide__body {
    justify-content: center;
    padding: 32px;
  }

  .slide__title {
    font-size: 1.8rem;
  }

  .review {
    padding: 36px 48px;
  }

  .mini {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }

  .lead {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .lead__form {
    padding: 28px;
  }
}

/* ============ от 1024 px: десктоп ============ */

@media (min-width: 1024px) {
  /* структурное изменение 1: бургер → горизонтальное меню */
  .js .burger {
    display: none;
  }

  .header__inner {
    flex-wrap: nowrap;
  }

  .nav,
  .js .nav {
    display: block;
    width: auto;
    padding: 0;
  }

  .nav__list {
    flex-direction: row;
    gap: 4px;
  }

  .nav__link {
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
  }

  .nav__link:hover {
    background: var(--c-surface-alt);
  }

  .header__cta {
    display: inline-flex;
  }

  /* структурное изменение 2: первый экран в две колонки */
  .hero {
    padding: 56px 0 72px;
  }

  .hero__inner {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 48px;
  }

  .hero__img {
    aspect-ratio: 5 / 4;
  }

  /* структурное изменение 3: шаги из вертикального списка в горизонтальную линию */
  .steps {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
  }

  .step {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .step__icon {
    grid-row: auto;
    width: 72px;
    height: 72px;
    margin-bottom: 8px;
  }

  .step__icon svg {
    width: 38px;
    height: 38px;
  }

  .step:not(:last-child)::after {
    top: 35px;
    bottom: auto;
    left: calc(50% + 44px);
    width: calc(100% - 72px);
    height: 2px;
    background: repeating-linear-gradient(to right, #76706a 0 6px, transparent 6px 12px);
  }

  /* структурное изменение 4: факты в одну строку из четырёх */
  .facts {
    grid-template-columns: repeat(4, 1fr);
  }

  .fact {
    flex-direction: column;
    align-items: flex-start;
  }

  /* структурное изменение 5: карточки работ в три колонки */
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust {
    grid-template-columns: repeat(4, 1fr);
  }

  .finder {
    grid-template-columns: 1fr 1fr 1.4fr auto;
    align-items: end;
  }

  .finder__wide {
    grid-column: auto;
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

@media (min-width: 1600px) {
  :root {
    --container: 1400px;
  }

  body {
    font-size: 17px;
  }
}

/* Цвета логотипа и тёмных блоков берутся из переменных палитры */
.logo__mark rect {
  fill: var(--c-accent);
}

.step__icon {
  background: color-mix(in srgb, var(--c-dark) 80%, #fff);
}

/* Планшет (769–1023 px): телефон и бургер прижаты вправо, меню раскрывается под ними */
@media (min-width: 769px) and (max-width: 1023px) {
  .header__phone {
    order: 1;
    margin-left: auto;
  }

  .burger {
    order: 2;
  }

  .nav {
    order: 3;
  }
}

/* =====================================================================
   Внутренние страницы
   ===================================================================== */

[hidden] {
  display: none !important;
}

.nav__link[aria-current="page"] {
  color: var(--c-accent-dark);
}

.page-head {
  padding: 28px 0 8px;
}

.page-head__lead {
  max-width: 46em;
  color: var(--c-ink-soft);
  font-size: 1.05rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

.crumbs li + li::before {
  content: "/";
  margin-right: 6px;
}

.box {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--c-surface);
}

.stack {
  display: grid;
  gap: 16px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--c-surface-alt);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--new { background: #fde7c7; color: #7a4a00; }
.badge--calc { background: #e3e8f6; color: #2b3f7a; }
.badge--work { background: #fff0c2; color: #6b5200; }
.badge--done { background: #dcefdf; color: #1f5a2c; }
.badge--arch { background: #e6e4e0; color: #55524c; }

.alert {
  padding: 12px 14px;
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  font-size: 0.95rem;
}

.alert--error {
  border-color: var(--c-error);
  background: #fdf3f2;
  color: #7c1d17;
}

.alert--ok {
  border-color: var(--c-ok);
  background: #e9f4eb;
  color: #1f5a2c;
}

textarea.field__input {
  min-height: 110px;
  resize: vertical;
}

.field__hint {
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.field--ok .field__input {
  border-color: var(--c-ok);
}

.form-grid {
  display: grid;
  gap: 14px;
}

/* ---------- Каталог работ ---------- */

.works-table {
  width: 100%;
  border-collapse: collapse;
}

.works-table caption {
  margin-bottom: 12px;
  text-align: left;
  color: var(--c-ink-soft);
}

.works-table thead {
  display: none;
}

.works-table tr {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 14px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--c-surface);
}

.works-table td {
  padding: 0;
}

.works-table td[data-label]::before {
  content: attr(data-label) ": ";
  color: var(--c-ink-soft);
  font-size: 0.85rem;
}

.works-table__photo {
  grid-row: span 6;
}

.works-table__photo img {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.works-table__title {
  font-weight: 700;
}

.works-table__price {
  font-weight: 700;
  white-space: nowrap;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-ink);
  font-weight: 600;
  text-decoration: none;
}

.pagination__link:hover {
  border-color: var(--c-accent);
}

.pagination__link[aria-current="page"] {
  border-color: var(--c-accent);
  background: var(--c-accent);
  color: #fff;
}

.pagination__link--off {
  color: #a39c90;
  pointer-events: none;
}

/* ---------- Карточка работы ---------- */

.work {
  display: grid;
  gap: 24px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.gallery__item {
  margin: 0;
}

.gallery__item:first-child {
  grid-column: 1 / -1;
}

.gallery__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.gallery__item:first-child .gallery__img {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
}

.specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0;
}

.specs dt {
  color: var(--c-ink-soft);
}

.specs dd {
  margin: 0;
  font-weight: 600;
}

.price-big {
  font-size: 1.8rem;
  font-weight: 800;
}

/* ---------- Формы входа и заявки ---------- */

.auth {
  max-width: 480px;
  margin: 0 auto;
}

.auth--wide {
  max-width: 760px;
}

.states {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.states__title {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
}

/* Блок с паролем показывается без JavaScript — по отмеченной галочке */
.account-fields {
  display: none;
  gap: 14px;
  padding: 16px;
  border: 2px dashed var(--c-line);
  border-radius: var(--radius-sm);
}

.account-toggle:checked ~ .account-fields {
  display: grid;
}

.account-toggle {
  position: absolute;
  opacity: 0;
}

.check__box {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--c-wood-dark);
  border-radius: 5px;
  background: #fff;
}

.account-toggle:checked + .check .check__box {
  border-color: var(--c-accent);
  background: var(--c-accent);
}

.account-toggle:checked + .check .check__box::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 6px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.account-toggle:focus-visible + .check {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

.upload {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.upload__slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: 1;
  padding: 6px;
  border: 2px dashed var(--c-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink-soft);
  font-size: 0.8rem;
  text-align: center;
  cursor: pointer;
}

.upload__slot:hover {
  border-color: var(--c-accent);
}

.upload__slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.upload__slot--filled {
  border-style: solid;
}

.upload__plus {
  font-size: 1.6rem;
  line-height: 1;
}

.attached {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--c-surface-alt);
}

/* ---------- Кабинеты ---------- */

.profile {
  display: grid;
  gap: 24px;
}

.profile__data {
  display: grid;
  gap: 10px;
}

.profile__line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-line);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stats__item {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--c-surface-alt);
}

.stats__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.stats__label {
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.group {
  margin-bottom: 28px;
}

.group__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.group__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 6px 14px;
  padding: 14px;
  border-left: 5px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
}

.order__img {
  grid-row: span 3;
  width: 84px;
  height: 84px;
  border-radius: 6px;
  object-fit: cover;
}

.order__title {
  margin: 0;
  font-size: 1.05rem;
}

.order__meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

.order__text {
  margin: 0;
  font-size: 0.95rem;
}

.order__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order__price {
  font-weight: 700;
}

.group--calc .order { border-color: #5a74c4; }
.group--work .order { border-color: #d6a400; background: #fffaf0; }
.group--done .order { border-color: var(--c-ok); }
.group--arch .order { border-style: dashed; background: transparent; color: var(--c-ink-soft); }
.group--arch .order__img { filter: grayscale(1); opacity: 0.7; }

.toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.request {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--c-surface);
}

.request__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.request__title {
  margin: 0;
}

.request__sketch {
  width: 120px;
  border: 1px solid var(--c-line);
  border-radius: 6px;
  background: #fff;
}

.request__body {
  display: grid;
  gap: 12px;
}

.request__status {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--c-line);
}

.request__status .field {
  flex: 1 1 180px;
}

.requests {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Конструктор ---------- */

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 16px 0 20px;
}

.tabs__btn {
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  color: var(--c-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tabs__btn:hover {
  border-color: var(--c-wood);
}

.tabs__btn.is-active {
  border-color: var(--c-accent);
  background: var(--c-accent);
  color: #fff;
}

.builder {
  display: grid;
  gap: 16px;
}

.builder__stage {
  position: sticky;
  top: calc(var(--header-h) + 4px);
  z-index: 5;
  padding: 8px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.builder__sketch {
  width: 100%;
  max-height: 42vh;
}

.builder__views {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.seg {
  min-height: 40px;
  padding: 6px 14px;
  border: 2px solid var(--c-line);
  border-radius: 999px;
  background: #fff;
  color: var(--c-ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.seg.is-active {
  border-color: var(--c-ink);
  background: var(--c-ink);
  color: #fff;
}

.builder__note {
  margin: 8px 0 0;
  font-size: 0.85rem;
  text-align: center;
  color: var(--c-ink-soft);
}

.builder__msg {
  margin: 0 0 6px;
  padding: 10px 12px;
  border-left: 4px solid #d6a400;
  border-radius: 6px;
  background: #fff7dd;
  font-size: 0.92rem;
}

.panel {
  display: grid;
  gap: 14px;
}

.panel__group {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--c-surface);
}

.panel__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.stepper {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 6px;
}

.stepper__btn {
  min-height: 48px;
  border: 2px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--c-ink);
  font: inherit;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.stepper__btn:hover {
  border-color: var(--c-accent);
}

.stepper__input {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stepper__value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--radius-sm);
  background: var(--c-surface-alt);
  font-weight: 700;
}

.choice {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.option {
  position: relative;
  display: block;
  cursor: pointer;
}

.option__input {
  position: absolute;
  opacity: 0;
}

.option__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

.option__body strong {
  color: var(--c-ink);
  font-size: 1rem;
}

.option__body svg {
  width: 56px;
  height: 40px;
  color: var(--c-wood-dark);
}

.option__input:checked + .option__body {
  border-color: var(--c-accent);
  background: #fdf6ea;
}

.option__input:focus-visible + .option__body {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.2;
}

.swatch__dot {
  width: 44px;
  height: 44px;
  border: 2px solid var(--c-line);
  border-radius: 50%;
}

.swatch input:checked + .swatch__dot {
  border-color: var(--c-ink);
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--c-accent);
}

.swatch input:focus-visible + .swatch__dot {
  outline: 3px solid var(--c-accent);
  outline-offset: 6px;
}

.secnav {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-weight: 700;
}

.summary {
  width: 100%;
  border-collapse: collapse;
}

.summary th,
.summary td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
  vertical-align: top;
}

.summary th {
  width: 42%;
  color: var(--c-ink-soft);
  font-weight: 400;
}

.summary td {
  font-weight: 600;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.wizard__bar {
  height: 8px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: var(--c-line);
  overflow: hidden;
}

.wizard__progress {
  width: 16%;
  height: 100%;
  border-radius: 999px;
  background: var(--c-accent);
  transition: width 0.3s;
}

.wizard__count {
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

.wizard__nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.prose {
  max-width: 46em;
}

.prose h2 {
  margin-top: 1.4em;
  font-size: 1.3rem;
}

@media (min-width: 600px) {
  .tabs {
    grid-template-columns: repeat(4, 1fr);
  }

  .form-grid--2 {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid__wide {
    grid-column: 1 / -1;
  }

  .actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .toolbar {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }

  .request__body {
    grid-template-columns: 1fr auto;
  }
}

@media (min-width: 769px) {
  .page-head {
    padding: 44px 0 12px;
  }

  .box {
    padding: 28px;
  }

  .order {
    grid-template-columns: 110px 1fr;
  }

  .order__img {
    width: 110px;
    height: 110px;
  }
}

@media (min-width: 1024px) {
  /* таблица работ: карточки → настоящая таблица */
  .works-table thead {
    display: table-header-group;
  }

  .works-table tr {
    display: table-row;
    background: transparent;
  }

  .works-table th,
  .works-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--c-line);
    text-align: left;
    vertical-align: middle;
  }

  .works-table th {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-ink-soft);
  }

  .works-table td[data-label]::before {
    content: none;
  }

  .works-table tbody tr:hover {
    background: var(--c-surface);
  }

  .work {
    grid-template-columns: 1.3fr 1fr;
    align-items: start;
  }

  .builder {
    grid-template-columns: 1.15fr 1fr;
    align-items: start;
    gap: 24px;
  }

  .builder__stage {
    top: calc(var(--header-h) + 16px);
    padding: 16px;
  }

  .builder__sketch {
    max-height: 68vh;
  }

  .profile {
    grid-template-columns: 340px 1fr;
    align-items: start;
  }

  .profile .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media print {
  .header,
  .footer,
  .callbar,
  .tabs,
  .panel,
  .actions,
  .builder__views,
  .page-head__lead,
  .wizard {
    display: none !important;
  }

  body {
    padding: 0;
    background: #fff;
  }

  .builder__stage {
    position: static;
    box-shadow: none;
  }

  .builder__sketch {
    max-height: 120mm;
  }

  .section {
    padding: 8px 0;
  }
}

/* Шапка: полное меню в строку помещается только от 1240 px, до этого — бургер */
.nav__link,
.header__cta,
.header__phone {
  white-space: nowrap;
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .js .burger {
    display: inline-flex;
    order: 3;
  }

  .header__inner {
    flex-wrap: wrap;
  }

  .header__phone {
    order: 1;
    margin-left: auto;
  }

  .header__cta {
    order: 2;
  }

  .nav,
  .js .nav {
    order: 4;
    width: 100%;
    padding-bottom: 12px;
  }

  .js .nav {
    display: none;
  }

  .js .nav.is-open {
    display: block;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__link {
    padding: 0 4px;
    border-top: 1px solid var(--c-line);
    border-radius: 0;
  }
}

@media (min-width: 1280px) {
  .nav__link {
    padding: 0 10px;
    font-size: 0.95rem;
  }
}

.logo__name,
.logo__tag {
  white-space: nowrap;
}

.request__title {
  font-size: 1.2rem;
}

/* ===== Исправления по итогам проверки ===== */
h1,
h2,
h3 {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.stack > * {
  min-width: 0;
}

.field__input:focus {
  outline: 3px solid var(--c-accent);
  outline-offset: 1px;
}

.field__input,
.stepper__btn {
  border-color: #a08868;
}

.upload__slot:focus-within {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

.hero__kicker {
  color: var(--c-accent-dark);
}

.slider__dot {
  width: 44px;
}

.slider__dot::before {
  background: var(--c-wood-dark);
}

.review__stars {
  color: #a8620f;
}

.review__avatar {
  background: var(--c-wood-dark);
}

.seg {
  min-height: 44px;
}

.check {
  min-height: 44px;
  align-items: center;
}

.card {
  position: relative;
}

.card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.footer__list a {
  min-height: 44px;
}

.form__status.is-error {
  display: block;
  background: #fdf3f2;
  color: var(--c-error);
}

.skip-link {
  position: absolute;
  top: -80px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--c-ink);
  color: #fff;
}

.skip-link:focus {
  top: 8px;
}

.field--group {
  margin: 0;
  padding: 0;
  border: 0;
}

.box--gap {
  margin-top: 24px;
}

.field--gap {
  margin-top: 16px;
}

/* Без JavaScript меню не прячется, поэтому шапку не закрепляем */
html:not(.js) .header {
  position: static;
}

/* Очень узкие экраны: подпись логотипа не помещается рядом с бургером */
@media (max-width: 359px) {
  .logo__tag {
    display: none;
  }

  .logo__name {
    font-size: 1rem;
  }
}

/* Нижняя панель связи не должна закрывать поле в фокусе */
@media (max-width: 768px) {
  html {
    scroll-padding-bottom: 72px;
  }
}

@media print {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Поле-ловушка для спам-ботов: людям не видно */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ===== Правки по UI/UX-проверке (ui-ux-pro-max) ===== */

/* Области нажатия не меньше 44 px */
.logo { min-height: 44px; }
.seg { min-height: 44px; }
.review__source {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.crumbs a {
  display: inline-block;
  padding: 12px 0;
  margin: -12px 0;
}

/* Подпись логотипа не мельче 12 px */
.logo__tag { font-size: 0.75rem; }

/* Телефон: эскиз в конструкторе меньше, чтобы настройки были видны */
@media (max-width: 767px) {
  .builder__stage { padding: 6px; }
  .builder__sketch { max-height: 26vh; }
  .builder__views { margin-top: 4px; }
  .builder__note { margin-top: 4px; font-size: 0.8rem; }
  /* блок настроек не прячется под липким эскизом при переходе по якорю */
  .builder fieldset, .builder section { scroll-margin-top: calc(var(--header-h) + 30vh + 100px); }
}

/* ===== Просмотр фото (js/lightbox.js) ===== */
.gallery__img.is-zoomable { cursor: zoom-in; }
.gallery__img.is-zoomable:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.lb-open { overflow: hidden; }

.lb {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 17, 14, 0.96);
  color: #fff;
  overflow: hidden;
}
.lb::backdrop { background: rgba(20, 17, 14, 0.9); }
.lb[open] { display: grid; grid-template-rows: auto 1fr auto; }

.lb__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  z-index: 2;
}
.lb__count { font-size: 0.95rem; opacity: 0.85; }
.lb__tools { display: flex; gap: 6px; }

.lb__btn, .lb__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: 400 1.6rem/1 var(--font, inherit);
  cursor: pointer;
  transition: background .15s ease;
}
.lb__btn:hover, .lb__nav:hover { background: rgba(255, 255, 255, 0.28); }
.lb__btn:focus-visible, .lb__nav:focus-visible { outline: 3px solid var(--c-wood); outline-offset: 2px; }

.lb__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
.lb__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  cursor: zoom-in;
  will-change: transform;
}
.lb.is-zoomed .lb__img { cursor: grab; }
.lb.is-zoomed .lb__img:active { cursor: grabbing; }

.lb__nav {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  font-size: 2.2rem;
  z-index: 2;
}
.lb__nav--prev { left: 10px; }
.lb__nav--next { right: 10px; }
.lb--single .lb__nav { display: none; }

.lb__caption {
  margin: 0;
  padding: 8px 16px 14px;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0.85;
}

@media (max-width: 767px) {
  /* на телефоне листают свайпом; стрелки ниже и прозрачнее, чтобы не закрывать фото */
  .lb__nav { top: auto; bottom: 52px; margin-top: 0; background: rgba(255, 255, 255, 0.18); }
}
@media (prefers-reduced-motion: reduce) {
  .lb__img { transition: none !important; }
}
