.ncd{--ncd-bg:#fff;--ncd-ink:#243548;--ncd-soft:#edf5fa;--ncd-border:#bdcedd;background:var(--ncd-bg);color:var(--ncd-ink);border:1px solid var(--ncd-border);border-radius:14px;padding:18px;margin:16px 0;line-height:1.65;font:16px/1.65 sans-serif;overflow-wrap:anywhere}
.ncd.dark{--ncd-bg:#15212d;--ncd-ink:#ecf3fa;--ncd-soft:#233649;--ncd-border:#536a80}.ncd *{box-sizing:border-box}.ncd h3{font-size:20px;font-weight:800;margin:0 0 12px}.ncd p{margin:10px 0}.ncd-layout{display:grid;grid-template-columns:minmax(260px,1fr) minmax(270px,1fr);gap:18px}.ncd svg{width:100%;max-height:700px;display:block;background:#f8fafc;border-radius:10px;touch-action:pan-y}.ncd .ncd-zone{cursor:pointer;fill:#eef4f8;stroke:#475569;stroke-width:2}.ncd .ncd-zone.selected{fill:#ffe4a2}.ncd .ncd-zone:focus{stroke:#0476bf;stroke-width:4}.ncd-label{fill:#344456;font-size:13px;font-weight:700;text-anchor:middle;pointer-events:none}.ncd-marker{fill:#b32b25;font-size:20px;font-weight:900;text-anchor:middle;paint-order:stroke;stroke:white;stroke-width:4px;pointer-events:none}.ncd .ncd-examples{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:12px 0}.ncd-example{background:var(--ncd-soft);padding:10px;border-radius:8px;text-align:center;font-size:14px}.ncd-example svg{width:64px;height:40px;margin:auto;max-height:none;touch-action:auto}.ncd label{display:block;margin:10px 0;font-weight:600}.ncd select,.ncd input,.ncd textarea{width:100%;min-height:46px;margin-top:4px;border:1px solid var(--ncd-border);border-radius:8px;padding:10px;color:var(--ncd-ink);background:var(--ncd-bg);font:16px/1.4 sans-serif}.ncd button,.ncd a.ncd-button{min-height:44px;padding:10px 16px;border:1px solid var(--ncd-border);border-radius:8px;background:var(--ncd-soft);color:var(--ncd-ink);font:700 16px/1.4 sans-serif;cursor:pointer;text-decoration:none;display:inline-block}.ncd button.primary{background:#0878b6;border-color:#0878b6;color:white}.ncd button:disabled{opacity:.55;cursor:wait}.ncd .ncd-tip{padding:10px 12px;background:var(--ncd-soft);border-radius:8px;min-height:60px}.ncd .ncd-entry{padding:12px 0;border-bottom:1px solid var(--ncd-border)}.ncd-entry small{display:block;font-size:14px}.ncd-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.ncd .ncd-error{color:#c43b31}.ncd.dark .ncd-error{color:#ffaaa4}.ncd-view [data-ncd-display]{max-width:900px}.ncd-view .ncd{margin-top:8px}.ncd .ncd-photos{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.ncd-photos img{max-width:100%;height:140px;object-fit:contain}.ncd-staff-guide summary{min-height:44px}.ncd-staff-guide[open] summary{margin-bottom:12px}.ncd-staff-guide li{margin:9px 0}.nbd-entry.repaired{opacity:.7;border-style:dashed}.nbd-marker.repaired{display:none}.nbd-entry .nbd-entry-actions{width:100%;display:flex;gap:7px;flex-wrap:wrap}.nbd-entry .nbd-entry-actions button{margin-left:0}.nbd-entry .nbd-entry-actions span{font-size:12px}
@media(max-width:700px){.ncd{padding:12px}.ncd-layout{grid-template-columns:1fr;gap:12px}.ncd svg{max-height:570px}.ncd .ncd-examples{gap:5px}.ncd-example{padding:8px 5px}.ncd .ncd-actions button{flex:1 1 auto}}
@media print{.ncd-controls,.ncd-instructions{display:none!important}.ncd-layout{display:block}.ncd{border:0;color:#111;background:white}.ncd svg{max-height:750px}.ncd-staff-guide{display:none!important}}

.ncd [hidden]{display:none!important}

/* Keep long numeric explanations inside the staff guide. */
.ncd-staff-guide table{table-layout:fixed;min-width:0}
.ncd-staff-guide th:first-child,.ncd-staff-guide td:first-child{width:96px}
.ncd-staff-guide td:nth-child(2){white-space:normal!important;overflow-wrap:anywhere}

/* Point selection dialog stays usable inside the estimate modal and on phones. */
.ncd-popup{box-sizing:border-box;position:fixed;inset:0;margin:auto;width:min(580px,calc(100vw - 24px));max-height:88vh;overflow:auto;padding:20px;border:1px solid #64748b;border-radius:14px;background:#fff;color:#25364a;z-index:9999}
.ncd-popup::backdrop{background:rgba(9,20,32,.6)}
.ncd.dark .ncd-popup{background:#111827;color:#f8fafc}
.ncd-popup h3{margin:0 0 14px;font-size:20px}
.ncd .ncd-quick button{font-size:14px;min-height:44px}
.ncd-photo-first{border:2px solid #e6b949;border-radius:12px;padding:18px;margin:12px 0;background:#fff9e8;color:#293543}
.ncd.dark .ncd-photo-first{background:#2b2518;color:#f8fafc}
.ncd details.ncd-extra{margin:16px 0;border:1px solid #b0becd;border-radius:10px;padding:12px}
.ncd .ncd-field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.ncd .ncd-photo-first img{width:100%;max-height:210px;object-fit:contain}
.ncd .ncd-read-note{background:#eaf4ff;padding:12px;border-radius:8px;color:#223e58}

/* Continuous placement keeps the schema, original coordinates and photo dialog. */
.ncd-palette{padding:16px;border:1px solid #aabed0;border-radius:12px;background:#eef5fb;color:#243548;margin:12px 0 18px;font:16px/1.6 sans-serif}
.ncd-palette h3{margin:0 0 12px;font-size:19px}.ncd-palette-groups,.ncd-palette-symbols{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0}
.ncd-palette button{box-sizing:border-box;min-height:44px;border:1px solid #aabed0;border-radius:8px;background:white;color:#243548;padding:9px 12px;font:600 15px/1.5 sans-serif;cursor:pointer}
.ncd-palette button[aria-pressed=true]{background:#096b9d;color:white;border-color:#096b9d;box-shadow:0 0 0 2px #91cce8}
.ncd-palette-symbols button{flex:1 1 150px;display:flex;align-items:center;gap:12px;text-align:left;max-width:340px}.ncd-palette-symbols b{font-size:23px;min-width:36px}.ncd-palette-symbols span{font-size:14px}
.ncd-palette-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}.ncd-selected-symbol{margin:8px 0;font-weight:700}.ncd-palette button:disabled{opacity:.5;cursor:default}
.ncd-layout>div{min-width:0}.ncd .ncd-marker[role=button]{pointer-events:all;cursor:grab;touch-action:none}.ncd-marker:focus{stroke:#ffdc82;outline:none}.ncd-placing .ncd-zone,.nbd-placing .nbd-zone{cursor:crosshair}
.ncd .ncd-label{font-size:14px}.ncd .ncd-actions span{font-size:14px;flex:1 1 190px}.ncd .ncd-palette h3{font-size:19px}
.nbd-wrap [hidden]{display:none!important}.nbd-wrap #nbdStatus{color:#ffe1a6;font-size:16px;line-height:1.6}.nbd-wrap .nbd-marker{font-size:21px}
@media(max-width:700px){.ncd-palette{padding:12px}.ncd-palette-symbols button{flex-basis:135px;min-height:60px}.ncd-palette-groups button{font-size:14px;padding:8px}.ncd-palette-footer button{width:100%}}
@media print{.ncd-palette,[data-ncd-undo],#nbdUndo,#nbdStatus{display:none!important}}

/* Show the selected location before requesting native camera capture. */
.ncd .ncd-camera-guide{padding:14px;border:2px solid #0878b6;border-radius:10px;background:var(--ncd-soft);margin-bottom:18px}
.ncd .ncd-camera-guide .ncd-photo-target{margin-top:0;font-weight:700;font-size:15px}
.ncd .ncd-camera-instruction{font-size:20px;line-height:1.5}
.ncd .ncd-camera-guide button{width:100%;min-height:52px;font-size:18px}
.ncd .ncd-camera-help{font-size:14px}.ncd [data-ncd-photo-message]{font-weight:700}
