/* Страница мастера и её кабинет — весь визуальный слой здесь (ADR 0035). Телефон — основа, с 900px — две колонки. */

/* ---------- Страница ---------- */
.mp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 1080px; margin: 0 auto; }
.mp h2 { font-size: var(--fs-18); margin: 0 0 12px; letter-spacing: -.01em; }
.mp-hero, .mp-about, .mp-price, .mp-works, .mp-listings, .mp-hours { background: var(--surface); border-radius: var(--r-24); box-shadow: var(--shadow); }
.mp-about, .mp-price, .mp-works, .mp-listings, .mp-hours { padding: 16px 16px; scroll-margin-top: calc(var(--header-h) + 12px); }
.mp-hero { overflow: hidden; padding-bottom: 16px; }

.mp-cover { position: relative; height: 188px; background: linear-gradient(135deg, #f6d9e4 0%, #e3defb 55%, #d9e8fb 100%); margin-bottom: 52px; }
.mp-cover > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .18) 100%); pointer-events: none; }
.mp-avatar { position: absolute; left: 50%; bottom: -48px; transform: translateX(-50%); z-index: 1; padding: 4px; background: var(--surface); border-radius: 50%; box-shadow: 0 6px 20px rgba(22, 26, 60, .16); }
.mp .mp-avatar .avatar, .mp-head--off .avatar { width: 96px; height: 96px; font-size: 2.2rem; }

.mp-head { text-align: center; padding: 8px 20px 0; }
.mp-name { margin: 0; font-size: var(--fs-22); line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.mp-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 8px 0 0; }
.mp-tags li { padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: var(--fs-13); font-weight: 600; }
.mp-facts { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-2); font-size: var(--fs-14); }
.mp-facts li { display: inline-flex; align-items: center; gap: 8px; }
.mp-facts .icon { width: 16px; height: 16px; color: var(--muted); flex: none; }
.mp-since { margin: 8px 0 0; color: var(--muted); font-size: var(--fs-12); }

.mp-social { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 16px 16px 0; }
.mp-social__item { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); transition: transform .12s, background-color .12s; }
.mp-social__item:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .mp-social__item:hover { background: var(--brand-soft); } }
.mp-social__item .brand, .mp-social__item .icon { width: 22px; height: 22px; }

.mp-actions { padding: 16px 16px 0; display: grid; gap: 8px; }
.mp-actions__main { width: 100%; min-height: var(--btn-h, 52px); font-size: var(--fs-15); }
.mp-actions .btn .icon, .mp-actions .btn .brand { width: 18px; height: 18px; flex: none; }
.mp-actions__more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mp-actions__more > button:last-child:nth-child(odd), .mp-actions__more > form:last-child:nth-child(odd) > button { grid-column: 1 / -1; }
.mp-actions__more form { display: contents; }
.mp-actions__more .btn { width: 100%; padding-left: 8px; padding-right: 8px; }
.mp-actions__more form > :not(button) { grid-column: 1 / -1; }
.mp-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.mp-contact p { grid-column: 1 / -1; margin: 0; color: var(--muted); text-align: center; }

.mp-nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.mp-nav::-webkit-scrollbar { display: none; }
.mp-nav a { flex: none; padding: 8px 16px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--text); font-weight: 600; font-size: var(--fs-14); text-decoration: none; }
.mp-nav a:active { background: var(--brand-soft); }

.mp-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.mp-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.mp-title h2 { margin: 0; }
.mp-title span { color: var(--muted); font-size: var(--fs-13); }

.mp-about p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; color: var(--text-2); }
.mp-about details { margin-top: 8px; }
.mp-about summary { display: inline-flex; align-items: center; min-height: 40px; cursor: pointer; color: var(--brand-dark); font-weight: 600; list-style: none; }
.mp-about summary::-webkit-details-marker { display: none; }
.mp-about details[open] summary { display: none; }
.mp-about:has(details[open]) .mp-about__short { display: none; }

.mp-price__nav { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 2px; padding: 2px 16px; }
.mp-price__nav::-webkit-scrollbar { display: none; }
.mp-price__nav a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: var(--fs-13); font-weight: 600; text-decoration: none; }
.mp-price__nav a span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.mp-price__nav a:active { background: var(--brand-soft); }
.mp-price__group { scroll-margin-top: calc(var(--header-h) + 16px); }
.mp-price__group h3 { margin: 20px 0 2px; font-size: var(--fs-15); font-weight: 700; letter-spacing: -.005em; }
.mp-price__group:first-of-type h3 { margin-top: 16px; }
.mp-price__group ul, .mp-teaser ul { list-style: none; padding: 0; margin: 0; }
.mp-price__item { position: relative; }
.mp-price__item + .mp-price__item::before { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 1px solid var(--line); }
.mp-price[data-photos] .mp-price__item + .mp-price__item::before { left: 74px; }
.mp-price__item > a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 16px; padding: 16px 0; color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color .15s; }
.mp-price[data-photos] .mp-price__item > a { grid-template-columns: 60px minmax(0, 1fr) auto; }
.mp-price__item > a:active { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) {
  .mp-price__item > a { margin: 0 -12px; padding-left: 12px; padding-right: 12px; border-radius: var(--r-16); }
  .mp-price__item > a:hover { background: var(--surface-2); }
}
.mp-price__photo { width: 60px; height: 60px; object-fit: cover; border-radius: var(--r-16); display: block; }
.mp-price__photo--none { display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #f7e6ee 0%, #ebe6fa 100%); color: #a07fae; font-size: var(--fs-18); font-weight: 600; }
.mp-price__text { display: grid; gap: 4px; min-width: 0; padding-top: 1px; }
.mp-price__title { font-weight: 600; line-height: 1.3; overflow-wrap: break-word; }
.mp-price__time { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: var(--fs-13); }
.mp-price__time .icon { width: 14px; height: 14px; }
.mp-price__cost { padding-top: 1px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mp-price__cost small { font-size: var(--fs-12); font-weight: 500; color: var(--muted); }
.mp-price__cost--agreed { max-width: 9.5em; white-space: normal; font-size: var(--fs-13); font-weight: 600; line-height: 1.3; color: var(--text-2); }

/* .gallery из luk.css задаёт свою рамку и отступы — у работ и услуги их заменяют карточки страницы. */
.mp .mp-works.gallery { overflow: hidden; padding: 16px 16px; margin: 0; }
.mp-works .mp-title { margin-bottom: 12px; }
.mp-works .mp-works__track { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px; }
.mp-works .mp-works__track::-webkit-scrollbar { display: none; }
.mp-works .gallery__track > .gallery__main { flex: 0 0 42%; width: 42%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r-16); background: var(--surface-2); scroll-snap-align: start; scroll-snap-stop: normal; }

.mp-listings h2 { margin-bottom: 12px; }

.mp-hours__place { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; color: var(--text-2); }
.mp-hours__place .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--muted); flex: none; }
.mp-hours__address { display: block; color: var(--muted); font-size: var(--fs-14); }
.mp-hours dl { margin: 0; display: grid; }
.mp-hours__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: var(--r-12); }
.mp-hours__row dt { color: var(--text-2); }
.mp-hours__row dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.mp-hours__off { color: var(--muted); font-weight: 500 !important; }
.mp-hours__row--today { background: var(--brand-soft); }
.mp-hours__row--today dt, .mp-hours__row--today dd { color: var(--brand-dark); font-weight: 700; }
.mp-hours__now { font-size: var(--fs-12); font-weight: 600; opacity: .8; }

.mp--off .mp-hero { padding: 32px 20px; }
.mp-head--off { display: grid; justify-items: center; gap: 8px; }
.mp-head--off p { margin: 0; color: var(--muted); }

/* Жалоба на страницу — скромная ссылка в самом конце, не владельцу. */
.mp-report { margin: 4px 0 0; text-align: center; }
.mp-report a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }

.mp-preview { max-width: 1080px; margin: 0 auto 12px; padding: 8px 16px; border-radius: var(--r-12); background: var(--warn-bg); color: var(--warn); font-weight: 600; }

@media (min-width: 900px) {
  .mp { grid-template-columns: 360px minmax(0, 1fr); align-items: start; gap: 16px; }
  .mp-hero { position: sticky; top: calc(var(--header-h) + 16px); grid-row: 1 / span 2; }
  .mp-nav, .mp-body { grid-column: 2; }
  .mp-about, .mp-price, .mp .mp-works.gallery, .mp-listings, .mp-hours { padding: 24px 24px; }
  .mp-works .mp-works__track { margin: 0 -24px; padding: 0 24px; scroll-padding: 0 24px; }
  .mp-works .gallery__track > .gallery__main { flex-basis: 30%; width: 30%; }
  .mp--off { grid-template-columns: minmax(0, 520px); justify-content: center; }
  .mp:not(.mp--off) > .mp-report { grid-column: 2; }
}

/* ---------- Услуга ---------- */
.mp-item { max-width: 640px; margin: 0 auto; background: var(--surface); border-radius: var(--r-24); box-shadow: var(--shadow); padding: 12px 16px 20px; display: grid; gap: 16px; }
.mp-item__back { display: inline-flex; align-items: center; gap: 8px; justify-self: start; min-height: 44px; color: var(--text); text-decoration: none; font-weight: 600; }
.mp-item__back > .icon { width: 18px; height: 18px; color: var(--muted); }
.mp-item__back .avatar { width: 32px; height: 32px; font-size: .9rem; }
.mp-item .mp-item__photo.gallery { margin: 0; padding: 0; border-radius: var(--r-16); overflow: hidden; background: none; box-shadow: none; }
.mp-item .mp-item__photo .gallery__main { aspect-ratio: 1; object-fit: cover; background: var(--surface-2); }
.mp-item__head { display: grid; gap: 8px; }
.mp-item__group { color: var(--muted); font-size: var(--fs-13); font-weight: 600; }
.mp-item h1 { margin: 0; font-size: var(--fs-22); line-height: 1.25; letter-spacing: -.015em; overflow-wrap: break-word; }
.mp-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 2px 0 0; }
.mp-item__cost { font-size: var(--fs-22); font-weight: 700; font-variant-numeric: tabular-nums; }
.mp-item__cost small, .mp-item__more-cost small { font-size: .7em; font-weight: 500; color: var(--muted); }
.mp-item__cost--agreed { font-size: var(--fs-16); font-weight: 600; }
.mp-item__time { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.mp-item__time .icon { width: 16px; height: 16px; color: var(--muted); }
.mp-item > .btn--brand { width: 100%; min-height: var(--btn-h, 52px); font-size: var(--fs-15); }
.mp-item__hint { margin: -4px 0 0; color: var(--muted); font-size: var(--fs-13); text-align: center; }
.mp-item__more { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.mp-item__more h2 { margin: 0 0 4px; font-size: var(--fs-15); }
.mp-item__more ul { list-style: none; margin: 0; padding: 0; }
.mp-item__more li + li { border-top: 1px solid var(--line); }
.mp-item__more li a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; color: var(--text); text-decoration: none; }
.mp-item__more-cost { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mp-item__all { display: inline-flex; min-height: 40px; align-items: center; margin-top: 4px; color: var(--brand-dark); font-weight: 600; text-decoration: none; }

/* ---------- Запись: что выбрано (direct/write.html) ---------- */
.booking-card { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; padding: 12px; border-radius: var(--r-16); background: var(--surface-2); }
.booking-card__photo { width: 64px; height: 64px; border-radius: var(--r-12); object-fit: cover; flex: none; }
.booking-card > .avatar { width: 56px; height: 56px; }
.booking-card__text { display: grid; gap: 4px; min-width: 0; }
.booking-card__text strong { line-height: 1.3; overflow-wrap: break-word; }
.booking-card__text > span { color: var(--text-2); font-size: var(--fs-14); }
.booking-card__who { display: inline-flex; align-items: center; gap: 8px; color: var(--muted) !important; font-size: var(--fs-13) !important; }
.booking-card__who .avatar { width: 20px; height: 20px; font-size: .6rem; }

/* ---------- Блок мастера в объявлении ---------- */
.mp-teaser { margin-top: 16px; padding: 16px; border-radius: var(--r-16); background: var(--surface-2); border: 1px solid var(--line); }
.mp-teaser .mp-social { justify-content: flex-start; padding: 0 0 8px; gap: 8px; }
.mp-teaser .mp-social__item { width: 40px; height: 40px; background: var(--surface); }
.mp-teaser .mp-social__item .brand, .mp-teaser .mp-social__item .icon { width: 18px; height: 18px; }
.mp-teaser li + li { border-top: 1px solid var(--line); }
.mp-teaser li a { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 8px 0; color: var(--text); min-height: 44px; text-decoration: none; }
.mp-teaser li a span:last-child { font-weight: 700; white-space: nowrap; }
.mp-teaser__link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--brand-dark); text-decoration: none; min-height: 40px; }

/* ---------- Кабинет мастера ---------- */
.mp-editor { display: grid; gap: 12px; min-width: 0; }
.mpe-card { background: var(--surface); border-radius: var(--r-24); box-shadow: var(--shadow); padding: 16px 16px; scroll-margin-top: calc(var(--header-h) + 64px); min-width: 0; }
.mpe-card > h2 { margin: 0; font-size: var(--fs-16); }
.mpe-hint { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-13); line-height: 1.45; }

.mpe-head { display: grid; gap: 8px; }
.mpe-head > * { min-width: 0; }
.mpe-head__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mpe-head h1 { margin: 0; font-size: var(--fs-22); letter-spacing: -.02em; }
.mpe-status { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-size: var(--fs-12); font-weight: 600; }
.mpe-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mpe-status--on { background: var(--ok-bg); color: var(--ok); }
.mpe-status--off { background: var(--warn-bg); color: var(--warn); }
.mpe-head p { margin: 0; color: var(--text-2); line-height: 1.45; }
.mpe-link { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-12); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.mpe-link .icon { width: 18px; height: 18px; color: var(--brand); flex: none; }
.mpe-head__actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.mpe-head__actions .btn { min-width: 0; white-space: normal; padding: 8px 12px; text-align: center; line-height: 1.2; }
.mpe-head__actions .btn .icon { width: 18px; height: 18px; }

.mpe-nav { position: sticky; top: calc(var(--header-h) + 4px); z-index: 5; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 8px; margin: 0; border-radius: 999px; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px); box-shadow: var(--shadow); }
.mpe-nav::-webkit-scrollbar { display: none; }
.mpe-nav a { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 999px; color: var(--text-2); font-size: var(--fs-13); font-weight: 600; text-decoration: none; }
.mpe-nav a .icon { width: 14px; height: 14px; color: var(--ok); }
.mpe-nav a:active { background: var(--brand-soft); }

.mp-editor form { display: grid; gap: 12px; margin-top: 16px; min-width: 0; }
.mp-editor label { display: grid; gap: 8px; font-size: var(--fs-13); font-weight: 600; color: var(--text-2); min-width: 0; }
.mp-editor input:not([type=checkbox]):not([type=file]), .mp-editor textarea, .mp-editor select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 12px 16px; font: inherit; font-weight: 400; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-12); transition: border-color .12s, background-color .12s, box-shadow .12s; }
.mp-editor input:focus, .mp-editor textarea:focus, .mp-editor select:focus { outline: none; background: var(--surface); border-color: var(--brand); box-shadow: var(--focus); }
.mp-editor textarea { min-height: 132px; line-height: 1.5; resize: vertical; }
.mp-editor input[type=file] { font: inherit; font-size: var(--fs-13); font-weight: 400; color: var(--muted); width: 100%; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mp-editor input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 12px; padding: 8px 16px; min-height: var(--btn-h-sm); border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }  /* второстепенная, как во всём Luk (3.3) */
.mp-editor input[type=file]::-webkit-file-upload-button { font: inherit; font-weight: 600; margin-right: 12px; padding: 8px 16px; min-height: var(--btn-h-sm); border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }
.mpe-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mpe-save { justify-self: start; }
.mp-editor .mpe-save { min-width: 140px; }

.mpe-cover { position: relative; height: 128px; border-radius: var(--r-16); overflow: hidden; margin-top: 16px; background: linear-gradient(135deg, #f6d9e4 0%, #e3defb 55%, #d9e8fb 100%); }
.mpe-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpe-cover__empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: #8a6c9c; font-weight: 600; font-size: var(--fs-14); }
.mpe-cover__empty .icon { width: 20px; height: 20px; }
.mpe-avatar-row { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.mpe-avatar-row .avatar { width: 64px; height: 64px; font-size: 1.5rem; box-shadow: 0 0 0 3px var(--surface), 0 3px 10px rgba(22, 26, 60, .14); }
.mpe-avatar-row p { margin: 0; color: var(--muted); font-size: var(--fs-13); line-height: 1.4; }
.mpe-sub { margin: 20px 0 0; font-size: var(--fs-15); }

.mpe-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-editor .mpe-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: var(--fs-14); cursor: pointer; position: relative; }
.mpe-chip input { position: absolute; opacity: 0; pointer-events: none; }
.mpe-chip .icon { width: 16px; height: 16px; display: none; }
.mp-editor .mpe-chip:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.mpe-chip:has(input:checked) .icon { display: block; }
.mpe-chip:has(input:focus-visible) { box-shadow: var(--focus); }

.mpe-socials { display: grid; gap: 8px; }
.mp-editor .mpe-field-icon { grid-template-columns: 40px minmax(0, 1fr); column-gap: 8px; align-items: center; }
.mpe-field-icon > span { grid-column: 2; }
.mpe-field-icon > input { grid-column: 2; }
.mpe-field-icon > .brand, .mpe-field-icon > .icon { grid-column: 1; grid-row: 1 / span 2; align-self: end; width: 40px; height: 40px; padding: 8px; margin-bottom: 4px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); box-sizing: border-box; color: var(--text); }

.mp-editor .mpe-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: var(--fs-14); font-weight: 500; color: var(--text); cursor: pointer; }
.mp-editor .mpe-switch input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; margin: 0; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background-color .15s; }
.mp-editor .mpe-switch input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.mp-editor .mpe-switch input[type=checkbox]:checked { background: var(--brand); }  /* как «Сообщения в Telegram» и контакты в форме объявления (3.3) */
.mp-editor .mpe-switch input[type=checkbox]:checked::after { transform: translateX(18px); }
.mp-editor .mpe-switch input[type=checkbox]:focus-visible { box-shadow: var(--focus); outline: none; }

.mpe-contact { display: grid; gap: 4px; padding: 12px; border-radius: var(--r-16); background: var(--surface-2); border: 1px solid var(--line); }
.mp-editor .mpe-contact input:not([type=checkbox]) { background: var(--surface); }

.mpe-list { display: grid; gap: 8px; margin-top: 16px; }
.mp-editor .mp-editor__item { border-radius: var(--r-16); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.mp-editor__item > summary { display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; align-items: center; gap: 12px; padding: 8px 12px; min-height: 64px; cursor: pointer; list-style: none; }
.mp-editor__item > summary::-webkit-details-marker { display: none; }
.mpe-thumb { width: 44px; height: 44px; border-radius: var(--r-12); object-fit: cover; display: block; }
.mpe-thumb--none { display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #f7e6ee 0%, #ebe6fa 100%); color: #a07fae; font-weight: 600; }
.mpe-thumb--none .icon { width: 18px; height: 18px; }
.mpe-item__title { font-weight: 600; overflow-wrap: anywhere; line-height: 1.3; }
.mpe-item__group { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-12); font-weight: 500; }
.mpe-item__cost { font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.mpe-item__chev { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
.mp-editor__item[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mp-editor__item[open] .mpe-item__chev { transform: rotate(90deg); }
.mp-editor .mp-editor__item > form { margin: 0; padding: 16px 12px; }
.mp-editor .mp-editor__item > form + form { padding-top: 0; }
.mpe-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* «Договорная» — сумма не нужна: поле прячется, выбор цены на всю ширину. */
.mpe-two:has(option[value=agreed]:checked) { grid-template-columns: 1fr; }
.mpe-two:has(option[value=agreed]:checked) > label:has([name=amount]) { display: none; }
.mpe-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mpe-actions__save { flex: 1 1 0; min-width: 0; min-height: var(--btn-h, 46px); white-space: normal; line-height: 1.2; }
.mpe-actions__order { display: inline-flex; gap: 8px; }
.mp-editor .mpe-icon-btn { width: 46px; min-width: 46px; height: 46px; min-height: 46px; padding: 0; flex: none; }
.mpe-icon-btn .icon { width: 18px; height: 18px; }
.mpe-flip { transform: rotate(180deg); }
.mpe-saved { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 4px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: var(--fs-12); font-weight: 600; vertical-align: middle; animation: mpe-fade 4s ease-in forwards; }
.mpe-saved .icon { width: 13px; height: 13px; }
@keyframes mpe-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
.mp-editor .mpe-just-saved { animation: mpe-glow 2.4s ease-out; }
@keyframes mpe-glow { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .mpe-saved, .mp-editor .mpe-just-saved { animation: none; } }
.mpe-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.mpe-tools .btn { min-height: var(--btn-h-sm, 38px); padding: 8px 16px; font-size: var(--fs-13); }
.mpe-tools .btn .icon { width: 16px; height: 16px; }
.mpe-tools .mpe-danger { color: var(--danger); }
.mp-editor .mpe-add { border: 1.5px dashed var(--line-strong); background: var(--surface-2); }
.mp-editor .mpe-add > summary { color: var(--brand-dark); font-weight: 600; }
.mpe-add > summary .mpe-thumb--none { background: var(--brand-soft); color: var(--brand-dark); }

.mpe-hours { display: grid; gap: 2px; }
.mpe-day { display: grid; grid-template-columns: 30px minmax(0, 1fr) 12px minmax(0, 1fr); align-items: center; gap: 8px; padding: 4px 0; margin: 0; border: 0; min-width: 0; }
.mpe-day__name { font-weight: 700; color: var(--text-2); font-size: var(--fs-14); }
.mpe-day__dash { color: var(--muted); text-align: center; }
.mp-editor .mpe-day input[type=time] { min-height: 44px; padding: 8px 8px; text-align: center; font-size: var(--fs-14); }
.mpe-day label { display: contents; }

.mpe-slug { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; border-radius: var(--r-12); background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.mpe-slug:focus-within { border-color: var(--brand); box-shadow: var(--focus); background: var(--surface); }
.mpe-slug__prefix { padding: 0 2px 0 16px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.mp-editor .mpe-slug input:not([type=checkbox]) { border: 0; background: transparent; box-shadow: none; padding-left: 0; }

@media (min-width: 900px) {
  .mpe-card { padding: 24px 24px; }
  .mpe-head__actions { display: flex; }
  .mpe-socials { grid-template-columns: 1fr 1fr; }
}

/* Прокат: общая система страницы мастера, свободный текст цен и ручная доступность парка. */
.rp .mp-cover { background: linear-gradient(135deg, #d8efeb, #dee9f8 60%, #e6e1f6); }
.rp-lines { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.65; margin-bottom: 0; }
.rp-rates { font-variant-numeric: tabular-nums; }
.rp-nav { position: sticky; top: var(--topbar-h, var(--header-h)); z-index: 3; background: var(--bg); }
.rp #fleet, .rp #rates, .rp #about, .rp #hours, .rp #listings { scroll-margin-top: calc(var(--topbar-h, var(--header-h)) + 64px); }
.rp-fleet { list-style: none; padding: 0; margin: 12px 0 0; }
.rp-vehicle + .rp-vehicle { border-top: 1px solid var(--line); }
.rp-vehicle a { display: flex; align-items: center; gap: 12px; padding: 16px 0; color: var(--text); text-decoration: none; }
.rp-vehicle img, .rp-vehicle__empty { width: 88px; height: 88px; border-radius: var(--r-16); object-fit: cover; flex: none; background: var(--surface-2); }
.rp-vehicle__empty { display: grid; place-items: center; color: var(--muted); }
.rp-vehicle__body { display: grid; gap: 4px; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.rp-vehicle__cost { font-weight: 600; }
.rp-vehicle__note { color: var(--text-2); font-size: var(--fs-13); line-height: 1.4; }
.rp-vehicle--busy img, .rp-vehicle--busy .rp-vehicle__empty { opacity: .55; }
.rp-vehicle--busy strong, .rp-vehicle--busy .rp-vehicle__cost { color: var(--muted); }
.rp-badge { display: inline-block; justify-self: start; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-size: var(--fs-12); }
.rp-map { display: flex; gap: 8px; padding: 16px; background: var(--surface-2); border-radius: var(--r-16); overflow-wrap: anywhere; }
.rp-map > .icon { flex: none; }
.rp-map p { margin: 0 0 8px; }
.rp-map a { display: inline-flex; min-height: 44px; align-items: center; gap: 4px; }
.rp-editor-item { min-width: 0; border: 1px solid var(--line); border-radius: var(--r-16); overflow: hidden; }
.rp-editor-item .mp-editor__item { border: 0; margin: 0; }
.rp-status-form { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px; }
.rp-status-title { min-width: 0; flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.rp-status-form [data-status-result] { flex-basis: 100%; }
.rp-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; background: none; border: 0; padding: 0 2px; color: var(--brand-dark); font: inherit; cursor: pointer; }
.rp-toggle__track { width: 40px; height: 24px; background: var(--brand); border-radius: var(--r-16); padding: 4px; }
.rp-toggle__track::after { content: ''; display: block; width: 18px; height: 18px; border-radius: 50%; background: white; }
.rp-toggle.is-busy { color: var(--muted); }
.rp-toggle.is-busy .rp-toggle__track { background: var(--muted); }
.rp-toggle.is-busy .rp-toggle__track::after { transform: translateX(16px); }
.rp-item .gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.rp-item .gallery__main { width: 100%; flex: 0 0 100%; scroll-snap-align: start; object-fit: cover; }
@media (min-width: 900px) { .rp .mp-price { grid-column: 1 / -1; } .rp-fleet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; } }

.rp-editor-item .mp-editor__item > summary { grid-template-columns: minmax(0, 1fr) 18px; }
.rp-editor-item .mpe-add > summary { grid-template-columns: 44px minmax(0, 1fr) 18px; }

.rp-editor .mpe-nav { top: calc(var(--topbar-h, var(--header-h)) + 4px); }
.rp-editor .mpe-card, .rp-editor #photo, .rp-editor #avatar { scroll-margin-top: calc(var(--topbar-h, var(--header-h)) + 64px); }

/* Прокат, доводка архитектора 10.10: свободно сейчас, фильтр «Только свободные», строка парка в кабинете, плитки фото. */
.rp-free .icon { color: var(--ok); }
.rp-filter { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); font-size: var(--fs-13); font-weight: 600; color: var(--text-2); cursor: pointer; }
.rp-filter input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.rp-filter:has(input:checked) { background: var(--brand-soft); color: var(--brand-dark); }
.mp-price:has([data-free-only]:checked) .rp-vehicle--busy { display: none; }
.rp-vehicle__empty { font-size: var(--fs-22); font-weight: 600; color: #8f9bb3; background: linear-gradient(140deg, #e3f1ee, #e5e9f8); }

.rp-status-form { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 8px 12px; }
.rp-status-text { display: grid; gap: 2px; min-width: 0; }
.rp-status-title { font-weight: 600; line-height: 1.3; overflow-wrap: break-word; }
.rp-status-state { font-size: var(--fs-13); font-weight: 600; color: var(--ok); }
.rp-status-state.is-busy { color: var(--warn); }
.rp-status-form [data-status-result] { grid-column: 2 / -1; justify-self: start; margin: 0; }
.rp-status-form [data-status-result]:empty { display: none; }
.rp-status-form [data-status-result].is-error { background: var(--warn-bg); color: #6b4700; border-radius: var(--r-12); animation: none; }
.rp-toggle { gap: 8px; color: var(--text-2); font-size: var(--fs-13); font-weight: 600; }
.rp-toggle__track { position: relative; width: 46px; height: 28px; padding: 0; border-radius: 999px; background: var(--line-strong); transition: background-color .15s; }
.rp-toggle__track::after { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.rp-toggle.is-busy { color: var(--warn); }
.rp-toggle.is-busy .rp-toggle__track { background: #e8a33d; }
.rp-toggle.is-busy .rp-toggle__track::after { transform: translateX(18px); }
.rp-toggle:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-12); }
.rp-editor-item { background: var(--surface); }
.rp-editor-item .mp-editor__item > summary { min-height: 44px; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--brand-dark); font-weight: 600; font-size: var(--fs-14); }
.rp-edit-label { display: inline-flex; align-items: center; gap: 8px; }
.rp-edit-label .icon { width: 16px; height: 16px; }
.rp-photos__title { margin: 4px 12px 8px; font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
.rp-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 12px 16px; }
.mp-editor .rp-photo { position: relative; display: block; margin: 0; gap: 0; }
.rp-photo__pick { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; aspect-ratio: 1; border-radius: var(--r-12); overflow: hidden; border: 1.5px dashed var(--line-strong); background: var(--surface-2); color: var(--muted); font-size: var(--fs-12); cursor: pointer; }
.rp-photo.has-photo .rp-photo__pick { border-style: solid; border-color: var(--line); }
.rp-photo__pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rp-photo__pick .icon { width: 22px; height: 22px; }
.mp-editor .rp-photo__pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rp-photo__send { margin-top: 8px; width: 100%; }
.rp-photo__remove { position: absolute; top: 6px; right: 6px; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(16, 20, 30, .62); color: #fff; cursor: pointer; }
.rp-photo__remove .icon { width: 14px; height: 14px; }

/* Работы мастера в кабинете (замечание Даши 10.10.2026): свои фото — плитки с крестиком, фото из объявлений — ссылкой. */
.mp-editor .mpe-works { padding: 0; margin-top: 16px; }
.mpe-work-link { display: grid; gap: 4px; color: var(--text-2); text-decoration: none; font-size: var(--fs-12); }
.mpe-work-link .rp-photo__pick { border-style: solid; border-color: var(--line); }
.mpe-work-link__label { display: inline-flex; align-items: center; gap: 4px; justify-content: center; }
.mpe-work-link__label .icon { width: 12px; height: 12px; }


/* Аудит вида 11.10.2026, этап 2 (docs/reports/2026-10-11-premium-audit.md). */
/* A15. «по договорённости» на узком экране — под названием услуги, не вплотную к нему. */
@media (max-width: 420px) {
  .mp-price__item > a:has(.mp-price__cost--agreed) { grid-template-columns: minmax(0, 1fr); }
  .mp-price[data-photos] .mp-price__item > a:has(.mp-price__cost--agreed) { grid-template-columns: 60px minmax(0, 1fr); }
  .mp-price__cost--agreed { grid-column: -2; max-width: none; text-align: left; padding-top: 4px; }
}
/* A18. Якоря страницы и группы прайса — не меньше 44 px. */
.mp-nav a, .mp-price__nav a { min-height: 44px; display: inline-flex; align-items: center; }
