/* ── Новый вид конструктора шкафа «по нажатию» (27.10.2026) ──
   Светлая тема утверждённого макета. Всё внутри .rs-tap: модуль потом встанет в PRO, где своя
   вёрстка, — глобальных правил здесь нет. Окна каталога старого вида (.mat-modal, z-index 50)
   и баннер cookie (9000) остаются поверх. */
.rs-tap { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: #EFEEEA; color: #1C1C1E;
	font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 15px; line-height: 1.35;
	-webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; overflow: hidden; }
.rs-tap *, .rs-tap *::before, .rs-tap *::after { box-sizing: border-box; }
.rs-tap [hidden] { display: none !important; }
.rs-tap button { font: inherit; color: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }
.rs-tap button:disabled { opacity: 0.4; cursor: default; }
.rs-tap button:focus-visible { outline: 2px solid #1D5FD6; outline-offset: 2px; }
/* два быстрых нажатия (клавиатура размеров, «Отменить», степперы) увеличивали страницу на iPhone:
   manipulation снимает только зум по двойному касанию. На каждом элементе, а не на .rs-tap: WebKit
   начинает цепочку touch-action заново у прокручиваемого предка (.tap-sheet). Схему (.tap-stage,
   .tap-ov — none) правило не трогает: щипок там ловит сам новый вид */
.rs-tap button, .rs-tap [data-act], .rs-tap [role="button"], .rs-tap .millIcon, .rs-tap .tap-head, .rs-tap .tap-nav,
.rs-tap .tap-sheet, .rs-tap .tap-layer, .rs-tap .tap-warn, .rs-tap .tap-restore { touch-action: manipulation; }
.rs-tap .tap-kp, .rs-tap .tap-kp button { -webkit-user-select: none; user-select: none; }

.tap-head { flex: 0 0 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 10px 0 16px;
	padding-top: env(safe-area-inset-top, 0); background: #FFFFFF; border-bottom: 1px solid #E2E0DA; }
.tap-price { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tap-price b { font-size: 18px; font-weight: 700; white-space: nowrap; }
.tap-price span { font-size: 11px; color: #5B5A55; }
.tap-order { min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: #F5B800; color: #1C1C1E !important; font-weight: 600 !important; font-size: 15px; white-space: nowrap; }

.tap-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; touch-action: none; }
.tap-svg { position: absolute; left: 0; right: 0; top: 50px; bottom: 0; }
.tap-3d { position: absolute; left: 0; right: 0; top: 50px; bottom: 0; }
.tap-svg svg { display: block; }
/* номера секций renderSVG: секцию выбирают касанием, а на их месте — ширины секций */
.tap-svg .rs-badge { display: none; }
.tap-3d canvas { display: block; width: 100% !important; height: 100% !important; }
/* щипок двигает готовую картинку от левого верхнего угла окна (tap-model zoomMap) */
.tap-svg, .tap-ov { transform-origin: 0 0; }
/* попадание пальца считает tap.js (M.hit), а не DOM: касание всегда приходит в сам слой, а не в рамку
   или подпись, которые перерисовка заменяет посреди жеста (на iPhone события такого касания
   уходили бы в удалённый узел) */
.tap-ov * { pointer-events: none; }
/* открывание створки и ящика на схеме — как у старого вида (index.html, #preview .rs-door): створка
   сжимается к петлям, у выдвинутого ящика фасад крупнее и проступает короб. Конечное положение tap.js
   ставит следующим кадром после перерисовки */
.tap-svg .rs-door { transform-box: fill-box; transform-origin: left center; transition: transform 560ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.tap-svg .rs-door.hr { transform-origin: right center; }
.tap-svg .rs-door.open { transform: scaleX(0.24); }   /* = tap-model OPEN_K */
.tap-svg .rs-drawer .df { transform-box: fill-box; transform-origin: center; transition: transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.tap-svg .rs-drawer .dw { opacity: 0; transition: opacity 520ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.tap-svg .rs-drawer.pulled .df { transform: scale(1.07); }
.tap-svg .rs-drawer.pulled .dw { opacity: 1; }
/* «Открыть / Закрыть все» на схеме: полотно створки плавно гаснет до прозрачности .22 (draw.js,
   режим «Наполнение») или проявляется до сплошного; конец анимации — значение самой схемы */
.tap-svg[data-fade=open] .rs-door > rect:first-child { animation: tapDoorsOpen 420ms ease; }
.tap-svg[data-fade=close] .rs-door > rect:first-child { animation: tapDoorsClose 420ms ease; }
@keyframes tapDoorsOpen { from { fill-opacity: 1; } }
@keyframes tapDoorsClose { from { fill-opacity: 0.22; } }
@media (prefers-reduced-motion: reduce) {
	.tap-svg .rs-door, .tap-svg .rs-drawer .df, .tap-svg .rs-drawer .dw { transition: none; }
	.tap-svg[data-fade] .rs-door > rect { animation: none; }
}
.tap-ov { position: absolute; left: 0; top: 50px; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tap-tools { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.tap-tools > * { pointer-events: auto; }
.tap-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid #D9D6CF; border-radius: 18px; background: rgba(255,255,255,0.94); font-size: 13px; font-weight: 500; }
.tap-hint { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; text-align: center; font-size: 12px; color: #5B5A55; pointer-events: none; }
.tap-hint.on3d { color: #B9B7B0; }
.tap-warn { position: absolute; left: 10px; right: 10px; bottom: 34px; z-index: 3; display: flex; align-items: flex-start; border-radius: 12px; background: #FFF4E5; border: 1px solid #F5B800; color: #5A3B00; }
.tap-warn-t { flex: 1 1 auto; min-width: 0; padding: 8px 4px 8px 12px; border: 0; background: none; color: inherit; font: inherit; font-size: 12px; line-height: 1.35; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tap-warn-x { flex: 0 0 auto; position: sticky; top: 0; width: 36px; height: 34px; border: 0; background: none; color: inherit; font-size: 20px; line-height: 1; }
.tap-warn.open { max-height: 60%; overflow-y: auto; overscroll-behavior: contain; }
.tap-warn.open .tap-warn-t { white-space: pre-line; }
.tap-restore { position: absolute; left: 10px; right: 10px; top: 54px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #FFFFFF; box-shadow: 0 6px 20px rgba(0,0,0,0.12); font-size: 13px; }
.tap-restore span { flex: 1 1 160px; }
.tap-restore button { min-height: 36px; padding: 0 12px; border: 1px solid #D9D6CF; border-radius: 10px; background: #FFFFFF; font-size: 13px; font-weight: 600; }
.tap-restore button:first-of-type { background: #1D5FD6; border-color: #1D5FD6; color: #FFFFFF; }

/* схема: подписи и выделение поверх renderSVG */
.tap-ov text { font-family: inherit; }
.tap-dim { font-size: 11px; font-weight: 600; fill: #3A3935; }
.tap-dim--fl { fill: #6B6A64; font-weight: 500; }
.tap-selbox { fill: rgba(29,95,214,0.06); stroke: #1D5FD6; stroke-width: 2; }
.tap-selshelf { fill: none; stroke: #1D5FD6; stroke-width: 2.5; }
.tap-ghost { fill: rgba(29,95,214,0.35); stroke: #1D5FD6; stroke-width: 1.5; stroke-dasharray: 4 3; }
/* секция, куда переедут ящики (тянут вбок) */
.tap-drop { fill: rgba(29,95,214,0.12); stroke: #1D5FD6; stroke-width: 2; stroke-dasharray: 6 4; }
.tap-grip { fill: #FFFFFF; stroke: #1D5FD6; stroke-width: 2.5; }
.tap-pill rect { fill: #FFFFFF; stroke: #D9D6CF; }
.tap-pill text { font-size: 12px; font-weight: 600; fill: #1D5FD6; }
.tap-pill--live rect { fill: #1D5FD6; stroke: #1D5FD6; }
.tap-pill--live text { fill: #FFFFFF; }
.tap-post circle { fill: #FFFFFF; stroke: #8A877F; stroke-width: 1.5; }
.tap-post path { fill: none; stroke: #3A3935; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tap-post.on circle { stroke: #1D5FD6; stroke-width: 2.5; }

/* нижний лист */
.tap-sheet { flex: 0 1 auto; max-height: 44%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: #FFFFFF; border-radius: 18px 18px 0 0;
	box-shadow: 0 -6px 24px rgba(0,0,0,0.10); padding: 14px 16px 16px; position: relative; z-index: 2; }
.tap-sh-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.tap-sh-head h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.tap-sh-head p { margin: 3px 0 0; font-size: 13px; color: #5B5A55; }
.tap-x { flex: 0 0 44px; width: 44px; height: 44px; margin: -8px -8px 0 0; border: 0; border-radius: 12px; background: transparent; display: flex; align-items: center; justify-content: center; padding: 0; }
.tap-sh-body { display: flex; flex-direction: column; gap: 10px; }
.tap-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.tap-lbl { display: flex; flex-direction: column; font-size: 15px; font-weight: 500; min-width: 0; }
.tap-lbl small { font-size: 12px; font-weight: 400; color: #5B5A55; }
.tap-sub { margin-top: 4px; font-size: 13px; font-weight: 600; color: #3A3935; }
.tap-note { margin: 0; font-size: 12px; line-height: 1.4; color: #5B5A55; }
/* имя и телефон в смете: 16 px — иначе iOS увеличивает страницу при фокусе */
.rs-tap .tap-client { display: flex; gap: 8px; }
.rs-tap .tap-client input { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid #D9D6CF; border-radius: 12px; background: #FFFFFF; font: inherit; font-size: 16px; color: #1C1B18; }
.rs-tap .tap-client input::placeholder { color: #6B6A64; }
/* ниша: шкаф шире проёма или выше потолка */
.rs-tap .tap-note--bad, .rs-tap .tap-val--bad { color: #A33A00; }
.tap-line { display: flex; flex-wrap: wrap; gap: 8px; }
.tap-line:empty { display: none; }
.tap-step { display: inline-flex; align-items: center; gap: 6px; }
.tap-step b { min-width: 52px; text-align: center; font-size: 16px; font-weight: 700; }
.tap-step button { width: 44px; height: 44px; padding: 0; border: 1px solid #D9D6CF; border-radius: 12px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.tap-v { font-size: 16px; font-weight: 700; }
.tap-btn { min-height: 44px; padding: 0 14px; border: 1px solid #D9D6CF; border-radius: 12px; background: #FFFFFF; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tap-sh-body > .tap-btn { width: 100%; }
.tap-btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.tap-btn--primary { background: #1D5FD6; border-color: #1D5FD6; color: #FFFFFF !important; font-weight: 600; }
.tap-btn--order { background: #F5B800; border-color: #F5B800; font-weight: 600; }
.tap-btn--danger { color: #B42318 !important; }
.tap-val { min-width: 112px; font-weight: 700; font-size: 15px; }
.tap-tg { min-height: 44px; padding: 0 14px; border: 1px solid #D9D6CF; border-radius: 12px; background: #FFFFFF; font-size: 14px; font-weight: 500; }
.tap-tg.on { border-color: #1D5FD6; background: #E8EFFC; color: #1D5FD6 !important; font-weight: 600; }
.tap-sh-body > .tap-tg { width: 100%; }
.tap-seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 12px; background: rgba(255,255,255,0.94); border: 1px solid #D9D6CF; }
.tap-seg button { min-height: 32px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font-size: 13px; font-weight: 600; color: #3A3935; }
.tap-seg button[aria-pressed="true"] { background: #1D5FD6; color: #FFFFFF !important; }
.tap-seg--wide { display: flex; width: 100%; }
.tap-seg--wide button { flex: 1 1 0; min-height: 40px; }
.tap-decor { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 10px; border: 1px solid #D9D6CF; border-radius: 12px; background: #FFFFFF; text-align: left; }
.tap-sw { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 8px; border: 1px solid #D9D6CF; background: #EEE center/cover no-repeat; }
.tap-dn { flex: 1 1 auto; display: flex; flex-direction: column; font-size: 14px; font-weight: 600; min-width: 0; }
.tap-dn small { font-size: 12px; font-weight: 400; color: #B54708; }
.tap-dn small.tap-mute { color: #5B5A55; }
/* фото ручки снято на белом — целиком, а не обрезкой (как в галерее handlegal.js) */
.tap-sw--ph { background-color: #FFFFFF; background-size: contain; }
/* выбранная модель в списке (вешалка, корзина) — как выбранный тумблер */
.tap-decor.on { border-color: #1D5FD6; box-shadow: inset 0 0 0 1px #1D5FD6; background: #E8EFFC; }
.tap-sh-body > .tap-decor + .tap-decor { margin-top: -4px; }
/* готовые наборы секции — лентой с прокруткой вбок, картинка из старого вида (fillIcon) */
.tap-presets { display: flex; gap: 6px; overflow-x: auto; flex: none; margin: 0 -2px; padding: 2px; scrollbar-width: thin; }
.rs-tap .tap-preset { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; padding: 5px 4px; border: 1px solid #D9D6CF; border-radius: 10px; background: #FFFFFF; font-size: 12px; line-height: 1.2; font-weight: 500; color: #3A3935; text-align: center; }
.tap-preset svg { flex: none; width: 24px; height: 38px; }
.tap-preset.on { border-color: #1D5FD6; background: #E8EFFC; color: #1D5FD6 !important; }
/* похожие декоры в наличии */
.rs-tap .tap-sim { display: flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 4px 10px 4px 4px; border: 1px solid #D9D6CF; border-radius: 10px; background: #FFFFFF; font-size: 13px; text-align: left; }
.tap-sim .tap-sw { flex: 0 0 32px; width: 32px; height: 32px; }
.tap-caret { font-size: 22px; color: #8A877F; }
.tap-smeta { display: flex; flex-direction: column; }
.tap-sl { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #EEECE7; font-size: 14px; }
.tap-sl span { display: flex; flex-direction: column; min-width: 0; }
.tap-sl small { font-size: 12px; color: #6B6A64; }   /* подписи сметы: не мельче 12 px и контраст ≥ 4,5:1 (07.11.2026; было 11 px #8A877F) */
.tap-sl b { white-space: nowrap; font-weight: 600; }
.tap-sl.tot { border-bottom: 0; font-size: 16px; }
/* плитки фрезеровок — из старого вида (renderMillingInto), здесь только светлая тема */
.tap-mill { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rs-tap .millIcon { border: 1px solid #D9D6CF; border-radius: 10px; background: #FFFFFF; padding: 6px 4px 5px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
.rs-tap .millIcon.on { border-color: #1D5FD6; box-shadow: 0 0 0 1px #1D5FD6; }
.rs-tap .millIcon svg { width: 100%; height: 30px; display: block; }
.rs-tap .millIcon .nm { font-size: 11px; color: #3A3935; text-align: center; line-height: 1.1; }
.rs-tap .millIcon .ml { font-size: 10px; color: #8A877F; }

/* нижняя навигация */
.tap-nav { flex: 0 0 64px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: #FFFFFF; border-top: 1px solid #E2E0DA; padding-bottom: env(safe-area-inset-bottom, 0); }
.tap-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 0 2px; border: 0; background: transparent; font-size: 11px; font-weight: 500; color: #3A3935; }
.tap-toast { position: absolute; left: 12px; right: 12px; bottom: 76px; z-index: 5; padding: 12px 14px; border-radius: 12px; background: #1C1C1E; color: #FFFFFF; font-size: 14px; pointer-events: none; }

/* клавиатура и вопросы */
.tap-layer { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tap-modal { position: absolute; inset: 0; background: rgba(20,20,18,0.40); }
.tap-kp, .tap-ask { position: relative; width: 100%; max-width: 360px; background: #FFFFFF; border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 24px 60px rgba(0,0,0,0.28); }
.tap-kp-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; font-weight: 700; }
.tap-kp-h small { font-size: 12px; font-weight: 400; color: #5B5A55; }
.tap-kp-v { font-size: 30px; font-weight: 700; text-align: center; padding: 6px 0; border-bottom: 2px solid #1D5FD6; }
.tap-kp-v span { font-size: 15px; color: #5B5A55; font-weight: 500; }
.tap-kp-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tap-kp-g button { min-height: 52px; border: 1px solid #D9D6CF; border-radius: 12px; background: #FFFFFF; font-size: 20px; font-weight: 600; }
.tap-kp .tap-line .tap-btn, .tap-ask .tap-line .tap-btn { flex: 1 1 0; }
.tap-ask h2 { margin: 0; font-size: 18px; font-weight: 700; }
.tap-ask p { margin: 0; font-size: 14px; line-height: 1.45; color: #2B2A27; }
.tap-ask .tap-ask-p { font-weight: 600; }

/* ── Компьютер и планшет лёжа (28.10.2026, доска «Компьютер — мебельщики» утверждённого макета) ──
   Окно нового вида от 1000 px — tap.js ставит .tap--wide. Сверху одна полоса: кнопки слева, цена и
   заказ справа; схема слева во всю высоту, настройки — постоянной панелью справа (ничего не выбрано —
   шкаф и подсказки). Те же узлы, что у телефона, — только расставлены сеткой */
.rs-tap.tap--wide { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: 64px minmax(0, 1fr); }
.tap--wide .tap-nav { grid-row: 1; grid-column: 1; display: flex; align-items: center; gap: 4px; padding: 0 12px; border-top: 0; border-bottom: 1px solid #E2E0DA; }
.tap--wide .tap-nav button { flex-direction: row; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.tap--wide .tap-head { grid-row: 1; grid-column: 2; justify-content: flex-end; gap: 16px; padding: 0 16px; }
.tap--wide .tap-price { align-items: flex-end; }
.tap--wide .tap-stage { grid-row: 2; grid-column: 1; }
.tap--wide .tap-sheet { grid-row: 2; grid-column: 2; max-height: none; border-radius: 0; box-shadow: none; border-left: 1px solid #E2E0DA; padding: 20px; }
.tap--wide .tap-toast { left: 16px; right: auto; max-width: 520px; bottom: 16px; }
/* окно 1000–1099: шесть кнопок с подписями шире своей колонки — «Отменить / Вернуть» значками
   (подпись остаётся для экранного диктора, при наведении — title) */
@media (max-width: 1099px) {
	.tap--wide .tap-nav [data-act=undo] span, .tap--wide .tap-nav [data-act=redo] span {
		position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.tap-tips { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; color: #3A3935; }
/* мышь: схема нажимается — курсор-рука; кнопки отзываются на наведение */
@media (hover: hover) and (pointer: fine) {
	.rs-tap .tap-ov { cursor: pointer; }
	.tap--wide .tap-nav button:hover:not(:disabled), .rs-tap .tap-btn:hover:not(:disabled):not(.tap-btn--primary):not(.tap-btn--order),
	.rs-tap .tap-tg:hover:not(:disabled):not(.on) { background: #F2F1EC; }
}

/* «Все настройки»: старый вид на том же шкафу — кнопка возврата */
.rs-tap-back { display: none; }
html[data-ui=back] .rs-tap { display: none; }
html[data-ui=back] .rs-tap-back { display: block; position: fixed; left: 50%; top: 8px; transform: translateX(-50%); z-index: 60; min-height: 40px; padding: 0 16px;
	border: 0; border-radius: 20px; background: #1D5FD6; color: #FFFFFF; font: 600 14px/1 system-ui, sans-serif; box-shadow: 0 6px 18px rgba(0,0,0,0.25); cursor: pointer; }
/* 3D нового вида привязан к его окну (draw3d init3d один на страницу) — в старом виде вкладку 3D не даём */
html[data-ui=back] .vbtn[data-view="3d"] { display: none; }
/* та же кнопка над липкой полосой заказа старого вида — она всегда у низа видимой части экрана */
.mobbar__back { display: none; }
html[data-ui=back] .mobbar__back { display: block; position: absolute; left: 12px; bottom: calc(100% + 8px); min-height: 40px; padding: 0 14px;
	border: 0; border-radius: 20px; background: #1D5FD6; color: #FFFFFF; font: 600 14px/1 system-ui, sans-serif; box-shadow: 0 6px 18px rgba(0,0,0,0.25); cursor: pointer; }
