/* ИИ-визуализация потолка по фото (aiviz-ui.js, 05.11.2026): окно #dlgAiviz - фото, отметки поверх него (SVG в точках фото),
   настройки, задания и итог. На телефоне окно во весь экран. */
.dlg.aiviz { width: min(1100px, 96vw); }
.dlg.aiviz .dlg-head { gap: 10px; }
.dlg.aiviz .dlg-head h2 { flex: 0 0 auto; }
.av-tag { flex: 1; font-size: 12px; color: var(--muted); }
.av-svc { font-size: 13px; color: var(--warn); margin-bottom: 10px; }
.av-svc.ok { color: var(--ok); }
.av-stage { margin-bottom: 10px; }
.av-pick { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 12px; border: 2px dashed var(--line2); border-radius: var(--r-lg); cursor: pointer; text-align: center; }
.av-pick[hidden] { display: none; }
.av-pic { position: relative; display: block; width: fit-content; max-width: 100%; margin: 0 auto; line-height: 0; }
.av-pic img { display: block; max-width: 100%; max-height: 62vh; width: auto; height: auto; border-radius: var(--r-sm); user-select: none; -webkit-user-drag: none; }
.av-pic svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.av-ceil { fill: none; stroke: #2a8cf0; stroke-linejoin: round; opacity: .7; } /* сторона потолка между отмеченными соседними углами */
.av-corner { fill: #fff; stroke: #e0742a; stroke-width: 3; }
.av-lbl { fill: #fff; stroke: #000; stroke-width: 3px; paint-order: stroke; font-weight: 700; font-family: Segoe UI, sans-serif; pointer-events: none; }
.av-glbl { fill: #fff; stroke: #000; stroke-width: 2.5px; paint-order: stroke; font-weight: 600; font-family: Segoe UI, sans-serif; pointer-events: none; }
.av-edge { fill: none; stroke: #2a8cf0; stroke-linecap: round; }   /* кромка потолка у стены (08.11.2026, разметка камеры) */
.av-vert { fill: none; stroke: #4cd964; stroke-linecap: round; }   /* вертикаль */
.av-along { fill: none; stroke: #ffd21f; stroke-linecap: round; stroke-dasharray: 10 6; } /* линия вдоль стены */
.av-draft { fill: none; stroke: #fff; stroke-dasharray: 4 4; opacity: .85; }
.av-vtx { fill: #fff; stroke: #333; stroke-width: 1.5; }
.av-seg .seg-btn.done::after { content: ' ✓'; }
.av-seg .seg-btn.skip { text-decoration: line-through; opacity: .6; }
.av-row[hidden] { display: none; }
.av-tools { display: grid; gap: 8px; }
.av-tools[hidden], .av-view[hidden], .av-pic[hidden] { display: none; }
.av-seg { flex-wrap: wrap; }
.av-row { gap: 8px; align-items: center; }
.av-cap { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; min-width: 72px; }
.av-hint { min-height: 1.2em; }
.av-color { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.av-color input { width: 40px; height: 28px; padding: 0; border: 1px solid var(--line2); border-radius: 6px; background: none; }
.av-file2 { cursor: pointer; }
.av-jobs { display: grid; gap: 8px; margin-top: 12px; }
.av-job { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface2); }
.av-job.act { border-color: var(--accent-line); }
.av-thumb { width: 96px; height: 72px; flex: 0 0 96px; object-fit: cover; border-radius: 6px; cursor: zoom-in; background: var(--line); }
.av-wait { display: flex; align-items: center; justify-content: center; font-size: 22px; cursor: default; }
.av-jtxt { flex: 1; font-size: 13px; line-height: 1.35; }
.av-view { margin-top: 12px; display: grid; gap: 8px; }
@media (max-width: 700px) {
  .dlg.aiviz { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .dlg.aiviz .dlg-body { max-height: calc(100dvh - 58px); padding: 10px; }
  .av-pic img { max-height: 55vh; }
  .av-cap { min-width: 0; width: 100%; }
}
