/* The local drafting surface is independent from the photo editor. */
#insert-shape-actions{border-top:1px solid #dadde0;margin-top:10px;padding-top:8px;display:grid;gap:5px}
#insert-shape-actions small{font:650 10px/1.3 var(--sans);color:#495660;padding:0 2px}
#insert-shape-actions button{min-height:40px;text-align:start;border:1px solid #d7dce0;background:#fff;border-radius:7px;padding:5px 9px;color:#27353f;font-weight:690}
#insert-shape-actions button:hover{background:#edf1f4;border-color:#9daab3}
#insert-sketch{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:18px;color:#27353f;background:#faf9f6;border:1px solid #aab4be;border-radius:12px}
#insert-sketch::backdrop{background:#1d23286e}
#insert-sketch h2{font-size:1.3rem;margin:0 0 6px}
#insert-sketch p{font-size:.85rem;line-height:1.4;margin:5px 0 10px}
#insert-sketch svg{display:block;width:100%;max-height:48dvh;background:#eef0ed;border:1px solid #9cabb5;border-radius:8px;cursor:crosshair;touch-action:manipulation}
#insert-sketch polygon{fill:#8c7abb42;stroke:#53467b;stroke-width:1.8;vector-effect:non-scaling-stroke}
#insert-sketch .insert-sketch-points{fill:#53467b}
#insert-sketch .insert-sketch-cursor{fill:none;stroke:#344453;stroke-width:1.4;vector-effect:non-scaling-stroke;visibility:hidden}
#insert-sketch svg:focus-visible .insert-sketch-cursor{visibility:visible}
#insert-sketch footer{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end;margin-top:12px}
#insert-sketch footer button{min-height:44px;border-radius:7px;padding-inline:12px}
#insert-sketch footer button:first-child{margin-inline-end:auto}

#full-insert-note{padding:9px 12px;margin:10px 13px 0;border-radius:7px;color:#314756;background:#e4edf1;font-size:.82rem}
#pocket-open-sketch{background:#e1eaf0}
#insert-sketch .insert-sketch-dimensions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}
#insert-sketch .insert-sketch-dimensions label{min-width:0;display:grid;gap:4px;font:600 12px/1.25 var(--sans)}
#insert-sketch .insert-sketch-dimensions input{box-sizing:border-box;min-width:0;width:100%;border:1px solid #b5c3c9;border-radius:7px;background:#fff;min-height:42px;padding:6px;color:#243641;font:650 16px var(--sans)}
#insert-sketch .insert-sketch-dimensions input:invalid{background:#fae5df}
#insert-sketch[open],#pocket-photo-dialog[open]{animation:casework-insert-enter .16s ease-out both}
@keyframes casework-insert-enter{from{opacity:.5;translate:0 5px}to{opacity:1;translate:0 0}}
@media(prefers-reduced-motion:reduce){#insert-sketch[open],#pocket-photo-dialog[open]{animation:none}}

#pocket-photo-dialog #pocket-photo-measures{position:static;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:8px;pointer-events:auto}
#pocket-photo-dialog .pocket-photo-measure{position:static;transform:none;min-width:0;padding:7px 8px;gap:4px}
#pocket-photo-dialog .pocket-photo-measure input{width:100%;min-height:32px}
