/* Оформление «Лесной премиум»: тёмная хвоя, сливочный текст, латунные акценты. */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;700&family=Inter:wght@400;600&display=swap");

:root {
  --bg: #12201a;
  --surface: #182a22;
  --text: #efe9dc;
  --muted: #a9b3a7;
  --line: #2a3f34;
  --accent: #c9a96a;
  --accent-ink: #16241d;
  --accent-soft: #223a2f;
  --warn: #e8a07c;
  --radius: 6px;
  --btn-radius: 4px;
  --shadow: 0 10px 40px rgba(0,0,0,.35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --hs-sky: #1f3a2e; --hs-grass: #2f5240; --hs-wall: #d9c9a8; --hs-roof: #0e1a14; --hs-win: #e9c97f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--font);
}
h1, h2, h3, .logo, .price, .pay-sum { font-family: var(--font-head); font-weight: 700; }
.house-svg .hs-sky { fill: var(--hs-sky); }
.house-svg .hs-grass { fill: var(--hs-grass); }
.house-svg .hs-wall { fill: var(--hs-wall); }
.house-svg .hs-roof { fill: var(--hs-roof); }
.house-svg .hs-win { fill: var(--hs-win); }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 620px; padding-top: 48px; padding-bottom: 48px; }
.muted { color: var(--muted); }

.site-header { border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { font-size: 22px; letter-spacing: .04em; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo svg { color: var(--accent); }
.site-header nav a { color: var(--muted); text-decoration: none; margin-left: 18px; font-size: 15px; }
.site-header nav a:hover { color: var(--accent); }

.hero { text-align: center; padding: 72px 0 32px; }
.hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 500; line-height: 1.1; margin: 0 0 14px; }
.hero p { margin: 0 auto; color: var(--muted); max-width: 640px; }
.steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.steps span { border: 1px solid var(--accent); color: var(--accent); padding: 6px 14px; border-radius: 99px; font-size: 14px; letter-spacing: .03em; }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 18px 0 26px; }
.filters select, .filters input { font: inherit; padding: 9px 12px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); }

.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); padding-bottom: 56px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.house { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.house:hover { transform: translateY(-3px); border-color: var(--accent); }
.house .pic { aspect-ratio: 1 / 1; background: var(--accent-soft); overflow: hidden; }
.house .pic img, .house .pic svg { width: 100%; height: 100%; object-fit: cover; }
.house .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.house h3 { margin: 0; font-size: 26px; line-height: 1.15; }
.specs { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 14px; }
.house .bottom { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; }
.price { font-size: 26px; color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); text-transform: uppercase; letter-spacing: .12em; font-size: 14px; }
.btn-primary:hover { background: #d8bb80; }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-lg { padding: 15px 22px; width: 100%; }

.project { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 28px; padding: 32px 0 56px; align-items: start; }
.gallery .main { border-radius: var(--radius); overflow: hidden; background: var(--accent-soft); aspect-ratio: 1 / 1; }
.gallery .main img, .gallery .main svg { width: 100%; height: 100%; object-fit: cover; }
.project-nav { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin: 4px 0 18px; }
.project-nav:empty { display: none; }
.pn-back { color: var(--muted); text-decoration: none; white-space: nowrap; }
.pn-back:hover { color: var(--accent); }
.pn-filters { margin: 0; flex: 1; justify-content: center; }
.pn-arrows { display: flex; align-items: center; gap: 10px; }
.pn-arrow { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 26px; line-height: 1; text-decoration: none; padding-bottom: 3px; }
.pn-arrow:hover { border-color: var(--accent); color: var(--accent); }
.pn-arrow.off { opacity: .35; pointer-events: none; }
.pn-count { font-size: 14px; white-space: nowrap; min-width: 52px; text-align: center; }
/* Боковые стрелки: кружок со стрелкой и под ним подпись — на какой проект ведёт. */
.pn-side { position: fixed; top: 50%; transform: translateY(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: 132px; text-decoration: none; }
.pn-side .pn-arrow { width: 48px; height: 48px; font-size: 30px; box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
.pn-side:hover .pn-arrow { border-color: var(--accent); color: var(--accent); }
.pn-side-left { left: 14px; align-items: flex-start; }
.pn-side-right { right: 14px; align-items: flex-end; text-align: right; }
.pn-side.off { display: none; }
.pn-side-label { display: block; max-width: 132px; padding: 6px 9px; border-radius: var(--btn-radius); background: rgba(18, 32, 26, .88); border: 1px solid var(--line); color: var(--text); font-size: 12px; line-height: 1.3; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); }
.pn-side-label small { display: block; color: var(--muted); font-size: 11px; }
.pn-side-label .pn-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.pn-side:hover .pn-side-label { border-color: var(--accent); }
.pn-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.pn-bottom > a { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; min-width: 0; flex: 1; }
.pn-bottom > a.pn-next { justify-content: flex-end; text-align: right; }
.pn-bottom > a:hover { color: var(--accent); }
.pn-bottom > a:hover .pn-arrow { border-color: var(--accent); color: var(--accent); }
.pn-bottom .pn-arrow { flex: none; }
.pn-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Свайп между проектами: страница уезжает в сторону, пока грузится следующий проект. */
body.swipe-next main, body.swipe-prev main { transition: transform .25s ease, opacity .25s ease; opacity: .3; }
body.swipe-next main { transform: translateX(-40px); }
body.swipe-prev main { transform: translateX(40px); }
.swipe-hint { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; padding: 10px 16px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; animation: hint-fade 4s ease forwards; }
@keyframes hint-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
/* Узкий экран: места по бокам мало — подпись показывается при наведении на стрелку. */
@media (max-width: 1500px) {
  .pn-side .pn-arrow { width: 40px; height: 40px; font-size: 26px; }
  .pn-side-left { left: 4px; } .pn-side-right { right: 4px; }
  .pn-side-label { display: none; }
  .pn-side:hover .pn-side-label, .pn-side:focus-visible .pn-side-label { display: block; }
}
@media (max-width: 640px) { .pn-filters { order: 3; flex-basis: 100%; } .pn-arrows { margin-left: auto; } .pn-side { display: none; } .pn-name { display: none; } }
.house .pic { position: relative; }
.card-size + .card-size { margin-top: 2px; }
.card-size { margin-top: 8px; font-size: 14px; color: var(--muted); }
.card-size b { color: var(--text); font-weight: 600; }
.scrub-bars { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 4px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.house .pic:hover .scrub-bars { opacity: 1; }
.gallery .main:has(img) { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6, 12, 9, .94); display: flex; align-items: center; justify-content: center; padding: 48px 64px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .08); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 32px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: var(--accent); color: #12201a; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 12px; right: 12px; }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .7); font-size: 14px; }
@media (max-width: 640px) { .lightbox { padding: 56px 8px; } .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; } }
.scrub-bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .45); box-shadow: 0 0 3px rgba(0, 0, 0, .4); }
.scrub-bars i.on { background: var(--accent); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--btn-radius); cursor: pointer; opacity: .65; }
.thumbs img.active { opacity: 1; outline: 2px solid var(--accent); }
.comments-card { margin-top: 20px; }
.comments-card h2 { margin: 0 0 6px; }
.comments-card > p { margin: 0 0 14px; }
/* Виджет ВК всегда светлый — даём ему светлую подложку на тёмной странице. */
.vk-comments { background: #fff; border-radius: var(--btn-radius); padding: 8px; min-height: 120px; }
.video-card { margin-top: 20px; }
.video-card h2 { margin: 0 0 14px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--btn-radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Конструктив дома: вкладки «Видео» / «Листы КР» и просмотр листов (без увеличения) */
.kv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.video-card .kv-head h2 { margin: 0; }
.kv-tabs { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg); }
.kv-tabs button { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 16px; border: 0; border-radius: 99px; background: none; color: var(--muted); cursor: pointer; }
.kv-tabs button span { font-weight: 400; opacity: .75; margin-left: 4px; }
.kv-tabs button.on { background: var(--accent); color: var(--accent-ink); }
.kv-tabs button:not(.on):hover { color: var(--text); }
.kr-view { position: relative; aspect-ratio: 1200 / 849; border-radius: var(--btn-radius); overflow: hidden; background: #fff; }
.kr-view img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.kr-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(18, 32, 26, .75); color: #fff; font-size: 28px; line-height: 1; padding-bottom: 3px; cursor: pointer; }
.kr-nav:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); }
.kr-nav:disabled { opacity: .25; cursor: default; }
.kr-prev { left: 8px; }
.kr-next { right: 8px; }
.kr-bar { display: flex; align-items: center; gap: 14px; margin-top: 10px; font-size: 14px; color: var(--muted); }
.kr-bar span { white-space: nowrap; min-width: 108px; }
.kr-bar input { flex: 1; accent-color: var(--accent); }
.kr-note { font-size: 12px; margin: 8px 0 0; }
.project h1 { margin: 0 0 6px; font-size: 38px; line-height: 1.1; }
.project h2 { font-size: 26px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.spec-table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.spec-table td:last-child { text-align: right; font-weight: 600; }
.includes { padding-left: 20px; margin: 8px 0 0; }
.includes li::marker { color: var(--accent); }
.buy { position: sticky; top: 16px; }
.buy .price { font-size: 40px; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.old-price { color: var(--muted); font-size: 18px; }
.btn-discount { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-discount:hover { background: var(--accent-soft); }
.share-panel { margin-top: 14px; padding: 16px; border: 1px dashed var(--accent); border-radius: var(--radius); background: var(--bg); }
.share-panel p { margin: 0 0 12px; }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-vk { background: #0077ff; border-color: #0077ff; color: #fff; }
.share-ok { background: #ee8208; border-color: #ee8208; color: #fff; }
.share-vk:hover, .share-ok:hover { filter: brightness(1.1); }
.share-status { margin: 12px 0 0 !important; font-size: 14px; }
.shot { margin-top: 12px; }
.shot-drop { display: grid !important; place-items: center; gap: 8px; min-height: 84px; padding: 12px; margin: 0 !important; border: 1px dashed var(--line); border-radius: var(--btn-radius); color: var(--text) !important; text-align: center; cursor: pointer; }
.shot-drop:hover, .shot-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.shot-capture { width: 100%; margin-bottom: 8px; border-color: var(--accent); color: var(--accent); background: transparent; }
.shot-hint { margin: 0 0 8px !important; font-size: 13px; text-align: center; }
.shot-drop img { max-height: 160px; width: auto; border-radius: 4px; }
#share-confirm { width: 100%; margin-top: 10px; }
.discount-ok { margin-top: 10px; padding: 8px 12px; border-radius: var(--btn-radius); background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
.house .card-price { display: block; }
.card-old { display: block; font: 600 26px/1.1 var(--font-head); color: var(--muted); text-decoration-thickness: 2px; }
.card-new { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.card-new .price { font-size: 34px; line-height: 1.1; }
.badge-discount { padding: 4px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; white-space: nowrap; }
.buy label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
.buy input[type=email] { width: 100%; font: inherit; padding: 12px 14px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.buy input[type=email]:focus { outline: none; border-color: var(--accent); }
.check { display: flex !important; gap: 8px; align-items: flex-start; color: var(--text) !important; }
.check input { margin-top: 4px; accent-color: var(--accent); }
.sbp-note { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.error { color: var(--warn); font-size: 14px; min-height: 20px; margin: 8px 0; }

.status-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.status-icon.wait { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.badge { display: inline-block; border: 1px solid var(--accent); color: var(--accent); padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; letter-spacing: .04em; margin-bottom: 10px; }
.pay-mock { text-align: center; }
.pay-mock form { display: grid; gap: 10px; margin-top: 18px; }
.pay-sum { font-size: 48px; color: var(--accent); margin: 12px 0 4px; }

.how { max-width: 820px; padding-bottom: 56px; }
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.how-steps > li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.how-steps ul li { margin-bottom: 6px; }
.how-steps h2 { margin: 2px 0 8px; font-size: 28px; }
.how-steps p, .how-steps ul { margin: 0 0 8px; }
.how-steps ul { padding-left: 20px; }
.how-steps ul li::marker { color: var(--accent); }
@media (max-width: 560px) {
  .how-steps > li { grid-template-columns: 1fr; gap: 10px; }
}
.how-num { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); display: grid; place-items: center; font: 700 28px/1 var(--font-head); }
.faq { margin-top: 28px; }
.faq h2 { margin: 0 0 10px; font-size: 30px; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq summary::marker { color: var(--accent); }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.faq .contact { margin: 16px 0 0; }
.how-cta { max-width: 360px; margin: 28px auto 0; }
.steps a { text-decoration: none; }
.buy-help { display: block; margin-top: 10px; font-size: 14px; }

.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.doc h1 { font-size: 36px; line-height: 1.15; }
.doc h2 { font-size: 24px; margin-top: 26px; }

/* Вход, регистрация, личный кабинет */
.site-header nav a.nav-account { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); max-width: 220px; }
.site-header nav a.nav-admin { color: var(--accent); }
.nav-account small { font-size: 11px; padding: 1px 6px; border-radius: 99px; border: 1px solid currentColor; opacity: .8; }
.nav-logout { font: inherit; font-size: 14px; margin-left: 14px; padding: 5px 12px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; }
.nav-logout:hover { color: var(--accent); border-color: var(--accent); }
.nav-account span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-card { max-width: 460px; margin: 0 auto; }
.auth-card h1 { margin: 0 0 4px; }
.auth-tabs { display: flex; gap: 4px; margin: 20px 0 4px; border-bottom: 1px solid var(--line); }
.auth-tabs button { flex: 1; font: inherit; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px; cursor: pointer; margin-bottom: -1px; }
.auth-tabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.auth-msg:empty { display: none; }
.auth-msg.ok { color: var(--accent); }
.social-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.btn.social { display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; border: 0; font-weight: 600; }
.social-vk { background: #0077ff; }
.social-ok { background: #ee8208; }
.social-google { background: #fff; color: #1f1f1f !important; }
.social-yandex { background: #fff; color: #1f1f1f !important; }
.btn.social:hover { filter: brightness(1.08); }
.btn.social.off { opacity: .35; cursor: not-allowed; filter: grayscale(.6); }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0 4px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-form label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; }
.auth-form input:not([type=checkbox]) { width: 100%; font: inherit; padding: 12px 14px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-form .btn-primary { width: 100%; margin-top: 18px; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px !important; }
.pass-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: var(--btn-radius); color: var(--muted); cursor: pointer; }
.pass-eye:hover, .pass-eye.on { color: var(--accent); }
.link-btn { display: block; margin: 12px auto 0; font: inherit; font-size: 14px; background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--accent); }
.auth-note { font-size: 13px; margin: 18px 0 0; }
.auth-demo { font-size: 13px; margin: 18px 0 0; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: var(--btn-radius); color: var(--muted); }
.auth-demo b { color: var(--text); }
.auth-nologin { font-size: 14px; margin: 0 0 18px; padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: var(--btn-radius); background: var(--accent-soft); line-height: 1.5; }
.auth-nologin b { color: var(--accent); }
.auth-nologin a { white-space: nowrap; }
.account-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.account-head h1 { margin: 0 0 4px; }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.order-title { color: var(--text); font-weight: 600; text-decoration: none; }
.order-title:hover { color: var(--accent); }
.order-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.badge-wait { padding: 3px 10px; border-radius: 99px; border: 1px solid var(--warn); color: var(--warn); font-size: 13px; }
.account-note { font-size: 13px; margin: 14px 0 0; }
@media (max-width: 480px) { .social-btns { grid-template-columns: 1fr; } }

/* Защита от копирования (кроме администратора): текст не выделяется, картинки не перетаскиваются
   и не сохраняются долгим нажатием на телефоне. Поля ввода и редактируемый текст работают как обычно. */
body.protect { -webkit-user-select: none; user-select: none; }
body.protect img { -webkit-user-drag: none; -webkit-touch-callout: none; }
body.protect input, body.protect textarea, body.protect select, body.protect [contenteditable] { -webkit-user-select: text; user-select: text; }

/* Тексты страниц из коллекции pages: прячем до загрузки, чтобы не мелькал старый текст */
[data-content]:not(.ready) { visibility: hidden; }

/* Режим администратора на сайте */
.admin-bar { background: var(--accent); color: var(--accent-ink); font-size: 14px; position: sticky; top: 0; z-index: 60; }
.admin-bar .container { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.ab-title { font-weight: 700; margin-right: auto; }
body:has(.admin-bar) .buy { top: 56px; }
.editing .buy { position: static; }
.ab-btn { font: inherit; font-weight: 600; background: rgba(0, 0, 0, .12); color: var(--accent-ink); border: 0; border-radius: var(--btn-radius); padding: 5px 12px; cursor: pointer; text-decoration: none; }
.ab-btn:hover { background: rgba(0, 0, 0, .22); }
.ab-btn.on { background: var(--accent-ink); color: var(--accent); }
.badge-hidden { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 99px; background: var(--warn); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.house .pic .badge-hidden { position: absolute; top: 10px; left: 10px; margin: 0; }
.editing .is-editable { outline: 1px dashed var(--accent); outline-offset: 4px; border-radius: 2px; cursor: text; min-height: 1em; }
.editing .is-editable:hover { outline-style: solid; }
.editing .is-editable:focus { outline: 2px solid var(--accent); background: rgba(201, 169, 106, .06); }
.edit-hint { font-size: 13px; color: var(--accent); margin: 8px 0; }
.edit-hint .link-btn { display: inline; margin: 0 0 0 10px; }
.rich-toolbar { position: absolute; z-index: 70; display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: var(--accent-ink); border: 1px solid var(--accent); border-radius: var(--btn-radius); box-shadow: var(--shadow); }
.rich-toolbar button { font: inherit; font-size: 13px; background: none; color: var(--text); border: 0; border-radius: 3px; padding: 4px 9px; cursor: pointer; }
.rich-toolbar button:hover { background: var(--accent); color: var(--accent-ink); }
.save-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.save-bar span { color: var(--accent); font-weight: 600; font-size: 14px; }
.edit-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 14px 0; padding: 14px; border: 1px dashed var(--accent); border-radius: var(--radius); }
.edit-specs label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.edit-specs input:not([type=checkbox]), .edit-specs textarea, .card-edit input[type=number] { width: 100%; font: inherit; font-size: 14px; padding: 7px 9px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.edit-specs .edit-wide { grid-column: 1 / -1; }
.edit-specs .check { margin: 0; }
.edit-photos { margin-top: 16px; }
.edit-photos h2 { margin-top: 0; }
.edit-photos .btn { margin-right: 10px; }
.drop-card { position: relative; }
.kr-edit { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.kr-edit h3 { margin: 0 0 4px; }
.kr-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); max-height: 520px; overflow-y: auto; padding: 4px; }
.kr-grid img { aspect-ratio: 1.41 / 1; object-fit: contain; background: #fff; }
.photo-drop .check { display: inline-flex; align-items: center; gap: 6px; margin: 0 10px 0 0; }
ul.includes.is-editable { min-height: 2em; padding-top: 4px; padding-bottom: 4px; }
.photo-drop { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 4px; padding: 14px; border: 2px dashed var(--line); border-radius: var(--radius); }
.photo-drop-over { display: none; position: absolute; inset: 0; place-items: center; border: 3px dashed var(--accent); border-radius: var(--radius); background: rgba(20, 36, 28, .88); color: var(--accent); font-size: 20px; font-weight: 600; pointer-events: none; z-index: 2; }
.drop-card.drag-over .photo-drop-over { display: grid; }
.drop-card.busy { opacity: .6; pointer-events: none; }
.drop-card.busy .photo-drop > .muted::after { content: " — загрузка…"; }
.gallery.drag-over .main { outline: 3px dashed var(--accent); outline-offset: -3px; }
.card-edit { display: flex; align-items: flex-end; gap: 8px 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--accent); font-size: 13px; color: var(--muted); }
.card-edit label { display: flex; flex-direction: column; gap: 4px; }
.card-edit label:first-child { width: 120px; }
.card-edit .check { flex-direction: row; align-items: center; margin: 0 0 6px; }
.card-edit .btn { margin-left: auto; }

/* Панель магазина */
.admin { padding-top: 28px; padding-bottom: 48px; }
.admin h1 { margin: 0 0 8px; }
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); font-size: 14px; }
.admin-stats b { color: var(--text); }
.admin-demo { color: var(--warn); }
.admin-tabs { display: flex; gap: 4px; margin: 22px 0 18px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.admin-tabs a { padding: 10px 16px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.admin-tabs a.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.admin-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-toolbar select, .admin-toolbar input, .admin-field input, .admin-field textarea { font: inherit; padding: 9px 12px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.admin-toolbar input { flex: 1; min-width: 220px; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table a { color: var(--accent); }
.admin-log pre { margin: 0; white-space: pre-wrap; font-size: 12px; color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn.disabled, .btn:disabled { opacity: .5; pointer-events: none; }
.admin-status { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; }
.admin-status.ok { color: #8fc79a; }
.admin-status.wait { color: var(--warn); }
.admin-status.off { color: var(--muted); }
.admin-more { margin-top: 14px; }
.admin-empty { margin-top: 14px; }
.admin-hint { margin: 0 0 14px; font-size: 14px; }
.admin-thumb { width: 84px; height: 56px; object-fit: cover; border-radius: 3px; display: block; }
.admin-shot { width: 120px; max-height: 80px; object-fit: cover; border-radius: 3px; cursor: zoom-in; display: block; }
.admin-switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.admin-switch input { opacity: 0; width: 0; height: 0; }
.admin-switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); cursor: pointer; transition: .2s; }
.admin-switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: var(--text); transition: .2s; }
.admin-switch input:checked + span { background: var(--accent); }
.admin-switch input:checked + span::before { transform: translateX(18px); background: var(--accent-ink); }
.admin-form { margin-top: 16px; }
.admin-form h2 { margin-top: 0; }
.admin-form-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-form-head a { color: var(--accent); font-size: 14px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.admin-field { display: block; margin-bottom: 14px; }
.admin-field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.admin-field input, .admin-field textarea { width: 100%; }
.admin-field textarea { resize: vertical; line-height: 1.5; }
.admin-form .check { margin: 4px 0 16px; }
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.admin-photo { display: flex; flex-direction: column; gap: 6px; }
.admin-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
.admin-photo.sortable { position: relative; cursor: grab; touch-action: none; user-select: none; }
.admin-photo.sortable button { cursor: pointer; }
.photo-meta { display: grid; gap: 4px; }
.photo-meta select, .photo-meta input { width: 100%; font: inherit; font-size: 13px; padding: 5px 7px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: auto; }
.photo-meta select { cursor: pointer; }
.photo-num { position: absolute; top: 6px; left: 6px; min-width: 24px; padding: 2px 7px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; text-align: center; pointer-events: none; }
#e-photos .admin-photo:first-child .photo-num { background: var(--accent); color: var(--accent-ink); }
#e-photos .admin-photo:first-child img { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-placeholder { opacity: .35; }
.photo-placeholder img { outline: 2px dashed var(--accent) !important; }
.photo-ghost { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; opacity: .9; box-shadow: var(--shadow); transform-origin: 0 0; background: var(--card, transparent); border-radius: 6px; }
#e-photos.sorting, #e-photos.sorting * { cursor: grabbing !important; }
#e-photos.saving { opacity: .6; pointer-events: none; }
.admin-main { font-size: 13px; color: var(--accent); font-weight: 600; padding: 6px 0; }
.admin-progress { position: relative; height: 22px; margin-top: 12px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.admin-progress div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.admin-progress span { position: absolute; inset: 0; text-align: center; font-size: 12px; line-height: 20px; }
.admin-toast { position: fixed; right: 16px; bottom: 16px; z-index: 200; max-width: 360px; padding: 12px 16px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-weight: 600; box-shadow: var(--shadow); }
.admin-toast.bad { background: var(--warn); }
.ask-modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.6); }
.ask-box { width: min(440px, 100%); padding: 22px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ask-box p { margin: 0 0 18px; line-height: 1.5; }
.ask-btns { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.btn-danger { background: var(--warn); border-color: var(--warn); color: #2a140a; font-weight: 600; }
.btn-danger:hover { filter: brightness(1.08); }

/* ---------- текст страницы проекта для поисковиков (до отрисовки скриптом) ---------- */
.seo-text { grid-column: 1 / -1; color: var(--muted); }
.seo-text img { max-width: 640px; width: 100%; height: auto; border-radius: var(--radius); }
.seo-text table { margin: 12px 0; border-collapse: collapse; }
.seo-text td { padding: 2px 16px 2px 0; }

.gallery .main { position: relative; }
.pic-cap { position: absolute; left: 12px; bottom: 12px; padding: 4px 12px; border-radius: 99px; background: rgba(14, 26, 20, .78); color: var(--text); font-size: 14px; pointer-events: none; }

/* ---------- избранное ---------- */
.site-header nav a.nav-fav { display: inline-flex; align-items: center; gap: 6px; }
.nav-fav .heart { flex: none; }
.fav-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12px; line-height: 20px; text-align: center; }
.card-fav { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(14, 26, 20, .62); color: #fff; cursor: pointer; backdrop-filter: blur(4px); transition: background .2s, color .2s, transform .2s; }
.card-fav:hover { background: rgba(14, 26, 20, .85); transform: scale(1.08); }
.card-fav.on, .fav-btn.on { color: var(--accent); }
.card-fav.on .heart, .fav-btn.on .heart { fill: currentColor; }
.pop .heart { animation: heart-pop .45s ease; }
@keyframes heart-pop { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 70% { transform: scale(.9); } 100% { transform: scale(1); } }
.badge-num { position: absolute; left: 10px; bottom: 12px; z-index: 2; padding: 3px 10px; border-radius: 99px; background: rgba(14, 26, 20, .72); color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .03em; pointer-events: none; }
.buy-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.proj-num { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.fav-btn { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; transition: border-color .2s, color .2s; }
.fav-btn:hover { border-color: var(--accent); color: var(--accent); }
.fav-btn.on { border-color: var(--accent); }

.favorites { padding-top: 28px; padding-bottom: 56px; }
.fav-head h1 { font-size: 44px; margin: 0; }
.fav-head p { margin: 4px 0 22px; }
.fav-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; }
.fav-list { display: grid; gap: 14px; }
.fav-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 18px; padding: 14px; align-items: center; transition: opacity .25s, transform .25s; }
.fav-row.leaving { opacity: 0; transform: translateX(30px); }
.fav-pic { display: block; aspect-ratio: 1 / 1; border-radius: 4px; overflow: hidden; background: var(--accent-soft); }
.fav-pic img, .fav-pic svg { width: 100%; height: 100%; object-fit: cover; }
.fav-num { font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: .03em; }
.fav-title { display: block; margin: 2px 0 6px; font-family: var(--font-head); font-size: 24px; font-weight: 700; color: var(--text); text-decoration: none; }
.fav-title:hover { color: var(--accent); }
.fav-side { text-align: right; }
.fav-side .price { font-size: 28px; white-space: nowrap; }
.fav-remove { margin: 6px 0 0 auto; }
.fav-actions { position: sticky; top: 20px; }
.fav-actions h2 { margin: 0 0 12px; font-size: 26px; }
.fav-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.fav-total b { font-family: var(--font-head); font-size: 34px; color: var(--accent); }
.fav-limit { padding: 10px 12px; border-radius: var(--btn-radius); border: 1px solid var(--warn); color: var(--warn); font-size: 14px; }
.builder-note { margin-top: 18px; padding: 14px; border-radius: var(--btn-radius); background: var(--accent-soft); font-size: 14px; line-height: 1.55; color: var(--muted); }
.builder-note b { color: var(--accent); }
.fav-empty { max-width: 620px; margin: 40px auto; text-align: center; }
.fav-empty-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 10px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.fav-empty-icon .heart { width: 34px; height: 34px; }
@media (max-width: 900px) { .fav-layout { grid-template-columns: 1fr; } .fav-actions { position: static; } }
@media (max-width: 560px) {
  .fav-row { grid-template-columns: 110px minmax(0, 1fr); }
  .fav-side { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .fav-remove { margin: 0; }
  .site-header nav a.nav-fav span { display: none; }
}

/* ---------- листы в PDF и оформление заказа ---------- */
.print-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.print-block h3 { margin: 0 0 6px; font-size: 22px; }
.print-block > p { font-size: 14px; margin: 0 0 12px; }
.print-btns { display: grid; gap: 10px; }
.print-btns .btn { flex-direction: column; gap: 2px; padding: 10px 14px; }
.print-btns .btn small { font-weight: 400; font-size: 12px; opacity: .8; }
.print-status { margin: 10px 0 0; font-size: 14px; }
.checkout-box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.checkout-box h2 { margin: 0 0 12px; }
.checkout-box label { display: block; margin: 10px 0 6px; }
.checkout-box input[type="email"] { width: 100%; }
.checkout-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 240px; overflow-y: auto; }
.checkout-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checkout-total { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 10px; }
.checkout-total b { font-family: var(--font-head); font-size: 30px; color: var(--accent); }
.dl-list { margin: 14px 0; text-align: left; }
#print input { width: 100%; }
#print label { display: block; margin: 14px 0 6px; }

/* ---------- фильтр по номеру проекта ---------- */
.f-num { position: relative; display: inline-flex; align-items: center; }
.f-num span { position: absolute; left: 12px; color: var(--accent); font-weight: 600; pointer-events: none; }
.filters .f-num input { width: 170px; padding-left: 32px; padding-right: 30px; }
.f-num-clear { position: absolute; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--line); color: var(--text); cursor: pointer; line-height: 1; }

/* ---------- звук перелистывания ---------- */
.pn-sound { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.pn-sound:hover { color: var(--accent); border-color: var(--accent); }
.pn-sound.off { opacity: .55; }

/* ---------- переход «в карточку»: картинка вырастает на весь экран, каталог уходит вглубь ---------- */
.dive-layer { position: fixed; inset: 0; z-index: 900; pointer-events: none; background: rgba(18, 32, 26, 0); transition: background .5s ease; }
.dive-layer.on { background: rgba(18, 32, 26, .96); }
.dive-pic { position: fixed; overflow: hidden; border-radius: var(--radius); transform-origin: 50% 50%; transition: transform .52s cubic-bezier(.65, 0, .25, 1), border-radius .52s, opacity .52s; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.dive-layer.on .dive-pic { border-radius: 0; }
.dive-pic img, .dive-pic svg { width: 100%; height: 100%; object-fit: cover; }
body.diving main { transition: transform .52s cubic-bezier(.65, 0, .25, 1), opacity .52s, filter .52s; transform: scale(.93); opacity: .35; filter: blur(3px); }
body.diving .dive-src { opacity: 0; }
/* После «проваливания» — круги на воде: кольца расходятся из центра, страница проявляется кругом. */
body.arrive-dive main { animation: arrive-ripple 1.1s cubic-bezier(.25, .6, .3, 1) both; }
@keyframes arrive-ripple {
  from { clip-path: circle(0% at 50% 45vh); opacity: .4; filter: brightness(.7); }
  60% { opacity: 1; filter: none; }
  to { clip-path: circle(150% at 50% 45vh); opacity: 1; filter: none; }
}
.ripple-layer { position: fixed; inset: 0; z-index: 800; pointer-events: none; overflow: hidden; }
.ripple-layer i { position: absolute; left: 50%; top: 45vh; width: 26vmax; height: 26vmax; margin: -13vmax 0 0 -13vmax; border-radius: 50%;
  border: 2px solid rgba(201, 169, 106, .55); box-shadow: 0 0 24px rgba(201, 169, 106, .25), inset 0 0 18px rgba(201, 169, 106, .18);
  transform: scale(0); opacity: 0; animation: ripple-ring 1.6s cubic-bezier(.2, .6, .35, 1) forwards; }
.ripple-layer i:nth-child(2) { animation-delay: .18s; }
.ripple-layer i:nth-child(3) { animation-delay: .36s; border-color: rgba(201, 169, 106, .4); }
.ripple-layer i:nth-child(4) { animation-delay: .54s; border-color: rgba(201, 169, 106, .28); }
@keyframes ripple-ring { 0% { transform: scale(0); opacity: .9; } 70% { opacity: .35; } 100% { transform: scale(5); opacity: 0; } }

/* ---------- перелистывание проектов: мягкий поворот листа журнала ---------- */
body.page-turning { perspective: 2600px; overflow-x: hidden; }
body.page-turning main { position: relative; transform-style: preserve-3d; background: var(--bg); box-shadow: 0 0 50px rgba(0, 0, 0, .35); animation: turn-next .64s cubic-bezier(.45, .05, .35, 1) forwards; }
body.turn-prev main { animation-name: turn-prev; }
body.page-turning main::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to left, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 65%); opacity: 0; animation: turn-shade .64s ease-in-out forwards; }
body.turn-prev main::after { background: linear-gradient(to right, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 65%); }
@keyframes turn-next { 0% { transform: none; opacity: 1; } 100% { transform: rotateY(-62deg) translateX(-4%); opacity: 0; } }
@keyframes turn-prev { 0% { transform: none; opacity: 1; } 100% { transform: rotateY(62deg) translateX(4%); opacity: 0; } }
@keyframes turn-shade { 50% { opacity: 1; } 100% { opacity: .6; } }
body.arrive-flip-next main { animation: arrive-flip-next .7s cubic-bezier(.2, .6, .3, 1) both; transform-origin: 100% 30vh; }
body.arrive-flip-prev main { animation: arrive-flip-prev .7s cubic-bezier(.2, .6, .3, 1) both; transform-origin: 0 30vh; }
@keyframes arrive-flip-next { from { opacity: 0; transform: perspective(2600px) rotateY(9deg) translateX(2%); filter: brightness(.8); } to { opacity: 1; transform: none; filter: none; } }
@keyframes arrive-flip-prev { from { opacity: 0; transform: perspective(2600px) rotateY(-9deg) translateX(-2%); filter: brightness(.8); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- покупка: лицензия, листы КР, строители, кабинет ---------- */
.buy-options { display: grid; gap: 8px; margin: 14px 0 6px; }
.buy label.buy-opt { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; color: var(--text); font-size: 14px; border: 1px solid var(--line); border-radius: var(--btn-radius); cursor: pointer; transition: border-color .2s, background .2s; }
.buy-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.buy-opt input { accent-color: var(--accent); }
.buy-opt b { display: block; font-size: 15px; }
.buy-opt small { color: var(--muted); font-size: 12px; }
.buy-opt em { font-style: normal; font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--accent); white-space: nowrap; }
.extra-block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.extra-block h3 { margin: 0 0 6px; font-size: 22px; }
.extra-block p { font-size: 14px; margin: 0 0 10px; }
.extra-block .btn { width: 100%; }
.extra-link { display: block; margin-top: 16px; font-size: 14px; text-align: center; }
.link-inline { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }
.checkout-total.discount { margin: 0; font-size: 14px; color: var(--muted); }
.fav-total s { font-size: 16px; margin-right: 6px; }
.fav-bundle { margin: -6px 0 12px; font-size: 14px; color: var(--accent); }
.builder-sub { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.builder-sub-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.builders { padding-bottom: 56px; }
.b-hero { text-align: center; padding: 40px 0 10px; }
.b-hero h1 { font-size: 48px; margin: 0 0 8px; }
.b-hero p { max-width: 620px; margin: 0 auto; }
.b-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); margin: 10px 0 30px; }
.b-top { display: flex; gap: 14px; align-items: center; }
.b-top h3 { margin: 0; font-size: 24px; }
.b-logo { flex: none; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.b-logo img { width: 100%; height: 100%; object-fit: contain; }
.b-logo-ph { font-family: var(--font-head); font-size: 32px; font-weight: 700; color: var(--accent-ink); }
.b-card p { color: var(--muted); font-size: 14px; white-space: pre-line; }
.b-contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.b-join h2 { margin-top: 0; }
.b-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.b-edit label, .acc-grid label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.b-edit input, .b-edit textarea, .acc-grid input, .ref-link input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--btn-radius); padding: 9px 12px; }
.b-wide { grid-column: 1 / -1; }
.b-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.b-status { color: var(--muted); }
.b-status.ok { color: var(--accent); }
@media (max-width: 640px) { .b-edit { grid-template-columns: 1fr; } }

.acc-block h2 { margin-top: 0; }
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; align-items: end; margin: 12px 0; }
.acc-grid input[type="file"] { min-width: 0; font-size: 13px; padding: 7px; }
.ps-logo-prev { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.ps-logo-prev img { max-height: 48px; max-width: 140px; background: #fff; border-radius: 4px; padding: 4px; }
.ps-logo-prev .link-btn { margin: 0; }
.acc-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.ref-code { font-family: var(--font-head); font-size: 26px; color: var(--accent); letter-spacing: .08em; }
.ref-link { display: flex; gap: 10px; margin: 10px 0 16px; }
.ref-link input { flex: 1; min-width: 0; }
.ref-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.ref-stats div { padding: 12px; border-radius: var(--btn-radius); background: var(--accent-soft); text-align: center; }
.ref-stats b { display: block; font-family: var(--font-head); font-size: 26px; color: var(--accent); }
.ref-stats span { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .acc-grid { grid-template-columns: 1fr; } .ref-stats { grid-template-columns: 1fr; } }
.filters .f-num input { width: 180px; }
@media (prefers-reduced-motion: reduce) {
  body.diving main, body.page-turning main, body.arrive-dive main, body.arrive-flip-next main, body.arrive-flip-prev main { animation: none !important; transition: none !important; transform: none !important; }
}

@media (max-width: 820px) {
  .project { grid-template-columns: 1fr; }
  .buy { position: static; }
  .site-header nav a:first-child { display: none; }
  .hero { padding: 48px 0 24px; }
}
.nav-partner .nav-narrow { display: none; }
@media (max-width: 1100px) {
  .nav-partner .nav-wide { display: none; }
  .nav-partner .nav-narrow { display: inline; }
}.badge-mat { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }

/* ---------- оплата баллами и со счёта ---------- */
.wallet-pay { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--btn-radius); background: var(--accent-soft); }
.wallet-pay .check { margin: 4px 0; }
.wallet-pay .check small, .pr-ref small { display: block; font-size: 12px; color: var(--muted); }
.wp-sum { margin-top: 6px; font-size: 14px; }
.wp-sum b { color: var(--accent); }
.pr-ref { margin: 12px 0; }
.wallet-stats { grid-template-columns: repeat(2, 1fr); }
.wallet-stats small { display: block; font-size: 11px; color: var(--muted); opacity: .8; }
.topup { margin: 8px 0 12px; }
.topup label { display: block; margin-bottom: 6px; }
.topup-row { display: flex; gap: 10px; }
.topup-row input { flex: 1; min-width: 0; max-width: 220px; }
.wallet-ops summary, .partner-terms-box summary { cursor: pointer; color: var(--accent); margin: 6px 0; }
.wallet-ops .order-row b.plus, .ref-list b.plus { color: #9fd3a8; }
.wallet-ops .order-row b.minus { color: var(--warn); }

/* ---------- партнёрская программа ---------- */
.partner-page { max-width: 820px; }
.partner-hero { margin-bottom: 20px; }
.partner-hero h1 { margin: 0 0 8px; font-size: 42px; }
.partner-hero .lead { font-size: 18px; }
.partner-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 8px; }
.partner-steps div { display: flex; gap: 10px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 14px; }
.partner-steps b { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-family: var(--font-head); font-size: 18px; }
.partner-terms { padding-left: 20px; margin: 0 0 16px; font-size: 14px; line-height: 1.55; }
.partner-terms li { margin-bottom: 6px; }
.partner-terms-box { margin-top: 16px; }
@media (max-width: 700px) {
  .partner-steps { grid-template-columns: 1fr; }
  .partner-hero h1 { font-size: 32px; }
  .topup-row input { max-width: none; }
}

/* ---------- замена картинки проекта ---------- */
.photo-edit { width: min(760px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.photo-edit h2 { margin: 0 0 12px; }
.pe-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.pe-old { display: grid; gap: 4px; }
.pe-old img, .pe-drop img { width: 100%; aspect-ratio: 640 / 420; object-fit: contain; background: #0c1611; border-radius: var(--btn-radius); }
.pe-drop { display: grid; place-items: center; min-height: 160px; padding: 10px; border: 2px dashed var(--line); border-radius: var(--radius); text-align: center; cursor: pointer; color: var(--muted); }
.pe-drop.over { border-color: var(--accent); color: var(--accent); }
.pe-drop b { color: var(--text); }
.pe-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.pe-tools .btn { text-decoration: none; }
.pe-prompt { width: 100%; font: 13px/1.45 var(--font); resize: vertical; }
@media (max-width: 600px) { .pe-cols { grid-template-columns: 1fr; } }
/* ---------- повторная покупка, QR в платном PDF, копирование ссылки ---------- */
.already { padding: 12px 14px; margin-top: 8px; border: 1px solid var(--warn); border-radius: var(--btn-radius); background: rgba(232,160,124,.08); color: var(--text); font-size: 14px; }
.already p { margin: 6px 0; }
.already-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.already-btns .btn { text-decoration: none; }
.qr-opts { margin: 12px 0; }
.qr-opts .check small { display: block; font-size: 12px; }
.buy-top-btns { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ref-discount b { color: var(--accent); }
.payout-form .acc-grid { margin-bottom: 8px; }
.payout-form select { width: 100%; }
.partner-auth .auth-card { max-width: none; }
.buy-top .proj-num { white-space: nowrap; }
@media (max-width: 480px) { .buy-top-btns .fav-btn span { font-size: 13px; } }

/* ---------- покупка: полоска «цена — Купить» на телефоне, блок «Ещё» ---------- */
.buy-bar { display: none; }
@media (max-width: 820px) {
  .buy-bar:not([hidden]) {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,.35);
  }
  .buy-bar-price { font-family: var(--font-head); font-size: 26px; color: var(--accent); }
  .buy-bar-old { display: block; font-size: 13px; color: var(--muted); }
  .buy-bar .btn { min-width: 140px; }
  body.has-buy-bar { padding-bottom: 76px; }
  body.has-buy-bar .swipe-hint { bottom: 90px; }
}
.sbp-note b { color: var(--text); }
.more-buy { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.more-buy > summary { cursor: pointer; color: var(--accent); padding: 6px 0; list-style-position: inside; }
.more-buy[open] > summary { margin-bottom: 8px; }
.project > * { min-width: 0; }
.buy-top { flex-wrap: wrap; row-gap: 8px; }

.sbp-note { display: block; line-height: 1.5; }

/* Подборка проектов одной ссылкой */
.fav-head #fav-keep, .fav-share { margin: -10px 0 22px; }
.fav-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fav-head .btn svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
/* Цена на листе PDF: сайта, без цены, своя */
.price-opts { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 10px; display: grid; gap: 8px; }
.po-title { font-weight: 600; }
.po-modes { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.po-modes .check { margin: 0; }
.po-modes input:disabled + span { opacity: .55; }
.po-modes small { display: block; font-size: 12px; }
.po-own { display: grid; gap: 8px; }
.po-own[hidden], .po-items[hidden] { display: none; }
.po-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; }
.po-row label, .po-item { display: grid; gap: 4px; font-size: 14px; }
.po-item { grid-template-columns: minmax(0, 1fr) 120px; align-items: center; }
.po-item small { display: block; }
.po-items { display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.po-own input { width: 100%; min-width: 0; }
@media (max-width: 480px) { .po-row { grid-template-columns: 1fr; } }
/* Переходы по партнёрским ссылкам */
.visits { margin: 16px 0; display: grid; gap: 8px; }
.visits-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.visits-bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; height: 90px; align-items: end; }
.vb { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.vb i { display: block; width: 100%; min-height: 2px; background: var(--brass, #c9a45c); border-radius: 3px 3px 0 0; }
.vb span { text-align: center; font-size: 11px; line-height: 14px; min-height: 14px; }
.visits-axis { display: flex; justify-content: space-between; }
.visits-src { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.visits-src li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed rgba(127,127,127,.25); padding: 2px 0; }
/* Вопросы по проекту */
.ask-q { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 10px 0; padding: 10px 12px; border: 1px dashed rgba(127,127,127,.35); border-radius: 10px; }
.question-box textarea { width: 100%; resize: vertical; min-height: 110px; }
.q-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-row label { display: grid; gap: 4px; }
.q-row input { width: 100%; min-width: 0; }
.q-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 520px) { .q-row { grid-template-columns: 1fr; } }
.q-item { padding: 10px 0; border-bottom: 1px solid rgba(127,127,127,.2); }
.q-item:last-child { border-bottom: 0; }
.q-text { margin: 6px 0; }
.q-answer { margin-top: 6px; padding: 8px 12px; border-left: 3px solid var(--brass, #c9a45c); background: rgba(201,164,92,.08); border-radius: 0 8px 8px 0; }
.q-answer p { margin: 4px 0 0; }
.q-admin { display: grid; gap: 12px; }
.q-admin-item { padding: 14px; display: grid; gap: 8px; }
.q-admin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.q-admin-item textarea { width: 100%; resize: vertical; }
/* PDF-кнопка, окно PDF, кнопка листов КР, обратный звонок */
.pdf-box { max-width: 560px; position: relative; }
.pdf-box .print-block { margin: 0; border: 0; padding: 0; }
.modal-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: inherit; opacity: .7; }
.modal-x:hover { opacity: 1; }
.kv-head { flex-wrap: wrap; gap: 8px 12px; }
.kr-buy-btn { white-space: nowrap; }
.ask-q .btn svg { vertical-align: -3px; margin-right: 4px; }
.buy-top-btns { flex-wrap: wrap; }
.email-fix { margin-top: 16px; text-align: left; }
.email-fix summary { cursor: pointer; color: var(--muted, inherit); }
.email-fix-note { margin-top: 16px; }
.o-email-edit { display: flex; gap: 6px; margin-top: 6px; }
.o-email-edit input { min-width: 0; flex: 1; }
/* Вывод на карту */
.payout-det { margin: 10px 0 14px; }
.payout-det h3 { margin: 0 0 6px; font-size: 16px; }
.payout-det-view { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(127,127,127,.25); border-radius: 10px; }
.payout-file { cursor: pointer; }
/* Вход по QR-коду */
.acc-head-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-head-btns .btn svg { vertical-align: -3px; margin-right: 4px; }
.qr-box { max-width: 420px; text-align: center; }
.qr-img { background: #fff; padding: 10px; border-radius: 12px; width: 240px; max-width: 100%; margin: 0 auto 12px; }
.qr-img svg { display: block; width: 100%; height: auto; }
.qr-confirm .ask-btns { justify-content: center; }
.qr-phone { max-width: 460px; margin: 30px auto; text-align: center; }
/* Отдельный PDF с расходом материалов на странице печати */
.mat-pdf { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(127,127,127,.25); }
.mat-pdf h2 { margin: 0 0 6px; font-size: 20px; }

/* Обратный отсчёт QR-кода входа на телефоне */
.qr-timer { margin: 0 auto 12px; width: 240px; max-width: 100%; font-size: 14px; }
.qr-timer-bar { height: 6px; border-radius: 3px; background: rgba(127,127,127,.25); overflow: hidden; margin-bottom: 6px; }
.qr-timer-bar i { display: block; height: 100%; width: 100%; background: var(--brass, #c9a45c); transition: width .25s linear; }
.qr-timer.low .qr-timer-bar i { background: #c0563a; }
.qr-timer.low b { color: #e07a5f; }
/* Купленный проект: в каталоге вместо цены — «Проект куплен» и значок скачивания слева; на странице — «Скачать» у номера. */
.house .card-price.card-bought { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.card-dl { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; transition: transform .15s, filter .15s; }
.card-dl svg { width: 22px; height: 22px; }
.card-dl:hover { transform: translateY(-1px); filter: brightness(1.08); }
.card-dl:disabled { opacity: .6; cursor: progress; }
.bought-label { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--accent); }
.proj-num-wrap { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.own-dl { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 600; border-radius: 99px; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.own-dl[hidden] { display: none; }
.own-dl:disabled { opacity: .6; cursor: progress; }
.bought-box { padding: 14px 16px; margin: 14px 0; border: 1px solid var(--accent); border-radius: var(--btn-radius); background: var(--accent-soft); font-size: 15px; }
.bought-box[hidden] { display: none; }
.bought-box p { margin: 6px 0; }
.bought-box .btn svg { vertical-align: -3px; margin-right: 4px; }
.is-owned .buy-options, .is-owned .price-row, .is-owned #share-panel, .is-owned #discount-ok, .is-owned #ref-discount,
.is-owned #buy-form, .is-owned .sbp-note, .is-owned .buy-bar { display: none !important; }
.order-actions .btn svg { vertical-align: -3px; margin-right: 4px; }
/* Фильтр купленных — список в ряду фильтров каталога. */
.filters .f-own[hidden], .house[hidden] { display: none !important; }
.own-empty { grid-column: 1 / -1; }

/* Страница проекта: PDF, ссылка и избранное — одним рядом под номером. */
.buy-top .buy-top-btns { display: flex; flex-wrap: nowrap; width: 100%; gap: 6px; justify-content: stretch; }
.buy-top .buy-top-btns .fav-btn { flex: 1 1 auto; justify-content: center; margin-left: 0; padding: 7px 8px; gap: 5px; font-size: 13px; white-space: nowrap; min-width: 0; }
.buy-top .buy-top-btns .fav-btn svg { flex: none; width: 16px; height: 16px; }
.buy-top .buy-top-btns .fav-btn span { overflow: hidden; text-overflow: ellipsis; }

/* Листы КР: куплен проект — кнопка подсвечена; не куплен — подсказка, зачем они. */
.video-card .kv-head { position: relative; }
.kr-buy-btn.kr-owned { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kr-buy-btn.kr-owned svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.kr-tip { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; max-width: min(420px, 100%); padding: 10px 12px; font-size: 13px; line-height: 1.45; color: var(--text); background: var(--surface); border: 1px solid var(--accent); border-radius: var(--btn-radius); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity .15s; pointer-events: none; }
.kr-buy-btn:hover + .kr-tip, .kr-buy-btn:focus-visible + .kr-tip { opacity: 1; visibility: visible; }
/* Телефон: фильтры каталога ровной сеткой в две колонки, номер — во всю ширину. */
@media (max-width: 640px) {
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .filters .f-num { display: flex; grid-column: 1 / -1; }
  .filters .f-num input { width: 100%; }
  .filters select { width: 100%; min-width: 0; font-size: 14px; padding: 9px 8px; }
  .filters .f-own { grid-column: 1 / -1; }
}
/* Телефон: шапка в одну-две аккуратные строки вместо наезжающих пунктов. */
@media (max-width: 640px) {
  .site-header .container { height: auto; min-height: 56px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; gap: 6px 12px; }
  .logo { font-size: 19px; white-space: nowrap; }
  .site-header nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 14px; margin-left: auto; }
  .site-header nav a, .site-header nav > * { margin-left: 0; }
  .nav-logout { margin-left: 0; padding: 4px 10px; }
  .admin-bar { position: static; }
}
/* Короткие подписи кнопок на узком экране; PDF не сжимается. */
.lbl-short { display: none; }
.buy-top .buy-top-btns #pdf-btn { flex: none; }
@media (max-width: 520px) {
  .lbl-wide { display: none; }
  .lbl-short { display: inline; }
  .buy-top .buy-top-btns .fav-btn { padding: 7px 6px; font-size: 13px; }
}
/* Редактор картинки (режим администратора): поворот, обрезка, кисть. */
.ie-modal { z-index: 450; }
.img-editor { width: min(1180px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.ie-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.ie-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ie-group + .ie-group { padding-left: 14px; border-left: 1px solid var(--line); }
.ie-bar .btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ie-brush { transition: opacity .15s; }
.ie-brush.dim { opacity: .45; }
.ie-brush input[type=color] { width: 36px; height: 30px; padding: 0 2px; border: 1px solid var(--line); border-radius: var(--btn-radius); background: var(--surface); cursor: pointer; }
.ie-size { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ie-size input { width: 110px; accent-color: var(--accent); }
.ie-stage { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; line-height: 0; background: repeating-conic-gradient(#2a3f34 0 25%, #223a2f 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); }
.ie-work { display: block; max-width: 100%; max-height: calc(100vh - 290px); min-height: 120px; }
.ie-over { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.ie-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
@media (max-width: 640px) { .ie-group + .ie-group { padding-left: 0; border-left: 0; } .ie-work { max-height: 55vh; } }
/* ---------- «Услуги проектирования» ---------- */
.nav-services .nav-narrow { display: none; }
@media (max-width: 1100px) { .nav-services .nav-wide { display: none; } .nav-services .nav-narrow { display: inline; } }
.svc { padding-bottom: 48px; }
.svc-hero { text-align: center; padding: 64px 0 40px; }
.svc-eyebrow { display: inline-block; margin-bottom: 14px; padding: 5px 14px; border: 1px solid var(--accent); border-radius: 99px; color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.svc-hero h1 { font-size: clamp(34px, 5.4vw, 62px); font-weight: 500; line-height: 1.1; margin: 0 auto 16px; max-width: 900px; }
.svc-lead { margin: 0 auto; max-width: 680px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.svc-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 28px 0 0; }
.svc .btn-lg { width: auto; min-width: 240px; }
.svc-facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 820px; margin: 36px auto 0; padding: 0; }
.svc-facts li { padding: 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.svc-facts b { display: block; font: 700 30px/1.1 var(--font-head); color: var(--accent); }
.svc-facts span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.svc-section { margin: 40px 0 0; }
.svc-section > h2, .svc-final h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 500; margin: 0 0 6px; }
.svc-section > .muted { margin: 0 0 18px; }
.svc-docs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.svc-doc { position: relative; padding-top: 26px; }
.svc-doc h3, .svc-extras h3 { margin: 0 0 12px; font-size: 24px; }
.svc-tag { position: absolute; top: 18px; right: 20px; font: 700 34px/1 var(--font-head); color: var(--accent); opacity: .35; }
.svc-list { list-style: none; margin: 0 0 8px; padding: 0; }
.svc-list li { position: relative; padding: 0 0 8px 26px; line-height: 1.5; }
.svc-list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.svc-bonus { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 16px 20px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.svc-bonus p { margin: 0; line-height: 1.5; }
.svc-bonus-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 17px/1 var(--font); }
.svc-steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 16px; }
.svc-step { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.svc-step h3 { margin: 4px 0 10px; font-size: 28px; }
.svc-step h4 { margin: 0 0 8px; font-size: 17px; }
.svc-price { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--btn-radius) var(--btn-radius) 0; }
.svc-time { margin: 10px 0 0; padding: 10px 14px; border: 1px dashed var(--line); border-radius: var(--btn-radius); font-size: 15px; line-height: 1.5; }
.svc-time b { color: var(--accent); }
.svc-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.svc-sub > div { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.svc-sub .svc-time { margin: 0 0 8px; }
.svc-extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.svc-extras h3 { font-size: 21px; }
.svc-other { background: transparent; border-style: dashed; }
.svc-other .svc-list li::before { border-color: var(--muted); }
.svc-final { margin-top: 40px; text-align: center; padding: 36px 20px; background: var(--accent-soft); border-color: var(--accent); }
.svc-final p { margin: 0 0 18px; color: var(--muted); }
@media (max-width: 900px) { .svc-docs, .svc-sub, .svc-extras { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .svc-hero { padding: 40px 0 24px; }
  .svc-lead { font-size: 16px; }
  .svc-facts { grid-template-columns: 1fr; gap: 8px; margin-top: 24px; }
  .svc-facts li { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; text-align: left; }
  .svc-facts b { font-size: 24px; white-space: nowrap; }
  .svc-facts span { margin: 0; }
  .svc-step { grid-template-columns: 1fr; gap: 10px; }
  .svc-cta .btn { width: 100%; }
}
/* ---------- «Расчёты»: теплотехнический калькулятор ---------- */
.calc-page { padding-bottom: 40px; }
.calc-head { padding: 28px 0 14px; }
.calc-head h1 { margin: 0 0 12px; font-size: clamp(32px, 4.5vw, 48px); font-weight: 500; }
.calc-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); }
.calc-tabs a { padding: 9px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; }
.calc-tabs a.on { color: var(--accent); border-color: var(--accent); }
.tc-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.tc-layers { grid-column: 2; grid-row: 1; min-width: 0; }
.tc-in { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 12px; }
.tc-out { grid-column: 2; grid-row: 2; min-width: 0; }
.tc-grid h2 { margin: 0 0 12px; font-size: 24px; }
.tc-grid h3 { margin: 18px 0 8px; font-size: 18px; }
.tc-f { display: block; margin: 0 0 10px; }
.tc-f > span { display: block; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.tc-f input[type=number] { width: 100%; font: inherit; padding: 8px 10px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.tc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tc-clim { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: -2px 0 12px; }
.tc-clim div { padding: 8px 10px; border-radius: var(--btn-radius); background: var(--accent-soft); }
.tc-clim span { display: block; font-size: 12px; color: var(--muted); }
.tc-clim b { font-size: 15px; }
/* выпадающий список с поиском */
.tc-combo { position: relative; }
.tc-combo-input { width: 100%; font: inherit; padding: 8px 32px 8px 10px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.tc-combo-input:focus { outline: none; border-color: var(--accent); }
.tc-combo-input[readonly] { cursor: pointer; }
.tc-combo-arrow { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px 6px; }
.tc-combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--btn-radius); box-shadow: var(--shadow); }
.tc-combo-list li { padding: 7px 9px; border-radius: 3px; cursor: pointer; line-height: 1.3; font-size: 14px; }
.tc-combo-list li small { display: block; color: var(--muted); font-size: 12px; }
.tc-combo-list li:hover, .tc-combo-list li.act { background: var(--accent-soft); }
.tc-combo-list li.on { color: var(--accent); font-weight: 600; }
.tc-combo-list .tc-combo-empty { color: var(--muted); cursor: default; }
/* слои и чертёж */
.tc-layers-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.tc-layers-head h2 { margin: 0; }
.tc-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1 1 420px; justify-content: flex-end; }
.tc-add #tc-find { flex: 1 1 260px; max-width: 460px; }
.tc-draw-wrap { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr) 70px; gap: 0; margin: 14px 0 8px; }
.tc-side { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; font-size: 12px; color: var(--muted); padding: 6px; background: linear-gradient(90deg, rgba(232,160,124,.18), transparent); border-radius: var(--btn-radius) 0 0 var(--btn-radius); }
.tc-side b { color: var(--text); margin-top: 4px; font-size: 13px; }
.tc-side-out { background: linear-gradient(270deg, rgba(120,170,230,.2), transparent); border-radius: 0 var(--btn-radius) var(--btn-radius) 0; }
.tc-draw { display: flex; height: 300px; border: 1px solid var(--line); background: #1b2c24; overflow: hidden; user-select: none; touch-action: pan-y; }
.tc-band { position: relative; flex: none; height: 100%; border-right: 1px solid rgba(0,0,0,.55); cursor: grab; display: flex; flex-direction: column; align-items: center; padding-top: 4px; transition: box-shadow .15s; }
.tc-band.drag { z-index: 5; cursor: grabbing; opacity: .85; box-shadow: 0 0 0 2px var(--accent); transition: none; }
.tc-band.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.tc-band.off { filter: grayscale(1) brightness(.6); }
.tc-band.drop-before::before { content: ""; position: absolute; left: -3px; top: 0; bottom: 0; width: 4px; background: var(--accent); z-index: 6; }
.tc-draw.drop-end .tc-band:last-child::after { content: ""; position: absolute; right: -2px; top: 0; bottom: 0; width: 4px; background: var(--accent); z-index: 6; }
.tc-band-d { width: min(64px, calc(100% - 4px)); font: 600 12px/1 var(--font); padding: 4px 2px; text-align: center; border-radius: 3px; border: 1px solid rgba(0,0,0,.4); background: rgba(255,255,255,.92); color: #1b1b1b; -moz-appearance: textfield; }
.tc-band-d::-webkit-inner-spin-button { display: none; }
.tc-band-name { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 600; color: #1b1b1b; background: rgba(255,255,255,.78); padding: 2px 6px; border-radius: 3px; pointer-events: none; }
.tc-band-frame { position: absolute; bottom: 6px; font-size: 10px; padding: 1px 5px; border-radius: 99px; background: #6b4a2a; color: #fff; }
.tc-band-grip { position: absolute; right: -4px; top: 0; bottom: 0; width: 9px; cursor: ew-resize; z-index: 4; }
.tc-band-grip:hover { background: rgba(201,169,106,.6); }
/* условные обозначения материалов */
.h-wool { background: #e8d48a repeating-radial-gradient(circle at 0 50%, transparent 0 6px, rgba(150,110,30,.45) 6px 7px, transparent 7px 12px); background-size: 14px 14px; }
.h-foam { background-color: #f3f0e6; background-image: radial-gradient(rgba(120,120,120,.5) 1.2px, transparent 1.6px); background-size: 8px 8px; }
.h-brick { background-color: #b5523b; background-image: linear-gradient(rgba(240,220,200,.6) 2px, transparent 2px), linear-gradient(90deg, rgba(240,220,200,.6) 2px, transparent 2px); background-size: 100% 18px, 36px 36px; }
.h-wood { background: #c99a62 repeating-linear-gradient(0deg, rgba(110,70,30,.35) 0 2px, transparent 2px 9px); }
.h-gypsum { background: #e6e6e6 repeating-linear-gradient(45deg, rgba(0,0,0,.12) 0 1px, transparent 1px 7px); }
.h-concrete { background-color: #a8a8a3; background-image: radial-gradient(rgba(60,60,60,.6) 1.5px, transparent 2px), radial-gradient(rgba(255,255,255,.4) 1px, transparent 1.5px); background-size: 11px 13px, 7px 9px; background-position: 0 0, 4px 5px; }
.h-aerated { background-color: #d9d6cf; background-image: radial-gradient(circle, transparent 2px, rgba(0,0,0,.18) 2.5px, transparent 3px); background-size: 9px 9px; }
.h-fill { background-color: #b98a5e; background-image: radial-gradient(circle, rgba(70,40,20,.55) 2px, transparent 2.5px); background-size: 7px 7px; }
.h-stone { background: #8f9294 repeating-linear-gradient(-30deg, rgba(255,255,255,.2) 0 2px, transparent 2px 12px); }
.h-metal { background: linear-gradient(90deg, #8aa1b5, #d7e2ea, #8aa1b5); }
.h-film { background: repeating-linear-gradient(0deg, #2b6cb0 0 6px, #7fb3e6 6px 9px); }
.h-vent { background: #1b2c24 repeating-linear-gradient(0deg, transparent 0 14px, rgba(120,170,230,.35) 14px 16px); }
.h-vent .tc-band-name { background: rgba(27,44,36,.9); color: #9cc6f0; }
.h-custom { background: #c6b9d8 repeating-linear-gradient(135deg, rgba(60,40,90,.25) 0 2px, transparent 2px 8px); }
.tc-curve { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tc-curve .c-t { fill: none; stroke: #ff6a3d; stroke-width: 2.5; }
.tc-curve .c-t-dot { fill: #ff6a3d; }
.tc-curve .c-e { fill: none; stroke: #3d8bff; stroke-width: 2; }
.tc-curve .c-E { fill: none; stroke: #7fd3ff; stroke-width: 2; stroke-dasharray: 6 4; }
.tc-curve .c-zone { fill: rgba(61,139,255,.25); }
.tc-curve .c-plane { stroke: #fff; stroke-width: 1.5; stroke-dasharray: 3 3; }
.tc-curve .c-lbl { font: 600 11px var(--font); fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.75); stroke-width: 3px; text-anchor: middle; }
.tc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 12px; color: var(--muted); }
.tc-legend span::before { content: ""; display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; }
.tc-legend .lg-t::before { background: #ff6a3d; } .tc-legend .lg-e::before { background: #3d8bff; }
.tc-legend .lg-E::before { background: repeating-linear-gradient(90deg, #7fd3ff 0 5px, transparent 5px 8px); }
.tc-legend .lg-c::before { height: 10px; background: rgba(61,139,255,.35); }
.tc-gout { margin-left: auto; }
.tc-gout input { width: 64px; font: inherit; padding: 3px 6px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
/* таблицы */
.tc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.tc-table th, .tc-table td { padding: 6px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tc-table th { color: var(--muted); font-weight: 600; }
.tc-table tr.off td { opacity: .5; }
.tc-table tr.sel td { background: var(--accent-soft); }
.tc-table tr.vent td { color: #9cc6f0; }
.tc-table input[type=number], .tc-table input:not([type]), .tc-table select { font: inherit; padding: 3px 5px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.tc-table .tc-d { width: 70px; }
.tc-frame { margin-top: 4px; font-size: 12px; color: var(--muted); }
.tc-frame input { width: 64px; }
.tc-frame select { max-width: 200px; }
.tc-act { white-space: nowrap; text-align: right; }
.tc-act .link-btn { margin-left: 6px; font-size: 13px; }
.tc-res td:nth-child(2) { white-space: nowrap; font-weight: 600; }
.tc-big { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); }
.tc-big span { display: block; font-size: 13px; color: var(--muted); }
.tc-big b { display: block; font: 700 30px/1.15 var(--font-head); margin: 2px 0; }
.tc-big small { display: block; font-size: 12px; color: var(--muted); }
.tc-big.good { border-color: #6fbf73; background: rgba(111,191,115,.1); } .tc-big.good b { color: #9fd3a8; }
.tc-big.mid { border-color: var(--accent); background: var(--accent-soft); } .tc-big.mid b { color: var(--accent); }
.tc-big.bad { border-color: var(--warn); background: rgba(232,160,124,.1); } .tc-big.bad b { color: var(--warn); }
.tc-ok { color: #9fd3a8; white-space: nowrap; } .tc-bad { color: var(--warn); white-space: nowrap; }
.tc-verdict { padding: 8px 12px; border-radius: var(--btn-radius); font-size: 14px; }
.tc-verdict.good { background: rgba(111,191,115,.12); color: #9fd3a8; } .tc-verdict.bad { background: rgba(232,160,124,.12); color: var(--warn); }
.tc-src { margin-top: 14px; }
@media (max-width: 1100px) {
  .tc-grid { grid-template-columns: minmax(0, 1fr); }
  .tc-in, .tc-layers, .tc-out { grid-column: 1; grid-row: auto; position: static; }
}
@media (max-width: 640px) {
  .tc-draw-wrap { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .tc-side { font-size: 10px; padding: 3px; }
  .tc-draw { height: 240px; }
  .tc-gout { margin-left: 0; }
  #tc-list, .tc-out { overflow-x: auto; }
  .tc-res td:nth-child(2) { white-space: normal; }
  .tc-table { font-size: 12px; }
  .tc-table th, .tc-table td { padding: 5px 4px; }
}
.tc-act .link-btn { display: inline; padding: 0; }
.tc-table td.tc-act { width: 1%; }

/* Чертёж: удаление слоя крестиком, перекрытия и покрытия — горизонтальными слоями. */
.tc-band-x { position: absolute; top: 3px; right: 3px; z-index: 5; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: rgba(20,20,20,.65); color: #fff; font: 700 14px/20px var(--font); cursor: pointer; opacity: 0; transition: opacity .15s; }
.tc-band:hover .tc-band-x, .tc-band.sel .tc-band-x { opacity: 1; }
.tc-band-x:hover { background: #c0392b; }
.tc-band.film .tc-band-x { top: auto; bottom: 3px; right: -5px; }
@media (hover: none) { .tc-band-x { opacity: .85; } }
.tc-draw-wrap.ax-y { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
.ax-y .tc-draw { flex-direction: column; height: 380px; touch-action: pan-x; }
.ax-y.rev .tc-draw { flex-direction: column-reverse; }
.ax-y .tc-band { width: 100%; flex-direction: row; align-items: center; padding: 0 30px 0 6px; border-right: 0; border-bottom: 1px solid rgba(0,0,0,.55); }
.ax-y.rev .tc-band { border-bottom: 0; border-top: 1px solid rgba(0,0,0,.55); }
.ax-y .tc-band-d { width: 64px; }
.ax-y .tc-band-name { position: static; transform: none; margin-left: 8px; max-width: calc(100% - 110px); }
.ax-y .tc-band.film .tc-band-name { display: none; }
.ax-y .tc-band-frame { position: static; margin-left: 8px; }
.ax-y .tc-band-grip { left: 0; right: 0; top: auto; bottom: -4px; width: auto; height: 9px; cursor: ns-resize; }
.ax-y.rev .tc-band-grip { top: -4px; bottom: auto; }
.ax-y .tc-band-x { top: 50%; transform: translateY(-50%); }
.ax-y .tc-band.film .tc-band-x { top: 50%; bottom: auto; right: 6px; width: 16px; height: 16px; line-height: 16px; font-size: 12px; }
.ax-y .tc-band.drop-before::before { left: 0; right: 0; top: -3px; bottom: auto; width: auto; height: 4px; }
.ax-y.rev .tc-band.drop-before::before { top: auto; bottom: -3px; }
.ax-y .tc-draw.drop-end .tc-band:last-child::after { left: 0; right: 0; top: auto; bottom: -2px; width: auto; height: 4px; }
.ax-y.rev .tc-draw.drop-end .tc-band:last-child::after { top: -2px; bottom: auto; }
.ax-y .tc-side { flex-direction: row; gap: 10px; padding: 7px 12px; border-radius: var(--btn-radius) var(--btn-radius) 0 0; background: linear-gradient(180deg, rgba(232,160,124,.22), transparent); }
.ax-y .tc-side b { margin-top: 0; }
.ax-y .tc-side-out { background: linear-gradient(180deg, rgba(120,170,230,.25), transparent); }
.ax-y > .tc-side:last-of-type { border-radius: 0 0 var(--btn-radius) var(--btn-radius); }
.ax-y > .tc-side-in:last-of-type { background: linear-gradient(0deg, rgba(232,160,124,.22), transparent); }
.ax-y > .tc-side-out:last-of-type { background: linear-gradient(0deg, rgba(120,170,230,.25), transparent); }
.tc-curve .c-lbl.start { text-anchor: start; } .tc-curve .c-lbl.end { text-anchor: end; }
/* каталог материалов */
.tc-cat { position: relative; width: min(940px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; gap: 10px; }
.tc-cat h2 { margin: 0; font-size: 24px; }
.tc-cat-q { width: 100%; font: inherit; padding: 8px 10px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.tc-cat-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; min-height: 0; flex: 1; }
.tc-cat-tree { max-height: 56vh; overflow-y: auto; padding-right: 6px; border-right: 1px solid var(--line); }
.tc-cat-g summary { padding: 6px 4px; cursor: pointer; font-weight: 600; }
.tc-cat-g summary:hover { color: var(--accent); }
.tc-cat-g ul { list-style: none; margin: 0 0 6px; padding: 0 0 0 16px; }
.tc-cat-g li { padding: 4px 8px; border-radius: 3px; cursor: pointer; font-size: 14px; line-height: 1.35; }
.tc-cat-g li:hover { background: var(--accent-soft); }
.tc-cat-g li.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tc-cat-info { max-height: 56vh; overflow-y: auto; }
.tc-cat-info h3 { margin: 4px 0 10px; color: var(--accent); font-size: 18px; }
.tc-cat-info dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.tc-cat-info dt { color: var(--muted); } .tc-cat-info dd { margin: 0; font-weight: 600; }
@media (max-width: 700px) { .tc-cat-body { grid-template-columns: 1fr; } .tc-cat-tree { border-right: 0; max-height: 40vh; } .tc-cat-info { max-height: none; } }
/* Тонкий слой: крестик удаления — ниже поля толщины, чтобы не перекрывал его. */
.ax-x .tc-band.narrow .tc-band-x { top: 34px; right: 50%; transform: translateX(50%); }
.ax-x .tc-band.film.narrow .tc-band-x { top: auto; bottom: 30px; right: 50%; transform: translateX(50%); }
.ax-y .tc-band.narrow .tc-band-x { right: 6px; width: 18px; height: 18px; line-height: 18px; font-size: 13px; }
/* формульный расчёт */
.tc-out-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.tc-formula { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; }
.tc-formula > summary { padding: 12px 0; cursor: pointer; font-weight: 700; font-size: 17px; color: var(--accent); }
.tc-formula h4 { margin: 14px 0 6px; font-size: 15px; }
.tc-f-row { padding: 6px 0 6px 12px; border-left: 2px solid var(--accent-soft); margin-bottom: 4px; font-size: 14px; line-height: 1.6; }
.tc-f-row b { color: var(--accent); }
.tc-print-head, .tc-wm { display: none; }
/* печать */
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { background: #fff !important; color: #111 !important; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header, .site-footer, .admin-bar, .calc-tabs, .tc-add, .tc-act, .tc-out-btns, .tc-src button, .tc-combo-arrow, .tc-band-x, .tc-band-grip,
  .tc-gout, .chat-widget, .toast, #tc-list th:last-child { display: none !important; }
  .calc-head { padding: 0 0 6px; }
  .calc-head h1 { font-size: 22px; margin: 0; color: #111; }
  .container { max-width: none; padding: 0; }
  .tc-grid { display: block; }
  .tc-grid .card { background: #fff !important; border: 1px solid #bbb; box-shadow: none; color: #111; break-inside: avoid; margin-bottom: 10px; padding: 12px; position: static !important; }
  .tc-grid h2 { font-size: 17px; color: #111; }
  .tc-grid h3, .tc-formula h4 { color: #111; }
  .muted, .tc-f > span, .tc-clim span, .tc-big span, .tc-big small, .tc-table th { color: #555 !important; }
  .tc-combo-input, .tc-f input[type=number], .tc-table input, .tc-table select { background: #fff !important; color: #111 !important; border-color: #bbb !important; }
  .tc-clim div { background: #f2f2f2 !important; }
  .tc-table th, .tc-table td { border-color: #ccc !important; color: #111; }
  .tc-big { background: #f6f6f6 !important; border-color: #999 !important; } .tc-big b { color: #111 !important; }
  .tc-ok { color: #1d7a2b !important; } .tc-bad { color: #b3261e !important; }
  .tc-verdict { background: #f2f2f2 !important; color: #111 !important; }
  .tc-draw { border-color: #999; }
  .tc-side { color: #333; } .tc-side b { color: #111; }
  .tc-formula { display: block; border-color: #bbb; break-inside: auto; }
  .tc-formula > summary { color: #111; list-style: none; }
  .tc-f-row { border-left-color: #ccc; color: #111; break-inside: avoid; }
  .tc-f-row b { color: #111; }
  .tc-print-head { display: block; margin: 0 0 10px; padding: 8px 10px; border: 1px solid #c9a96a; font-size: 13px; color: #111; }
  .tc-print-head span { color: #8a5a00; font-weight: 600; }
  .tc-wm { display: flex; flex-wrap: wrap; align-content: space-around; justify-content: space-around; position: fixed; inset: -20% -20%; z-index: 9999; pointer-events: none; transform: rotate(-30deg); }
  .tc-wm span { width: 50%; text-align: center; padding: 40px 0; font: 700 20px/1 Arial, sans-serif; color: rgba(180, 40, 40, .13); white-space: nowrap; }
}
@media print {
  /* Исходные данные — компактной сеткой, без лишних подсказок. */
  .tc-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; font-size: 12px; }
  .tc-in h2, .tc-in #tc-cond, .tc-in .tc-clim { grid-column: 1 / -1; }
  .tc-in .tc-row { display: contents; }
  .tc-in .tc-f { margin: 0; }
  .tc-in .tc-f > span { font-size: 11px; margin-bottom: 1px; }
  .tc-in .tc-combo-input, .tc-in .tc-f input[type=number] { padding: 3px 6px; font-size: 12px; }
  .tc-clim { grid-template-columns: repeat(4, 1fr); margin: 0; }
  .tc-clim div { padding: 4px 6px; }
  .tc-clim b { font-size: 12px; }
  .tc-layers > p.muted { display: none; }
  .tc-draw { height: 240px; }
  .ax-y .tc-draw { height: 300px; }
  .tc-table { font-size: 11px; }
  .tc-table th, .tc-table td { padding: 3px 4px; }
  .tc-out { break-inside: auto !important; }
  .tc-f-row { font-size: 11.5px; line-height: 1.5; padding: 3px 0 3px 8px; }
}
/* Предупреждение о λ вдоль волокон в калькуляторе */
.tc-warn{margin-top:4px;padding:4px 8px;border-radius:6px;background:#fff4e0;color:#8a4b00;font-size:12px;line-height:1.35}

/* Реквизиты продавца в подвале */
.foot-seller { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.foot-seller a { color: inherit; }
.foot-seller .nowrap { white-space: nowrap; }

/* Реквизиты продавца в оферте */
.req-table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
.req-table td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.req-table td:first-child { color: var(--muted); width: 32%; white-space: nowrap; }
@media (max-width: 560px) { .req-table td { display: block; width: auto; padding: 2px 0; border: 0; } .req-table tr { display: block; padding: 8px 0; border-top: 1px solid var(--line); } .req-table td:first-child { white-space: normal; } }

/* Образование и квалификация на странице услуг */
.svc-facts a { display: block; color: inherit; text-decoration: none; }
.svc-creds { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; align-items: start; }
.svc-cred h3 { font-size: 21px; margin: 8px 0; }
.svc-cred p { margin: 0 0 8px; }
.svc-cred-pics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.svc-cred-pics a { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow .15s; }
.svc-cred-pics a:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .15); }
.svc-cred-pics .wide { grid-column: 1 / -1; }
.svc-cred-pics img { display: block; width: 100%; height: auto; }
.svc-phone { margin: 14px 0 0 !important; }
.svc-phone a { font-weight: 600; white-space: nowrap; }
@media (max-width: 800px) { .svc-creds { grid-template-columns: 1fr; } }
.svc-cred-pics a { cursor: zoom-in; }
