/* Страница пары и инструмент съёмки (вариант A «Чертёж») */
.wrap { max-width: 1120px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--rule); }
.wm { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.wm svg { width: 22px; height: 22px; }
.langs { display: flex; gap: 4px; }
.langs button { font: inherit; font-size: 12px; font-weight: 700; padding: 5px 9px; border: 1.5px solid var(--rule-2); border-radius: var(--radius); background: none; color: var(--ink-2); cursor: pointer; }
.langs button[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.langs { position: relative; }
details.langs summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; padding: 5px 9px; border: 1.5px solid var(--rule-2); border-radius: var(--radius); color: var(--ink-2); line-height: 1.2; }
details.langs summary::-webkit-details-marker { display: none; }
details.langs summary::after { content: ' ▾'; }
details.langs[open] summary { border-color: var(--ink); color: var(--ink); }
details.langs ul { position: absolute; inset-inline-end: 0; top: calc(100% + 4px); z-index: 20; margin: 0; padding: 6px; list-style: none; background: var(--sheet); border: 1.5px solid var(--rule-2); border-radius: var(--radius); min-width: 11rem; max-height: 70vh; overflow-y: auto; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
details.langs li a, details.langs li span { display: block; padding: 6px 10px; font-size: 14px; color: var(--ink-2); text-decoration: none; border-radius: var(--radius); }
details.langs li span[aria-current] { color: var(--ink); font-weight: 700; }
details.langs li a:hover { background: var(--rule); color: var(--ink); }

.hero { display: grid; gap: 36px; padding-block: 32px 48px; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; padding-block: 64px; gap: 56px; } }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(1.55rem, 4vw, 2.4rem); margin-top: 14px; }
.measure { display: inline-flex; flex-direction: column; margin-top: 20px; }
.big { display: flex; align-items: flex-end; gap: 10px; }
.big .cond { font-size: clamp(5.5rem, 24vw, 10.5rem); line-height: .78; letter-spacing: -.03em; }
.big small { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 650; padding-bottom: .2em; color: var(--ink-2); }
.dimline { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; margin-top: 14px; white-space: nowrap; }
.dimline::before, .dimline::after { content: ""; flex: 1; height: 9px; border-top: 1.5px solid currentColor; transform: translateY(4px); }
.dimline::before { border-inline-start: 1.5px solid currentColor; }
.dimline::after { border-inline-end: 1.5px solid currentColor; }
.lead { color: var(--ink-2); max-width: 50ch; margin-top: 22px; font-size: 1.05rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; margin-top: 26px; }
.note { font-size: 13px; color: var(--ink-2); }
.trust { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--ink-2); }
.trust li::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--accent); margin-inline-end: 8px; vertical-align: 2px; }
.fig { margin: 0; background: var(--sheet); border: 1px solid var(--rule-2); border-radius: 6px; }
.fig svg { width: 100%; height: auto; display: block; padding: 14px 10px 4px; }
.foot { border-top: 1px solid var(--rule); padding-block: 20px 40px; font-size: 13px; color: var(--ink-2); display: grid; gap: 8px; }
.foot a { color: var(--ink-2); }

/* ===== Инструмент: полноэкранный слой ===== */
.tool { position: fixed; inset: 0; z-index: 50; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; }
.tool[hidden] { display: none; }
.scr { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.scr[hidden] { display: none; }
.pad { padding: calc(14px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
.inner { width: 100%; max-width: 460px; margin-inline: auto; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(127 127 127 / .14); color: inherit; font-size: 18px; display: grid; place-items: center; cursor: pointer; flex: none; }

/* Онбординг */
.onb-top { display: flex; justify-content: space-between; align-items: center; }
.onb-top .cond { font-size: 2.6rem; line-height: 1; }
.onb-top .cond span { color: var(--ink-3); }
.slide { display: none; flex-direction: column; gap: 12px; flex: 1; justify-content: center; }
.slide.on { display: flex; }
.slide svg.ill { width: 100%; max-height: 170px; margin-bottom: 8px; }
.slide h2 { font-size: 1.8rem; font-stretch: 78%; font-weight: 780; line-height: 1.05; }
.slide p, .slide li { color: var(--ink-2); }
.slide ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: s; }
.slide ol li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; counter-increment: s; }
.slide ol li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.opt { display: grid; gap: 8px; margin-top: 4px; }
.opt label { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1.5px solid var(--rule-2); border-radius: 8px; cursor: pointer; font-weight: 600; }
.opt input { accent-color: var(--accent); width: 18px; height: 18px; }
.opt label:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.q { font-weight: 700; margin-top: 10px; }

/* Камера (всегда тёмная) */
.scr-cam { background: #0b0c0e; color: #f1eee6; }
.cbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 10px max(14px, env(safe-area-inset-left, 0px)); }
.cpill { font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 999px; background: rgb(255 255 255 / .12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #000; }
.vf video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vf video.mirror { transform: scaleX(-1); }
.vf svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; background: rgb(11 12 14 / .82); font-weight: 700; font-size: 15px; width: max-content; max-width: calc(100% - 24px); text-align: center; }
.hint i { width: 9px; height: 9px; border-radius: 50%; background: #f0a94c; flex: none; }
.hint.ok i { background: #52cf8b; } .hint.no i { background: #ff7b6c; } .hint.wait i { background: #8b8d92; }
.cd { position: absolute; inset: 0; display: grid; place-items: center; font-stretch: 70%; font-weight: 800; font-size: 7rem; color: #fff; text-shadow: 0 4px 30px rgb(0 0 0 / .6); pointer-events: none; }
.cctl { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px max(18px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); }
.side { display: grid; justify-items: center; gap: 4px; font: inherit; font-size: 11px; color: rgb(241 238 230 / .8); background: none; border: 0; cursor: pointer; }
.side span.rb { width: 46px; height: 46px; border-radius: 50%; background: rgb(255 255 255 / .12); display: grid; place-items: center; }
.side svg { width: 20px; height: 20px; }
.side[aria-pressed="true"] span.rb { background: #f1eee6; color: #0b0c0e; }
.shut { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; padding: 5px; background: none; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.shut i { display: block; width: 100%; height: 100%; border-radius: 50%; background: #fff; }
.shut.ready { opacity: 1; border-color: #52cf8b; }
.shut:active i { transform: scale(.92); }

/* Проверка */
.busy { flex: 1; display: grid; place-content: center; gap: 18px; text-align: center; }
.busy h2 { font-size: 1.6rem; font-stretch: 78%; font-weight: 780; }
.busy ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--ink-3); text-align: start; }
.busy li.on { color: var(--ink); } .busy li.done { color: var(--ok); }
.busy li::before { content: "○  "; } .busy li.on::before { content: "◐  "; } .busy li.done::before { content: "✓  "; }

/* Результат */
.res { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.res .inner { gap: 14px; flex: none; }
.res .inner > * { flex-shrink: 0; }
.res-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.verdict { border-radius: 8px; padding: 12px 14px; font-weight: 700; display: flex; gap: 10px; align-items: center; }
.verdict.ok { background: var(--ok-wash); color: var(--ok); } .verdict.fix { background: var(--fix-wash); color: var(--fix); } .verdict.no { background: var(--no-wash); color: var(--no); }
.pv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.pv .ph { padding: 10px; } .pv canvas { width: 100%; height: auto; display: block; background: #fff; }
.pv dl { margin: 0; display: grid; gap: 2px; font-size: 12px; min-width: 96px; }
.pv dt { color: var(--ink-3); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.pv dd { margin: 0 0 6px; font-stretch: 78%; font-weight: 760; font-size: 16px; }
.tog { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.tog input { accent-color: var(--accent); }
.report .d { display: block; color: var(--ink-2); font-size: 12px; }
.report .info .i { background: var(--wash, var(--rule)); color: var(--ink-2); }
.res .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.res .seg button { padding: 9px 4px; font-size: 13px; }
.res .seg.two { grid-template-columns: 1fr 1fr; }
.fdesc { font-size: 13px; color: var(--ink-2); min-height: 2.6em; }
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.small { font-size: 12px; color: var(--ink-2); }
.warn { font-size: 13px; padding: 10px 12px; border-radius: 8px; background: var(--no-wash); color: var(--ink); }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* Готовое фото: действия после проверки */
.ready-act { display: grid; gap: 10px; margin-top: 16px; }
.ready-act .small { margin: 0 0 4px; }
