/* Plate Mate — партнёрские страницы (жители /residents/, управляющие /for-buildings/ и др.).
   Общие стили сайта — в brand.css. Префикс pr- = partnership. */
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }

/* ---------- hero ---------- */
.pr-hero { background: var(--black); color: var(--white); padding: 40px 0 36px; }
.pr-hero__in { display: grid; gap: 28px; align-items: center; }
.pr-kicker { color: var(--green); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
html[lang="th"] .pr-kicker { text-transform: none; letter-spacing: 0; font-size: 15px; }
.pr-hero h1 { font-size: clamp(36px, 6vw, 68px); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; line-height: .98; }
.pr-hero h1 span { display: block; }
.pr-hero__accent { color: var(--orange); }
html[lang="th"] .pr-hero h1 { line-height: 1.2; letter-spacing: 0; }
.pr-lead { font-size: clamp(16px, 1.7vw, 19px); color: #c9c9c9; margin-top: 18px; max-width: 54ch; }
.pr-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pr-multi { margin-top: 14px; color: #c9c9c9; font-size: 16px; max-width: 54ch; }
.pr-multi b { color: var(--green); }
.pr-hero__card { position: relative; }
.pr-hero__card img { display: block; width: 100%; height: auto; max-width: 440px; margin: 0 auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 62%; border-radius: 20px; border: 1px solid #222; }
.pr-facts { list-style: none; padding: 0; margin: 14px auto 0; max-width: 440px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pr-facts li { background: #141414; border: 1px solid #262626; border-radius: 14px; padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.pr-facts b { font-size: 18px; font-weight: 800; color: var(--green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pr-facts li:nth-child(2) b { color: var(--orange); }
.pr-facts li:nth-child(3) b { color: var(--white); }
.pr-facts span { font-size: 12px; color: var(--gray-60); line-height: 1.3; }
@media (max-width: 480px) {
  .pr-facts { grid-template-columns: 1fr 1fr; }
  .pr-facts li:nth-child(3) { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; }
}
@media (min-width: 860px) {
  .pr-hero { padding: 72px 0 64px; }
  .pr-hero__in { grid-template-columns: 1.2fr .8fr; gap: 48px; }
  .pr-hero__card img { aspect-ratio: 5 / 6; max-height: 460px; object-position: 50% 78%; }
}

/* ---------- секции ---------- */
.pr-section { padding: 52px 0; }
.pr-section--dark { background: var(--black); color: var(--white); }
@media (min-width: 768px) { .pr-section { padding: 76px 0; } }

.pr-steps { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pr-steps li { background: var(--black); color: var(--white); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.pr-steps__top { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 6px; }
.pr-steps__top b { font-size: 48px; font-weight: 800; line-height: .8; }
.pr-steps__top .ic { color: var(--orange); }
.pr-steps h3 { text-transform: uppercase; font-size: 16px; }
html[lang="th"] .pr-steps h3 { text-transform: none; }
.pr-steps p { color: #bdbdbd; font-size: 15px; }


/* ---------- карусель меню ---------- */
.pr-section--tight { padding-top: 0; }
.pr-sub { margin-top: 8px; max-width: 62ch; }
.pr-menu-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.pr-car-nav { display: none; gap: 8px; flex: none; }
@media (hover: hover) and (min-width: 768px) { .pr-car-nav { display: flex; } }
.pr-car-btn { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--black); background: transparent; color: var(--black); font-size: 20px; font-weight: 700; cursor: pointer; }
.pr-car-btn:hover:not(:disabled) { background: var(--black); color: var(--white); }
.pr-car-btn:disabled { opacity: .3; cursor: default; }
/* Лента на всю ширину экрана, первая карточка выровнена по сетке .wrap (1200px) */
.pr-car { --edge: max(16px, calc((100vw - 1200px) / 2 + 16px));
  list-style: none; margin: 24px 0 0; padding: 0 var(--edge) 8px; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 72vw, 280px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); scrollbar-width: none; overscroll-behavior-x: contain; }
.pr-car::-webkit-scrollbar { display: none; }
.pr-dish { scroll-snap-align: start; background: var(--black); color: var(--white); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.pr-dish__img { position: relative; aspect-ratio: 1 / 1; background: #141414; }
.pr-dish__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pr-dish__price { position: absolute; right: 5%; bottom: 5%; background: var(--orange); color: var(--black); font-weight: 800; font-size: 17px; padding: 4px 12px; border-radius: 999px; }
.pr-dish h3 { padding: 14px 16px 16px; font-size: 15px; font-weight: 800; text-transform: uppercase; line-height: 1.2; }
html[lang="th"] .pr-dish h3 { text-transform: none; }
.pr-menu-more { display: inline-block; margin-top: 18px; font-weight: 700; color: var(--black); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- форма ---------- */
.pr-form-wrap { max-width: 820px; margin: 0 auto; }
.pr-form-head h2 { color: var(--white); }
.pr-form-sub { margin-top: 8px; color: var(--gray-60); }
.pr-form { margin-top: 26px; display: grid; gap: 16px 14px; grid-template-columns: 1fr 1fr; background: #111; border: 1px solid #262626; border-radius: 22px; padding: 22px; }
@media (max-width: 599px) { .pr-form { grid-template-columns: 1fr; padding: 16px; } }
.pr-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; border: 0; padding: 0; margin: 0; font-size: 14px; font-weight: 700; color: #d9d9d9; }
.pr-field small { font-weight: 500; color: var(--gray-60); }
.pr-field legend { padding: 0; margin-bottom: 7px; }
.pr-field--wide { grid-column: 1 / -1; }
.pr-field input, .pr-field select, .pr-field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #333; background: #1b1b1b;
  color: var(--white); font: inherit; font-size: 16px; font-weight: 500;
}
.pr-field textarea { resize: vertical; min-height: 90px; }
.pr-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #bbb 50%), linear-gradient(135deg, #bbb 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.pr-field input:focus, .pr-field select:focus, .pr-field textarea:focus { outline: none; border-color: var(--green); }
.pr-field .invalid, .pr-check .invalid { border-color: #ff6b4a !important; outline: 2px solid rgba(255, 107, 74, .35); }
.pr-seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: 14px; background: #1b1b1b; border: 1.5px solid #333; }
.pr-seg label { position: relative; flex: 1 1 auto; cursor: pointer; }
/* скрытые радио и чекбоксы сегментов: внутри .pr-field на них действует width: 100% обычных полей — без этого форма уезжает вбок на телефоне */
.pr-seg input { position: absolute; top: 0; left: 0; width: 1px !important; height: 1px; min-height: 0 !important; padding: 0 !important; margin: 0; border: 0; opacity: 0; pointer-events: none; }
.pr-seg span { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 12px; border-radius: 10px; font-weight: 700; color: #cfcfcf; }
.pr-seg input:checked + span { background: var(--green); color: #000; }
.pr-seg input:focus-visible + span { outline: 3px solid var(--orange); }
.pr-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.pr-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: #cfcfcf; line-height: 1.45; cursor: pointer; }
.pr-check input { flex: none; width: 22px; height: 22px; margin-top: 1px; accent-color: var(--green); }
.pr-error { color: #ff8a70; font-weight: 700; font-size: 14px; }

.pr-done { margin-top: 26px; background: #111; border: 1.5px solid var(--green); border-radius: 22px; padding: 30px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.pr-done h3 { font-size: 24px; font-weight: 800; }
.pr-done p { color: #cfcfcf; }

/* ---------- что получает здание + FAQ ---------- */
.pr-bld { display: grid; gap: 14px; margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.pr-bld > div { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border-radius: var(--radius); padding: 18px; }
.pr-bld h3 { text-transform: uppercase; font-size: 15px; margin-top: 2px; }
html[lang="th"] .pr-bld h3 { text-transform: none; }
.pr-bld p { color: var(--graphite); font-size: 14px; margin-top: 4px; }

/* полные условия программы */
.pr-terms { margin-top: 40px; border-radius: var(--radius); background: var(--white); }
.pr-terms > summary { padding: 18px 20px; font-size: 17px; font-weight: 800; cursor: pointer; }
.pr-terms .legal { padding-top: 0; max-width: none; }
.pr-check a { color: var(--green); }

.pr-faq { margin-top: 56px; display: grid; gap: 20px; }
.pr-faq__list { display: grid; gap: 10px; }
.pr-faq details { border-radius: var(--radius); background: var(--white); overflow: hidden; }
.pr-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; font-size: 17px; font-weight: 700; cursor: pointer; list-style: none; }
.pr-faq summary::-webkit-details-marker { display: none; }
.pr-faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--petal); font-size: 20px; transition: transform .2s ease; }
.pr-faq details[open] summary::after { transform: rotate(45deg); }
.pr-faq details p { padding: 0 20px 20px; color: var(--graphite); max-width: 70ch; }
@media (min-width: 900px) { .pr-faq { grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; } }

/* =========================================================================
   Компоненты для трёх страниц (23.10.2026)
   ========================================================================= */

/* Первый экран: свой акцент у каждой аудитории.
   Агенты — чёрный (экономика, результат); жители — кремовый (еда, удобство); управляющие — небесный (доверие). */
.pr-hero--residents { background: var(--petal); color: var(--black); }
.pr-hero--residents .pr-lead { color: var(--graphite); }
.pr-hero--residents .pr-kicker { color: #4f6a00; }
.pr-hero--buildings { background: var(--sky); color: var(--black); }
.pr-hero--buildings .pr-lead { color: #1f2f38; }
.pr-hero--buildings .pr-kicker { color: #12384d; }
.pr-hero--residents .pr-hero__accent { color: #4f6a00; }
.pr-hero--buildings .pr-hero__accent { color: #12384d; }
.pr-hero--residents h1, .pr-hero--buildings h1 { text-transform: none; letter-spacing: -.02em; line-height: 1.05; }
.pr-hero--residents .pr-hero__card img, .pr-hero--buildings .pr-hero__card img { border-color: transparent; }
/* список фактов в первом экране на светлом фоне */
.pr-points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 8px; }
.pr-points li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.pr-points li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.pr-hero:not(.pr-hero--residents):not(.pr-hero--buildings) .pr-points li { color: #e6e6e6; }

/* Секции на светлом фоне */
.pr-section--white { background: var(--white); }
.pr-section--mint { background: #e3f3ea; }
.pr-section h2 + .pr-sub, .pr-section h2 + p { margin-top: 8px; }

/* Карточки с иконкой (польза, ситуации, критерии) */
.pr-cards { display: grid; gap: 14px; margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.pr-card { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border-radius: var(--radius); padding: 18px; }
.pr-section--white .pr-card { background: var(--petal); }
.pr-card h3 { font-size: 16px; font-weight: 800; margin-top: 2px; }
.pr-card p { color: var(--graphite); font-size: 14px; margin-top: 4px; }

/* Шаги на светлом фоне (жители: выбрать → оплатить → забрать → разогреть) */
.pr-flow { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); counter-reset: flow; }
.pr-flow li { counter-increment: flow; background: var(--white); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.pr-flow li::before { content: counter(flow); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--black); color: var(--green); font-weight: 800; }
.pr-flow h3 { font-size: 16px; font-weight: 800; }
.pr-flow p { color: var(--graphite); font-size: 14px; }
.pr-note { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: rgba(229, 124, 4, .1); border-left: 4px solid var(--orange); font-size: 14px; color: #3b2a12; max-width: 70ch; }
.pr-section--dark .pr-note { background: rgba(229, 124, 4, .14); color: #f1d6b4; }

/* Таблица (распределение ответственности и т. п.) */
.pr-table-wrap { margin-top: 20px; overflow-x: auto; border-radius: var(--radius); background: var(--white); }
.pr-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.pr-table th, .pr-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid #efe4d8; }
.pr-table th { background: #f7efe8; font-weight: 800; font-size: 14px; }
.pr-table tr:last-child td { border-bottom: 0; }
.pr-table td:first-child { font-weight: 700; white-space: nowrap; }

/* Реальные установки — список работающих локаций из data/machines.js */
.pr-locs { display: grid; gap: 14px; margin-top: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.pr-locs__city { background: var(--white); border-radius: var(--radius); padding: 18px 20px; }
.pr-locs__city h3 { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--graphite); }
html[lang="th"] .pr-locs__city h3 { text-transform: none; letter-spacing: 0; }
.pr-locs__city ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.pr-locs__city a { color: var(--black); font-weight: 600; text-decoration: none; }
.pr-locs__city a:hover { color: #4f6a00; text-decoration: underline; }

/* Форма: контакт, «не знаю», варианты-чипы, подсказки */
.pr-contact input[name="contact_value"] { margin-top: 8px; }
.pr-field__row { display: flex; flex-direction: column; gap: 7px; }
.pr-unknown { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: #bdbdbd; cursor: pointer; }
.pr-unknown input { width: 18px !important; min-height: 0 !important; height: 18px; padding: 0 !important; accent-color: var(--green); }
.pr-field input:disabled { opacity: .45; }
.pr-hint { font-size: 13px; font-weight: 500; color: var(--gray-60); }
.pr-flag { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #d9d9d9; cursor: pointer; }
.pr-flag input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--green); }
.pr-exists { padding: 12px 14px; border-radius: 12px; background: #142000; border: 1.5px solid var(--green); color: #e9f3cf; font-size: 14px; }
.pr-exists a { color: var(--green); font-weight: 700; }
.pr-error a { color: inherit; text-decoration: underline; }

/* Блок после успешной заявки */
.pr-done__next { color: #cfcfcf; }
.pr-done__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.pr-done .btn--outline-light { border-color: #3a3a3a; }

/* Переход для другой роли */
.pr-cross { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 40px; padding: 18px 20px; border-radius: var(--radius); background: var(--white); font-size: 15px; }
.pr-cross a { color: var(--black); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pr-cross a:hover { color: #4f6a00; }


/* ---------- Поиск и подтверждение здания (assets/place-picker.js) ---------- */
.pp__box { position: relative; }
.pp__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #161616; border: 1.5px solid #333; border-radius: 14px; box-shadow: 0 14px 30px rgba(0,0,0,.45); max-height: 320px; overflow-y: auto; }
.pp__opt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--white); }
.pp__opt b { font-weight: 700; font-size: 15px; }
.pp__opt span { font-size: 13px; color: #a8a8a8; font-weight: 500; }
.pp__opt:hover, .pp__opt.is-active { background: #232323; }
.pp__opt.is-active { outline: 1.5px solid var(--green); }
.pp__msg { padding: 10px 12px; font-size: 14px; font-weight: 500; color: #bdbdbd; }
.pp__attr { padding: 6px 12px 2px; font-size: 11px; font-weight: 500; color: #8a8a8a; text-align: right; }
.pp__card { margin-top: 4px; padding: 14px; border-radius: 14px; background: #142000; border: 1.5px solid var(--green); display: grid; gap: 12px; }
.pp__card.is-invalid { border-color: #ff6b4a; background: #2a1209; }
.pp__info { display: flex; flex-direction: column; gap: 3px; }
.pp__found { font-size: 12px; font-weight: 700; color: #b7c98a; text-transform: uppercase; letter-spacing: .06em; }
html[lang="th"] .pp__found { text-transform: none; letter-spacing: 0; }
.pp__name { font-size: 17px; font-weight: 800; color: var(--white); }
.pp__addr { font-size: 14px; font-weight: 500; color: #cfcfcf; }
.pp__actions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 4px; }
.pp__maplink, .pp__change { padding: 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pp__change { color: #cfcfcf; }
.pp__map { height: 170px; border-radius: 12px; overflow: hidden; background: #1b1b1b; }
.pp__manual { justify-self: start; align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: #bdbdbd; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pp__fallback { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
/* галочка подтверждения стоит внутри .pr-field — отменяем правила для обычных полей ввода */
.pp__confirm input[type="checkbox"] { width: 20px !important; height: 20px; min-height: 0 !important; padding: 0 !important; }
.pp__map .maplibregl-ctrl-attrib { font-size: 10px; }
