:root{font-family:"Segoe UI",Arial,sans-serif;color:#1a1a1a;background:#f7f8f9;font-synthesis:none;font-size:14px;--red:#c51a1b;--red-dark:#981415;--ink:#1a1a1a;--muted:#797979;--border:#e2e2e2}
*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible{outline:3px solid #c51a1b;outline-offset:4px}
svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon-defs{display:none}[hidden]{display:none!important}
.app-shell{display:flex;height:100dvh;min-height:600px;overflow:hidden}.sidebar{width:280px;flex-shrink:0;background:#1a1a1a;color:white;border-top:5px solid #c51a1b;padding:28px 26px 20px;display:flex;flex-direction:column}
.brand{display:flex;gap:17px;align-items:center;text-decoration:none;color:white}.brand>img{width:88px;height:70px;object-fit:contain}.brand-product{display:flex;flex-direction:column;gap:5px;padding-left:16px;border-left:1px solid #454545}.brand-product>span{font-size:9px;letter-spacing:1.7px;color:#b8b8b8}.brand-product strong{font-size:21px;font-weight:600;letter-spacing:-.5px}
.sidebar-copy{margin-top:43px}.eyebrow{font-size:10px;font-weight:650;letter-spacing:1.7px;color:#a7a7a7}.sidebar h1{font-size:39px;line-height:1.12;letter-spacing:-1.6px;font-weight:600;margin:18px 0}.sidebar-copy p{font-size:13px;line-height:1.7;color:#a5a5a5;margin:0}
.next-card{background:#252525;border:1px solid #393939;border-left:3px solid #c51a1b;padding:17px 15px;margin-top:27px;border-radius:3px}.next-card .eyebrow{font-size:9px;color:#aaa}.next-row{display:flex;align-items:center;gap:14px;margin-top:15px}.number-preview{background:#c51a1b;color:white;display:grid;place-items:center;width:46px;height:46px;border-radius:50%;font-size:23px;font-weight:650;flex-shrink:0}.next-row strong{display:block;font-size:12px;font-weight:600}.next-row div span{display:block;font-size:11px;color:#a3a3a3;margin-top:5px}
.how-to{display:flex;flex-direction:column;gap:19px;margin-top:29px}.how-to>div{display:flex;gap:13px}.how-to>div>span{font-size:10px;font-weight:650;color:#e66b6b;padding-top:2px}.how-to p{margin:0;font-size:11px;color:#989898;line-height:1.8}.how-to strong{display:block;color:#e0e0e0;font-size:12px;font-weight:600}.local-note{display:flex;gap:9px;margin-top:auto;padding-top:25px}.local-note svg{width:17px;color:#d66262}.local-note p{margin:0;font-size:10px;color:#ddd;line-height:1.9}.local-note span{display:block;color:#929292}.sidebar-footer{font-size:9px;letter-spacing:1.3px;color:#e1e1e1;border-top:1px solid #383838;margin-top:20px;padding-top:17px;display:flex;justify-content:space-between;gap:8px}.sidebar-footer span{color:#818181;font-size:8px}
main{display:flex;flex-direction:column;min-width:0;flex:1}.topbar{position:relative;height:99px;flex-shrink:0;background:#fff;border-top:5px solid #981415;border-bottom:1px solid #e2e2e2;padding:0 34px;display:flex;align-items:center;justify-content:space-between;gap:18px}.document-info{display:flex;gap:13px;align-items:center;min-width:0}.document-info>svg{color:#981415;width:24px;height:27px}.document-info>div{min-width:0}.document-info strong{display:block;font-size:14px;font-weight:650;max-width:30vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-info div span{display:block;color:#8b8b8b;font-size:11px;margin-top:6px}.mobile-brand{display:none}.file-actions{display:flex;gap:10px;flex-shrink:0}
.button{border:1px solid transparent;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 18px;font-size:12px;font-weight:600;border-radius:4px;min-height:43px;white-space:nowrap;transition:background .15s,box-shadow .15s}.button svg{width:17px;height:17px}.primary{background:#c51a1b;color:white;box-shadow:0 2px 4px #6e101010}.primary:hover:enabled{background:#981415}.secondary{border-color:#d5d5d5;background:white;color:#47474a}.secondary:hover:enabled{background:#f1f2f3}.large{padding:14px 25px;font-size:14px;min-height:50px}.danger{background:#981415;color:white}
.workspace{position:relative;flex:1;min-height:0;background:#f7f8f9;overflow:auto}.welcome{max-width:860px;padding:36px 42px 27px;margin:0 auto}.welcome-top{text-align:center}.mini-badge{display:inline-flex;align-items:center;gap:8px;font-size:9px;font-weight:650;letter-spacing:2px;color:#981415;padding:5px 0}.mini-badge>span{height:5px;width:5px;background:#c51a1b}
h2{font-weight:600;letter-spacing:-1.2px}.welcome h2{font-size:39px;line-height:1.07;letter-spacing:-1px;margin:16px 0}.welcome h2>span{color:#c51a1b}.welcome-top p{color:#797979;font-size:13px;line-height:1.8;margin:0 0 21px}.file-hint{display:block;font-size:10px;color:#999;margin-top:12px}
.map-preview{border-radius:4px;overflow:hidden;margin-top:28px;border:1px solid #dfe1e4;background:white;box-shadow:0 8px 24px #1a1a1a05}.map-preview>svg{width:100%;height:auto;display:block;stroke:none}.drawing-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 17px;border-bottom:1px solid #e8e8e8;font-size:8px;font-weight:650;letter-spacing:1px;color:#85898e}.drawing-header>span:first-child{display:flex;align-items:center;gap:7px;color:#47474a}.drawing-dot{background:#c51a1b;width:5px;height:5px}.drawing-header b{padding:0 7px;color:#b0b4b8}.preview-caption{display:flex;align-items:center;gap:7px;border-top:1px solid #e9e9e9;padding:11px 17px;font-size:10px;color:#5f6266}.tiny-pin{width:5px;height:5px;border-radius:50%;background:#c51a1b}.drawing-scale{margin-left:auto;font-size:7px;letter-spacing:1.2px;color:#a1a3a7}.demo-row{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:18px;font-size:11px;color:#888}.demo-row button{padding:7px 0;background:none;border:0;color:#981415;font-size:11px;display:flex;align-items:center;gap:4px;font-weight:600}.demo-row button svg{width:13px;height:13px}.install-help{display:flex;align-items:center;justify-content:center;gap:6px;margin:9px auto 0;border:0;background:transparent;color:#656565;font-size:10px;padding:8px}.install-help svg{width:14px;height:14px}
.statusbar{min-height:57px;flex-shrink:0;background:white;border-top:1px solid #e2e2e2;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 28px;font-size:10px;color:#797979}.session-info{display:flex;align-items:center;gap:8px}.status-dot{width:5px;height:5px;background:#981415;border-radius:50%;flex-shrink:0}.edit-actions{display:flex;align-items:center;gap:18px}.edit-actions>span{padding-right:15px;border-right:1px solid #e2e2e2}.edit-actions button{background:none;color:#47474a;border:0;display:flex;align-items:center;gap:6px;padding:8px 0;min-height:38px;font-size:11px}.edit-actions svg{width:15px;height:15px}.edit-actions .clear{color:#8e6161}
.editor{height:100%;display:flex;flex-direction:column}.editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 24px;flex-shrink:0;border-bottom:1px solid #e6e6e6;background:#fff}.mode-switch{display:flex;background:#f1f2f3;padding:3px;border-radius:4px;gap:2px}.mode-switch button{display:flex;align-items:center;gap:6px;border:0;background:transparent;padding:9px 13px;border-radius:2px;font-size:11px;color:#797979;min-height:37px}.mode-switch .active{background:#c51a1b;color:white;box-shadow:0 1px 3px #98141515}.mode-switch svg{width:16px;height:16px}.page-control{display:flex;align-items:center;gap:8px;color:#797979;font-size:11px}.icon-button{width:36px;height:36px;border:0;display:grid;place-items:center;background:transparent;border-radius:3px;color:#47474a;font-size:23px}.icon-button:hover:enabled{background:#f1f2f3}.icon-button svg{width:16px;height:16px}.reversed{transform:rotate(180deg)}
.map-scroll{flex:1;overflow:auto;overscroll-behavior:contain;position:relative;min-height:0;background:#eceef0;touch-action:pan-x pan-y pinch-zoom;scrollbar-width:thin;scrollbar-color:#bfc2c7 transparent}.paper-wrap{box-sizing:content-box;padding:24px 30px 35px;margin:0 auto;min-width:calc(100% - 60px)}.paper{position:relative;background:white;box-shadow:0 2px 15px #15151515;margin:0 auto;touch-action:pan-x pan-y pinch-zoom;cursor:crosshair}.paper.panning{cursor:grab;touch-action:none}.paper.dragging{cursor:grabbing}#pdfCanvas{display:block;width:100%;height:100%}#markers{position:absolute;inset:0;pointer-events:none;overflow:hidden}.marker{position:absolute;display:grid;place-items:center;transform:translate(-50%,-50%);background:#c51a1b;color:#fff;border:2px solid white;border-radius:50%;font-weight:700;font-family:Arial,sans-serif;box-shadow:0 1px 4px #51101040;line-height:1}
.canvas-controls{display:flex;align-items:center;justify-content:space-between;padding:9px 24px;gap:15px;flex-shrink:0;border-top:1px solid #e2e2e2;background:#f7f8f9}.canvas-controls>span{font-size:10px;color:#858585}.zoom-controls{display:flex;align-items:center;background:white;border:1px solid #d9d9d9;border-radius:4px;padding:2px}.zoom-controls>span:not(.separator){min-width:48px;text-align:center;font-size:11px;color:#6b6b6b}.separator{height:20px;width:1px;background:#e2e2e2;margin:0 3px}
.loading-overlay{position:absolute;inset:0;z-index:10;background:#f7f8f9ed;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;color:#47474a}.loading-overlay strong{font-size:13px;font-weight:500}.spinner{width:30px;height:30px;border:3px solid #e4d2d2;border-top-color:#c51a1b;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.toast{position:fixed;bottom:78px;left:calc(50% + 140px);transform:translateX(-50%);max-width:min(520px,90vw);background:#1a1a1a;color:white;border-left:3px solid #c51a1b;border-radius:4px;padding:14px 19px;box-shadow:0 5px 25px #0002;z-index:20;font-size:12px;line-height:1.6}.toast.error{background:#981415}
dialog{border:1px solid #d8d8d8;border-top:4px solid #c51a1b;border-radius:6px;padding:28px;max-width:410px;width:calc(100% - 36px);color:#1a1a1a;box-shadow:0 20px 90px #0003}dialog::backdrop{background:#1a1a1a88;backdrop-filter:blur(3px)}dialog h2{font-size:23px;letter-spacing:-.5px}dialog p{font-size:13px;line-height:1.8;color:#797979}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}.dialog-icon{background:#f8eaea;color:#981415;display:grid;place-items:center;border-radius:4px;width:40px;height:40px}.install-steps{padding-left:22px;font-size:13px;line-height:1.8;color:#47474a}.install-steps li{padding:5px 0 5px 4px}
@media(min-width:1500px){.welcome{padding-top:58px;max-width:930px}.welcome h2{font-size:46px}.map-preview{margin-top:35px}.sidebar{width:300px;padding-left:30px;padding-right:30px}.topbar{height:105px}}
@media(max-height:830px) and (min-width:801px){.sidebar{padding-top:22px}.sidebar-copy{margin-top:30px}.sidebar h1{font-size:33px}.next-card{margin-top:22px;padding:14px}.how-to{gap:14px;margin-top:23px}.local-note{padding-top:17px}.topbar{height:84px}.welcome{padding-top:25px;max-width:800px}.welcome h2{font-size:33px;margin-top:12px}.welcome-top p{margin-bottom:17px}.map-preview{margin-top:22px}.demo-row{margin-top:13px}.install-help{margin-top:3px}}
@media(max-width:1080px){.sidebar{width:245px;padding-left:22px;padding-right:22px}.brand>img{width:76px;height:60px}.brand{gap:13px}.brand-product{padding-left:12px}.brand-product strong{font-size:19px}.brand-product>span{font-size:8px}.topbar{padding-left:24px;padding-right:24px}.sidebar h1{font-size:34px}.welcome{padding-left:30px;padding-right:30px}.toast{left:calc(50% + 122px)}}
@media(max-width:800px){.app-shell{min-height:0}.sidebar{display:none}.topbar{height:auto;min-height:139px;padding:12px 19px 15px;padding-top:max(12px,env(safe-area-inset-top));flex-wrap:wrap;gap:12px}.mobile-brand{display:flex;align-items:center;gap:11px;color:#1a1a1a;flex-shrink:0}.mobile-brand>img{width:58px;height:46px;object-fit:contain}.mobile-brand>span{display:flex;flex-direction:column;font-size:18px;font-weight:600;letter-spacing:-.6px;gap:3px}.mobile-brand small{font-size:7px;letter-spacing:1.4px;font-weight:500;color:#981415}.desktop-file{display:none}.document-info{flex:1;min-width:100%;gap:10px}.document-info>div{margin-left:auto;text-align:right;max-width:47%}.document-info strong{max-width:100%;font-size:10px}.document-info div span{font-size:8px;margin-top:5px}.file-actions{width:100%;gap:8px}.file-actions .button{flex:1;min-height:43px}.welcome{padding:31px 20px 25px;max-width:590px}.welcome h2{font-size:33px;line-height:1.06;margin:18px auto 17px;letter-spacing:-.7px}.welcome-top p{font-size:12px;line-height:1.8;max-width:305px;margin:0 auto 22px}.desktop-break{display:none}.mini-badge{font-size:8px;letter-spacing:1.7px}.file-hint{font-size:9px;margin-top:12px}.large{width:100%;max-width:300px;font-size:13px}.map-preview{margin-top:28px}.map-preview>svg{width:125%;max-width:none;transform:translateX(-10%)}.drawing-header{font-size:7px;padding:10px 11px;letter-spacing:.6px}.drawing-header b{padding:0 3px}.preview-caption{font-size:9px;padding:10px 11px}.drawing-scale{display:none}.demo-row{flex-direction:column;gap:0;margin-top:19px;font-size:10px}.demo-row button{font-size:11px}.install-help{font-size:10px;margin-top:5px}.statusbar{padding:8px 17px;padding-bottom:max(8px,env(safe-area-inset-bottom));min-height:59px}.session-info{font-size:9px;max-width:43%;line-height:1.5}.edit-actions{gap:11px}.edit-actions>span{font-size:10px;padding-right:10px;white-space:nowrap}.edit-actions button{font-size:11px;min-height:39px}.edit-actions .clear span{display:none}.editor-toolbar{padding:10px 12px}.mode-switch button{padding:9px 11px;min-height:40px}.page-control{font-size:10px;gap:0}.page-control .icon-button{width:29px}.paper-wrap{padding:17px 14px 25px;min-width:calc(100% - 28px)}.canvas-controls{padding:8px 12px;gap:6px;min-height:58px}.canvas-controls>span{font-size:9px;max-width:45%;line-height:1.5}.zoom-controls .icon-button{width:34px;height:36px}.toast{left:50%;bottom:81px;width:max-content;max-width:90vw}}
@media(max-width:350px){.mobile-brand>span{font-size:16px}.mobile-brand>img{width:49px}.welcome h2{font-size:29px}.topbar{padding-left:14px;padding-right:14px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
body:not(.editing) .sidebar,body:not(.editing) .topbar,body:not(.editing) .statusbar{display:none}
body:not(.editing) .app-shell{min-height:0}body:not(.editing) .workspace{background:#fff}
.simple-home{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:38px;width:100%;max-width:none;height:100%;min-height:320px;padding:24px;padding-top:max(24px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom))}
.simple-home h1{margin:0;font-size:52px;font-weight:650;line-height:1.1;letter-spacing:1px;color:#1a1a1a}.simple-home h1>span{color:#981415}
.simple-home .home-brand{display:flex;align-items:flex-end;justify-content:center;gap:18px}.home-brand img{display:block;width:120px;height:95px;object-fit:contain}.simple-home .home-brand>span{color:#1a1a1a}
.home-actions{width:min(280px,100%);display:flex;flex-direction:column;gap:12px}.home-actions .button{width:100%;max-width:none;min-height:52px;font-size:15px}
.fullscreen-button{border:1px solid #d8d8d8;background:white;display:flex;align-items:center;justify-content:center;gap:6px;padding:9px 11px;border-radius:4px;color:#47474a;font-size:11px;min-height:39px;flex-shrink:0}.fullscreen-button svg{width:17px;height:17px}
.document-fullscreen{overflow:hidden}.document-fullscreen .sidebar,.document-fullscreen .topbar,.document-fullscreen .statusbar{display:none}
.document-fullscreen .editor{position:fixed;inset:0;z-index:30;width:100%;height:100dvh;background:#eceef0}
.document-fullscreen .editor-toolbar{position:absolute;left:12px;right:12px;top:max(12px,env(safe-area-inset-top));z-index:3;border:1px solid #ddd;border-radius:5px;padding:5px 7px;background:#fffffff5;box-shadow:0 2px 10px #0000000c}
.document-fullscreen .fullscreen-button{border-color:#c51a1b;background:#c51a1b;color:white}
.document-fullscreen .map-scroll{height:100%;width:100%;flex:1}.document-fullscreen .paper-wrap{padding-top:80px;padding-bottom:85px}
.document-fullscreen .canvas-controls{position:absolute;right:12px;bottom:max(12px,env(safe-area-inset-bottom));padding:0;background:none;border:0;z-index:3;flex-wrap:wrap;gap:6px;max-width:calc(100% - 24px)}
.document-fullscreen .zoom-controls{box-shadow:0 2px 8px #00000012}.document-fullscreen .loading-overlay{position:fixed;z-index:35}.document-fullscreen .toast{z-index:40}
@media(max-width:800px){.editor-toolbar{gap:5px;padding:9px 10px}.mode-switch button{padding:9px 8px;gap:4px}.page-control{margin-left:auto}.fullscreen-button{padding:9px 7px;font-size:10px;gap:4px}.fullscreen-button svg{width:16px}.document-fullscreen .editor-toolbar{left:8px;right:8px;padding:4px}.simple-home h1{font-size:45px}}
@media(max-width:800px){.simple-home .home-brand{gap:15px}.home-brand img{width:104px;height:82px}}

.canvas-controls{position:relative;z-index:3;justify-content:flex-end}
.canvas-control-meta{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
#modeHint{flex:1;min-width:0;font-size:10px;line-height:1.5;color:#626268}
#sharedSyncStatus{flex:0 1 auto;padding:4px 8px;border:1px solid #d9d9d9;border-radius:4px;background:#fff;color:#47474a;font-size:11px;line-height:1.35;overflow-wrap:anywhere}
#sharedSyncStatus[data-state=error]{border-color:#d4a7a8;background:#f8eaea;color:#981415}
.document-fullscreen #modeHint{display:none}
.document-fullscreen .canvas-control-meta{flex:1 1 100%;justify-content:flex-end}
.document-fullscreen .canvas-control-meta:has(#sharedSyncStatus[hidden]){display:none}
.canvas-control-actions{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-shrink:0}
.canvas-tool{display:flex;align-items:center;justify-content:center;gap:6px;min-width:44px;min-height:44px;padding:8px 10px;border:1px solid #d9d9d9;border-radius:4px;background:#fff;color:#47474a;font-size:11px;font-weight:600;line-height:1.2;white-space:nowrap;cursor:pointer}
.canvas-tool svg{width:17px;height:17px}
.canvas-tool:hover:enabled,.canvas-tool:is(summary):hover,#markerStyleDetails[open]>.canvas-tool{border-color:#d4a7a8;background:#f8eaea;color:#981415}
summary.canvas-tool{list-style:none}
summary.canvas-tool::-webkit-details-marker{display:none}
.canvas-tool:focus-visible,.marker-style-panel input:focus-visible{outline:3px solid #c51a1b;outline-offset:2px}
.marker-style-panel{position:absolute;z-index:1;right:0;bottom:calc(100% + 8px);display:grid;gap:4px;width:min(264px,calc(100vw - 32px));padding:14px 16px;border:1px solid #d9d9d9;border-top:3px solid #c51a1b;border-radius:5px;background:#fff;box-shadow:0 8px 30px #1a1a1a24}
.marker-style-panel p{margin:0 0 8px;color:#5f6266;font-size:12px;line-height:1.45}
.marker-style-row{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#1a1a1a;font-size:13px;font-weight:600}
.marker-style-row output{color:#68686b;font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}
#markerSize{width:100%;height:34px;margin:0;accent-color:#c51a1b;cursor:pointer}
#markerColor{width:48px;height:44px;padding:4px;border:1px solid #d9d9d9;border-radius:4px;background:#fff;cursor:pointer}
#markerEditDone{justify-self:end;margin-top:6px}
.marker-point{padding:0;appearance:none;pointer-events:auto;touch-action:none;cursor:grab;user-select:none;-webkit-touch-callout:none}
.paper.panning .marker-point{pointer-events:none}
.marker-point:is(.is-selected,[aria-pressed=true]){z-index:1;box-shadow:0 0 0 2px #1a1a1a,0 2px 6px #0005}
.marker-point.is-dragging{z-index:2;cursor:grabbing;box-shadow:0 0 0 2px #1a1a1a,0 4px 12px #0006}
.marker-point:focus-visible{outline:2px solid #1a1a1a;outline-offset:3px}

#sharedLibraryDialog{max-width:530px;max-height:calc(100dvh - 36px);overflow:auto;padding:22px clamp(16px,4vw,28px)}
#sharedLibraryDialog h2{margin:0 0 8px}
#sharedLibraryDialog p{color:#5f6266}
.shared-library-help{margin:0 0 16px}
#sharedLibraryStatus:empty,#sharedLibraryList:empty{display:none}
#sharedLibraryList{display:grid;gap:8px;padding:0;margin:12px 0 0;list-style:none}
#sharedLibraryList li{padding:12px;border:1px solid #e2e2e2;border-radius:4px;background:#f7f8f9;overflow-wrap:anywhere}
.shared-visit-title,.shared-visit-meta{display:block}
.shared-visit-title{font-weight:650;color:#1a1a1a}
.shared-visit-meta{margin-top:4px;color:#5f6266;font-size:12px}
.shared-visit-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
#sharedLibraryList button{min-height:40px}
.shared-library-actions{justify-content:space-between}
.shared-library-actions button:last-child{margin-left:auto}

@media(max-width:800px){.canvas-tool{padding:8px 7px}summary.canvas-tool>span{display:none}.shared-library-editor{padding-left:10px;padding-right:10px}.document-fullscreen .canvas-control-actions{gap:5px}}
@media(max-width:540px){.file-actions .shared-library-editor{flex:0 0 43px}.shared-library-editor>span{display:none}.canvas-controls:has(#shareVisitButton:not([hidden]),#startVisitButton:not([hidden]),#sharedSyncStatus:not([hidden])){flex-wrap:wrap}.canvas-controls:has(#shareVisitButton:not([hidden]),#startVisitButton:not([hidden]),#sharedSyncStatus:not([hidden]))>.canvas-control-meta{flex-basis:100%}}
@media(max-width:390px){.editor-toolbar .fullscreen-button>span{display:none}.editor-toolbar .fullscreen-button{min-width:38px}.editor-toolbar .page-control{white-space:nowrap}}
@media(max-width:360px){.canvas-control-actions,.document-fullscreen .canvas-control-actions{gap:4px}.canvas-control-actions .zoom-controls .icon-button{width:29px}.canvas-control-actions .zoom-controls>span:not(.separator){min-width:40px}#shareVisitButton svg{display:none}}

/* Netlify collaboration controls */
.statusbar .edit-actions{margin-left:auto}
#restoreButton{display:none!important}
.editor-top-controls{flex-shrink:0;min-width:0}
.live-bar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:3px 24px;min-height:46px;border-bottom:1px solid #e2e2e2;background:#fff;color:#47474a}
.live-state{display:flex;align-items:center;gap:6px;min-width:0;max-width:145px;font-size:11px;font-weight:650}
.live-dot{width:6px;height:6px;flex-shrink:0;border-radius:50%;background:#981415}
#liveStatus{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.live-people{min-width:0;display:flex;align-items:center;gap:5px;overflow-x:auto;overscroll-behavior-inline:contain;white-space:nowrap;color:#5f6266;font-size:11px;scrollbar-width:none}
.live-people::-webkit-scrollbar{display:none}
.live-people>*{flex-shrink:0}
.live-person{display:inline-flex;align-items:center;gap:4px;padding:3px 6px;border:1px solid #e2e2e2;border-radius:4px;background:#f7f8f9}
.live-person-swatch{width:8px;height:8px;flex-shrink:0;border-radius:50%;box-shadow:0 0 0 1px #0002}
.live-bar .button{min-height:38px;padding:6px 9px;font-size:11px}
.team-share-button{border-color:#d4a7a8;color:#981415}
#teamShareStatus{min-width:0;color:#5f6266;font-size:11px;line-height:1.35}
.shared-visit-delete,.local-visit-delete{color:#981415}
.shared-visit-presence{display:block;min-height:1.45em;margin-top:5px;color:#5f6266;font-size:12px;line-height:1.45}
.shared-visit-presence.is-active{color:#205744;font-weight:650}
#localLibraryDialog{max-width:530px;max-height:calc(100dvh - 36px);overflow:auto;padding:22px clamp(16px,4vw,28px)}
#localLibraryDialog h2,#archiveDeleteDialog h2,#localDeleteDialog h2{margin:0 0 10px}
#localLibraryDialog p{color:#5f6266}
.local-library-help{margin:0 0 16px}
#localLibraryStatus:empty,#localLibraryList:empty{display:none}
#localLibraryList{display:grid;gap:8px;padding:0;margin:12px 0 0;list-style:none}
#localLibraryList li{padding:12px;border:1px solid #e2e2e2;border-radius:4px;background:#f7f8f9;overflow-wrap:anywhere}
#localLibraryList button{min-height:40px}
#archiveDeleteDialog p,#localDeleteDialog p{overflow-wrap:anywhere}
.archive-delete-name{margin:0 0 7px;color:#1a1a1a;font-weight:650}
#archiveDeleteDescription,#localDeleteDescription{margin:0;color:#5f6266}
.archive-delete-error{color:#981415}
.archive-delete-error:empty{margin:0}
#archiveDeleteForm,#localDeleteForm{flex-wrap:wrap}
#liveNameDialog h2{margin:0 0 8px}
#liveNameForm label{display:block;margin:12px 0 5px;font-size:13px;font-weight:600}
#liveNameInput{width:100%;min-height:44px;padding:8px 10px;border:1px solid #c7c7c7;border-radius:4px;color:#1a1a1a;font:inherit;font-size:16px}
#liveNameInput:focus-visible{outline:3px solid #c51a1b;outline-offset:2px}
@media(max-width:800px){.live-bar{gap:7px;padding-right:10px;padding-left:10px}}
@media(max-width:540px){.canvas-controls:has(#teamShareButton:not([hidden])){flex-wrap:wrap}.canvas-controls:has(#teamShareButton:not([hidden]))>.canvas-control-meta{flex-basis:100%}}
@media(max-width:360px){.live-state{max-width:107px}}

/* Private invitation controls */
#ownerShareDialog h2,#ownerPasteDialog h2{margin:0 0 8px}
#ownerShareDialog label,#ownerPasteDialog label{display:block;margin:12px 0 5px;font-size:13px;font-weight:600}
#ownerShareLink,#ownerPasteLink{width:100%;min-width:0;min-height:44px;padding:8px 10px;border:1px solid #c7c7c7;border-radius:4px;font:inherit;font-size:16px}
#ownerShareLink:focus-visible,#ownerPasteLink:focus-visible{outline:3px solid #c51a1b;outline-offset:2px}
#ownerShareStatus:empty{margin:0}
#sharedLibraryDialog .shared-library-actions{flex-wrap:wrap}
@media(max-height:470px){.simple-home:has(#ownerShareButton:not([hidden])){height:auto;min-height:100%;gap:20px}.simple-home:has(#ownerShareButton:not([hidden])) .home-actions{gap:8px}}

/* Keep the selected marker diameter in screen pixels. */
.marker{transform:translate(-50%,-50%) rotate(var(--drawing-turn,0deg)) scale(var(--screen-scale,1))}

/* Fullscreen is the drawing and its exit control. */
.document-fullscreen .editor{height:100%;height:100dvh;height:var(--fullscreen-height,100dvh)}
.document-fullscreen .editor-top-controls,.document-fullscreen .canvas-controls,.document-fullscreen .toast{display:none}
.document-fullscreen .map-scroll{scrollbar-width:none}
.document-fullscreen .map-scroll::-webkit-scrollbar{display:none}
.document-fullscreen .map-scroll .paper-wrap{
  box-sizing:border-box;display:flex;align-items:center;min-width:100%;min-height:100%;
  padding:0
}
.document-fullscreen .paper{flex-shrink:0;box-shadow:none}
.fullscreen-close{
  position:absolute;top:calc(var(--screen-top,0px) + max(4px,env(safe-area-inset-top)));
  right:calc(var(--screen-right,0px) + max(4px,env(safe-area-inset-right)));
  z-index:4;display:grid;place-items:center;width:44px;height:44px;border:0;padding:0;
  border-radius:50%;background:none;color:#252525;touch-action:manipulation;
  transform:scale(var(--screen-scale,1));transform-origin:top right
}
.fullscreen-close svg{width:30px;height:30px;padding:5px;border-radius:50%;background:#fffffff5;box-shadow:0 1px 5px #0003}
.editor-toolbar .fullscreen-button>span{display:inline}

/* Reserve horizontal swipes for page turns only while the drawing fits. */
.map-scroll.page-swipe-ready .paper{touch-action:pan-y pinch-zoom}
/* Reserve single-finger movement on a point while allowing native pinch zoom. */
.map-scroll .marker-point{touch-action:none;touch-action:pinch-zoom;-webkit-user-select:none}
.map-scroll .paper{user-select:none;-webkit-user-select:none}

#exportPdfDialog h2{margin:0 0 8px}
#exportPdfDialog .pdf-export-file{display:flex;align-items:center;gap:10px;border:1px solid #e5e1df;border-radius:10px;background:#faf8f7;padding:10px}
.pdf-export-badge{flex:none;border-radius:6px;background:#f4e5e2;color:#841e15;padding:6px 8px;font-size:11px;font-weight:750}
#exportPdfName{min-width:0;margin:0;font-weight:650;color:#1a1a1a;overflow-wrap:anywhere}
.pdf-export-option{display:flex;align-items:center;gap:10px;min-height:44px;margin-top:10px;font-size:14px;cursor:pointer}
.pdf-export-option input{flex:none;width:19px;height:19px;margin:0;accent-color:var(--sac-red,#c51a1b)}
#exportPdfDialog .dialog-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
#exportPdfShare{grid-column:1/-1}
#exportPdfDialog button[type=submit]{grid-column:2}

/* SAC PDF workspace */
:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sac-red: #b5121b;
  --sac-deep-red: #8e1319;
  --sac-text: #242126;
  --sac-muted: #625f66;
  --sac-line: #e3dfe2;
  --sac-light: #f8f6f7;
  --sac-tint: #f9eff0;
  --sac-gutter: clamp(14px, 2.5vw, 30px);
  color: var(--sac-text);
  background: var(--sac-light);
}

.app-shell { min-height: 0; }
button, summary, .button { touch-action: manipulation; }
:is(button, summary, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--sac-red);
  outline-offset: 3px;
}
.button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}
.button.primary {
  color: #fff;
  background: var(--sac-red);
  box-shadow: 0 2px 5px #74131c21;
}
.button.primary:hover:enabled { background: var(--sac-deep-red); }
.button.secondary { color: var(--sac-text); border-color: var(--sac-line); background: #fff; }
.button.secondary:hover:enabled, a.button.secondary:hover { background: var(--sac-light); }
.button.danger { background: var(--sac-deep-red); }

/* The start screen keeps the product and its actions together. */
body:not(.editing) .workspace {
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse at 50% 25%, #fff 0, #ffffff00 72%),
    linear-gradient(90deg, #3b192707 1px, transparent 1px),
    linear-gradient(#3b192707 1px, transparent 1px), #f7f4f5;
  background-size: auto, 36px 36px, 36px 36px, auto;
}
.welcome.simple-home, .simple-home:has(#ownerShareButton:not([hidden])) {
  position: relative;
  width: min(100%, 454px);
  height: auto;
  min-height: 0;
  gap: clamp(24px, 6vh, 39px);
  overflow: hidden;
  padding: clamp(30px, 6vh, 52px) clamp(20px, 7vw, 44px) clamp(24px, 6vh, 44px);
  border: 1px solid #eae4e7;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 22px 62px #3d172414, 0 2px 8px #2f16110a;
}
.simple-home::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 56px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--sac-red);
  transform: translateX(-50%);
}
.simple-home .home-brand { align-items: center; gap: 19px; font-size: clamp(41px, 12vw, 58px); }
.simple-home .home-brand img { width: clamp(74px, 22vw, 102px); height: auto; }
.simple-home .home-brand > span {
  color: var(--sac-text);
  font-weight: 720;
  letter-spacing: -.075em;
  line-height: 1;
  padding: .045em .055em .075em .32em;
  border-left: 1px solid var(--sac-line);
}
.home-actions, .simple-home:has(#ownerShareButton:not([hidden])) .home-actions { width: 100%; gap: 9px; }
.home-actions .button {
  min-height: 54px;
  padding: 10px 14px;
  gap: 13px;
  border-radius: 12px;
  font-size: 15px;
  justify-content: flex-start;
}
.home-actions .button > span { min-width: 0; text-align: start; white-space: normal; }
.home-actions .button > .home-action-icon { width: 22px; height: 22px; }
.home-actions .button > .home-action-arrow { margin-inline-start: auto; width: 15px; height: 15px; opacity: .75; }
.home-actions .secondary > .home-action-icon { color: var(--sac-deep-red); }
.home-actions .secondary > .home-action-arrow { color: var(--sac-muted); }

/* The editor keeps navigation compact and gives the PDF the remaining height. */
.sidebar {
  width: clamp(208px, 21vw, 248px);
  border-top-width: 3px;
  padding: 23px 20px 18px;
  background: linear-gradient(145deg, #272329, #201e23 68%);
  overflow: auto;
}
.brand { gap: 13px; }
.brand > img { width: 70px; height: auto; }
.brand-product { gap: 2px; }
.brand-product strong { font-size: 24px; font-weight: 700; letter-spacing: -.05em; }
.next-card {
  margin-top: 27px;
  padding: 14px;
  border: 1px solid #48434a;
  border-radius: 13px;
  background: #ffffff08;
}
.next-card .eyebrow { color: #ded7dc; font-size: 10px; }
.next-row { margin-top: 11px; }
.number-preview {
  min-width: 41px;
  width: auto;
  height: 41px;
  padding-inline: 8px;
  background: var(--sac-red);
  font-variant-numeric: tabular-nums;
  font-size: 19px;
}
.how-to { gap: 13px; margin-top: 24px; }
.how-to p { color: #c0b9c1; }
.how-to > div > span { color: #f29399; }
.local-note p { color: #e2dce0; }
.sidebar-footer span { color: #b9b0b8; }
.topbar {
  height: auto;
  min-height: 72px;
  padding: max(10px, env(safe-area-inset-top)) max(var(--sac-gutter), env(safe-area-inset-right))
    10px max(var(--sac-gutter), env(safe-area-inset-left));
  gap: 12px;
  border-top: 3px solid var(--sac-red);
  border-bottom-color: var(--sac-line);
}
.document-info { gap: 10px; }
.document-info > div { min-width: 0; }
.document-info strong { max-width: 100%; font-size: 14px; font-weight: 680; }
.document-info div span { margin-top: 3px; color: var(--sac-muted); font-size: 12px; }
.document-info > .desktop-file { color: var(--sac-deep-red); }
.file-actions { gap: 7px; }
.file-actions > .button > svg { width: 18px; height: 18px; }
.editor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  padding: 8px max(var(--sac-gutter), env(safe-area-inset-right)) 8px max(var(--sac-gutter), env(safe-area-inset-left));
  border-bottom-color: var(--sac-line);
}
.editor-toolbar > :first-child { justify-self: start; }
.editor-toolbar > :last-child { justify-self: end; }
.page-control {
  margin: 0;
  gap: 4px;
  border: 1px solid var(--sac-line);
  border-radius: 11px;
  background: var(--sac-light);
  color: var(--sac-text);
  font-size: 12px;
  white-space: nowrap;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.page-control .icon-button { width: 44px; height: 44px; border-radius: 10px; }
.page-control .icon-button:hover:enabled { background: #eae5e8; }
.canvas-tool, .fullscreen-button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 11px;
  border-color: var(--sac-line);
  color: var(--sac-text);
  font-size: 12px;
  font-weight: 650;
}
.fullscreen-button:hover:enabled { background: var(--sac-light); }
.canvas-tool.team-share-button { color: var(--sac-deep-red); background: var(--sac-tint); border-color: #ebced1; }
.map-scroll {
  background-color: #eae8ec;
  background-image: radial-gradient(#3a2f3e22 0.7px, transparent 0.7px);
  background-size: 16px 16px;
}
.paper { box-shadow: 0 6px 22px #211a2726, 0 0 0 1px #241b2420; }
.canvas-controls {
  padding-inline: max(var(--sac-gutter), env(safe-area-inset-left)) max(var(--sac-gutter), env(safe-area-inset-right));
  gap: 8px;
  border-top-color: var(--sac-line);
  background: #fff;
}
.canvas-control-meta { flex-wrap: wrap; gap: 2px 10px; }
#modeHint, #teamShareStatus { color: var(--sac-muted); font-size: 12px; line-height: 1.4; }
#modeHint { flex-basis: max(45%, 165px); }
.statusbar {
  min-height: 51px;
  padding: 3px max(var(--sac-gutter), env(safe-area-inset-right))
    max(3px, env(safe-area-inset-bottom)) max(var(--sac-gutter), env(safe-area-inset-left));
  border-top-color: var(--sac-line);
}
.edit-actions { gap: 5px; }
.edit-actions > span { margin-inline-end: 3px; font-size: 12px; color: var(--sac-muted); }
.edit-actions button { min-height: 44px; min-width: 44px; padding: 0 8px; font-size: 12px; border-radius: 9px; }
.edit-actions button:hover:enabled { background: var(--sac-light); }
.edit-actions .clear { color: var(--sac-deep-red); }
.marker-style-panel {
  gap: 8px;
  border-color: var(--sac-line);
  border-radius: 14px;
  box-shadow: 0 12px 30px #24192329;
}
.marker-style-panel p { color: var(--sac-muted); }
#markerSize { accent-color: var(--sac-red); }
.live-bar {
  min-height: 44px;
  padding: 3px max(var(--sac-gutter), env(safe-area-inset-right)) 3px max(var(--sac-gutter), env(safe-area-inset-left));
  border-bottom-color: var(--sac-line);
  background: #fbfafb;
}
.live-state { font-size: 12px; color: var(--sac-muted); }
.live-state:has(#liveStatus[data-state="live"]) { color: #205441; }
.live-state:has(#liveStatus[data-state="live"]) .live-dot { background: #287453; }
.live-person { padding: 4px 8px; border-color: var(--sac-line); border-radius: 999px; background: #fff; font-size: 12px; }
.live-bar .button { min-height: 44px; font-size: 12px; }
.toast { left: 50%; bottom: max(80px, calc(env(safe-area-inset-bottom) + 64px)); border-radius: 11px; font-size: 13px; }
.document-fullscreen .map-scroll { background: #eae8ec; }
.document-fullscreen .paper { box-shadow: none; }

/* A shared set of surfaces for saving, libraries and team administration. */
dialog {
  width: min(calc(100% - 36px), 440px);
  max-width: none;
  max-height: calc(100dvh - 40px);
  overscroll-behavior: contain;
  padding: clamp(19px, 4vw, 28px);
  border: 1px solid var(--sac-line);
  border-radius: 20px;
  color: var(--sac-text);
  box-shadow: 0 18px 62px #21152440;
}
dialog::backdrop { background: #21192296; backdrop-filter: blur(4px); }
dialog h2 {
  margin: 0 0 9px;
  font-size: clamp(23px, 6vw, 28px);
  font-weight: 730;
  line-height: 1.15;
  letter-spacing: -.045em;
}
dialog h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.025em; }
dialog p { color: var(--sac-muted); font-size: 14px; line-height: 1.55; }
dialog .dialog-actions { flex-wrap: wrap; gap: 8px; margin-top: 18px; }
dialog .button { white-space: normal; text-align: center; }
.dialog-icon { border-radius: 12px; margin-bottom: 13px; }
dialog :is(label, legend) { color: var(--sac-text); font-weight: 650; }
dialog :is(input:not([type="checkbox"], [type="radio"]), select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #d7d0d5;
  border-radius: 10px;
  background: #fff;
  color: var(--sac-text);
  font: inherit;
  font-size: 16px;
}
dialog :is(#liveNameInput, #ownerShareLink, #ownerPasteLink) { border-color: #d7d0d5; border-radius: 10px; }
#sharedLibraryDialog, #localLibraryDialog, #teamAdminDialog {
  width: min(calc(100% - 36px), 580px);
  max-width: none;
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
#sharedLibraryDialog .shared-library-help, #localLibraryDialog .local-library-help { margin: 0 0 16px; }
#sharedLibraryList, #localLibraryList, .team-admin-list { display: grid; gap: 9px; margin-top: 12px; }
#sharedLibraryList li, #localLibraryList li, .team-admin-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--sac-line);
  border-radius: 13px;
  background: #fbfafb;
}
#sharedLibraryList button, #localLibraryList button { min-height: 44px; }
.shared-visit-title { font-weight: 690; font-size: 14px; color: var(--sac-text); }
.shared-visit-meta { color: var(--sac-muted); }
.shared-visit-presence { color: var(--sac-muted); font-size: 13px; }
.shared-visit-presence.is-active { color: #205441; }
.shared-visit-presence.is-active::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline: 0 6px;
  margin-block-end: 2px;
  border-radius: 50%;
  background: #287453;
}
.shared-visit-actions { margin-top: 10px; gap: 6px; }
#sharedLibraryList .shared-visit-actions button, #localLibraryList .shared-visit-actions button { padding-inline: 10px; font-size: 12px; }
#sharedLibraryList .shared-visit-delete, #localLibraryList .local-visit-delete { color: var(--sac-deep-red); }
.team-admin-heading, .team-admin-field { display: grid; gap: 6px; min-width: 0; }
.team-admin-heading p, .team-admin-card p { margin: 0; }
.team-admin-heading { margin-bottom: 16px; }
#teamInviteForm, #teamInviteResult { display: grid; gap: 12px; margin: 0 0 12px; }
#teamAdminStatus:empty { display: none; }
.team-member-filter { margin-top: 14px; }
.team-admin-card > small { display: block; margin-top: 3px; color: var(--sac-muted); }
.team-admin-list { padding: 0; list-style: none; }
.team-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.team-library-context { display: grid; gap: 10px; margin-bottom: 10px; }
.team-library-context .team-context-badge {
  justify-self: start;
  margin: 0;
  border: 1px solid #ebced1;
  border-radius: 999px;
  background: var(--sac-tint);
  padding: 3px 10px;
  color: var(--sac-deep-red);
  font-weight: 680;
  font-size: 12px;
}
#teamLibrarySwitchHint { color: var(--sac-muted); }

@media (max-width: 800px) {
  .topbar { min-height: 0; flex-wrap: wrap; gap: 8px; }
  .document-info { flex: 1 1 100%; min-width: 0; }
  .document-info > div { flex: 1; margin: 0; max-width: none; text-align: start; }
  .document-info strong { font-size: 13px; }
  .document-info div span { font-size: 11px; }
  .mobile-brand {
    gap: 5px;
    min-height: 30px;
    padding-inline-end: 9px;
    border-inline-end: 1px solid var(--sac-line);
  }
  .mobile-brand > img { width: 30px; height: auto; }
  .mobile-brand > span { font-size: 16px; font-weight: 700; }
  .mobile-brand small { display: none; }
  .file-actions { gap: 7px; }
  .file-actions .button { min-width: 0; min-height: 44px; padding-inline: 7px; }
  .file-actions #exportButton { flex: 1.15; }
  .canvas-controls { padding-block: 6px; min-height: 0; }
  #modeHint, #teamShareStatus { font-size: 11px; }
}

@media (max-width: 640px), (max-width: 800px) and (max-height: 480px) {
  .file-actions :is(.visit-details-button, .shared-library-editor) {
    flex: 0 0 44px;
    min-width: 44px;
    padding-inline: 0;
  }
  .file-actions :is(.visit-details-button, .shared-library-editor) > span { display: none; }
}

@media (max-width: 540px) {
  .editor-toolbar { padding-block: 6px; }
  .editor-toolbar .fullscreen-button > span { display: none; }
  .editor-toolbar .canvas-tool { padding-inline: 7px; }
  .editor-toolbar .canvas-tool svg { width: 15px; }
  .page-control { gap: 1px; }
  .live-bar { gap: 5px; }
  .live-bar .button { padding-inline: 6px; font-size: 11px; }
  .live-state { max-width: min(29vw, 105px); font-size: 11px; }
  .live-person { font-size: 11px; }
  .canvas-control-actions { gap: 5px; }
  body:not(.document-fullscreen) .canvas-controls:has(#teamShareButton:not([hidden]), #startVisitButton:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  body:not(.document-fullscreen) .canvas-controls:has(#teamShareButton:not([hidden]), #startVisitButton:not([hidden])) > .canvas-control-meta {
    min-width: 0;
  }
  .canvas-tool { padding-inline: 8px; }
  #sharedLibraryDialog, #localLibraryDialog, #teamAdminDialog {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-height: calc(100dvh - max(24px, env(safe-area-inset-top)));
    margin: 0 auto;
    padding: 19px max(16px, env(safe-area-inset-right)) max(19px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
  }
  dialog .dialog-actions { gap: 7px; }
}

@media (max-width: 360px) {
  .editor-toolbar { gap: 5px; }
  .editor-toolbar .canvas-tool > span { font-size: 11px; }
  .page-control .icon-button { width: 40px; }
  .file-actions .button { font-size: 11px; gap: 4px; padding-inline: 4px; }
  .file-actions #exportButton { flex: 1; }
}

@media (max-height: 480px) and (min-width: 550px) {
  .topbar { min-height: 54px; padding-block: 4px; }
  .document-info { flex-basis: auto; }
  .file-actions { width: auto; }
  .editor-toolbar, .canvas-controls { padding-block: 3px; }
}

.visit-details-button { white-space: nowrap; }
#visitDetailsDialog p { margin: 0 0 14px; }
.visit-details-fields { display: grid; gap: 6px; }
.visit-details-fields input { margin-bottom: 5px; }
.shared-search { display: grid; gap: 6px; margin: 12px 0; }
.shared-search input {
  border: 1px solid var(--sac-line, #d7d0d5);
  border-radius: 10px;
  color: inherit;
  background: white;
  padding: 8px 11px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  font: inherit;
  font-size: 16px;
}
.shared-visit-details { display: block; margin-top: 4px; color: var(--sac-text); font-size: 13px; }
@media(max-width: 640px) {
  .visit-details-button { width: 44px; min-width: 44px; padding-inline: 0; }
  .visit-details-button span { display: none; }
}

.edit-actions .point-list-button { min-width: 0; white-space: nowrap; color: var(--sac-text, #261c23); }
.point-list-button > span { display: grid; line-height: 1.15; text-align: start; }
#markCount { font-size: 10px; color: var(--sac-muted, #675965); font-weight: 500; }
.point-kind-row, .point-note-field { display: grid; gap: 5px; }
.point-kind-row label, .point-note-field label { font-size: 13px; font-weight: 650; }
.point-kind-row select, .point-note-field :is(select, textarea) {
  width: 100%; min-width: 0; padding: 8px 10px; font: inherit; font-size: 16px;
  border: 1px solid var(--sac-line, #d9d9d9); border-radius: 8px; color: var(--sac-text, #261c23);
  background: white;
}
.point-kind-row select, .point-note-field select { min-height: 42px; }
.point-note-field { margin-top: 14px; }
.point-note-field textarea { min-height: 100px; resize: vertical; }
#pointNoteForm [hidden] { display: none !important; }
#pointNoteAppearance { width: 100%; margin-top: 8px; }
.point-dialog { max-width: 560px; max-height: calc(100dvh - 32px); overflow: auto; }
.point-dialog h2 { margin: 0 0 8px; }
.point-list-items { display: grid; gap: 8px; padding: 0; margin: 12px 0 0; list-style: none; }
.point-list-item {
  display: flex; align-items: flex-start; gap: 4px; min-width: 0; padding: 6px;
  border: 1px solid var(--sac-line, #d9d9d9); border-radius: 10px;
}
.point-list-jump {
  display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; min-height: 44px;
  padding: 8px 6px; text-align: start; border: 0; border-radius: 8px; color: inherit; background: transparent;
}
.point-list-jump:hover { background: var(--sac-light, #f5f3f4); }
.point-list-badge {
  isolation: isolate; position: relative; display: grid; flex: none; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--point-badge-fill); color: var(--point-badge-text);
  font-size: 11px; font-weight: 750;
}
.point-list-copy { display: grid; gap: 3px; min-width: 0; }
.point-list-caption { color: var(--sac-muted, #675965); font-size: 12px; }
.point-list-note { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.point-list-edit { min-height: 44px; padding-inline: 8px; }
.marker.is-fault { isolation: isolate; border-color: transparent; box-shadow: none; }
.point-list-badge.is-fault { background: transparent; color: #422b04; }
.marker.is-fault::before, .point-list-badge.is-fault::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border: 1px solid #8a5607; border-radius: 18%; background: #fbbf24; transform: rotate(45deg);
}
.point-list-badge.is-fault::before { inset: 3px; }
.marker.is-fault:is(.is-selected, .is-point-highlighted, .is-dragging) { z-index: 3; box-shadow: none; }
.marker.is-fault:is(.is-selected, .is-point-highlighted, .is-dragging)::before {
  box-shadow: 0 0 0 2px white, 0 0 0 4px #1a1a1a;
}
.marker:not(.is-fault).is-point-highlighted { z-index: 3; box-shadow: 0 0 0 2px white, 0 0 0 4px #1a1a1a; }
@media (max-width: 540px) {
  .point-dialog {
    position: fixed; inset: auto 0 0; width: 100%; max-width: none;
    max-height: calc(100dvh - max(24px, env(safe-area-inset-top))); margin: 0 auto;
    padding: 19px max(16px, env(safe-area-inset-right)) max(19px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left)); border-bottom: 0; border-radius: 22px 22px 0 0;
  }
}

.point-photos { display: grid; gap: 8px; margin-top: 15px; }
.point-photos-heading { display: flex; align-items: baseline; justify-content: space-between; }
.point-photos-heading h3 { margin: 0; font-size: 13px; font-weight: 650; }
#pointPhotoCount, #pointPhotoStatus { color: var(--sac-muted, #675965); font-size: 12px; }
#pointPhotoStatus { margin: 0; }
#pointPhotoStatus[data-error] { color: var(--sac-red, #b5121b); }
.point-photo-actions, .point-photo-viewer-actions { display: flex; gap: 8px; }
.point-photo-actions .button { flex: 1; min-width: 0; min-height: 44px; }
.point-photo-actions svg, .marker-photo-badge svg { fill: none; stroke: currentColor; stroke-width: 2; }
.point-photo-actions svg { width: 17px; height: 17px; flex: none; }
.point-photo-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.point-photo-items:empty { display: none; }
.point-photo-thumb {
  position: relative; display: grid; place-items: center; min-width: 0; width: 100%; max-width: 92px;
  aspect-ratio: 1; padding: 0; overflow: hidden; border: 1px solid var(--sac-line, #d9d9d9);
  border-radius: 9px; background: var(--sac-light, #f5f3f4); color: var(--sac-muted, #675965);
}
.point-photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.point-photo-thumb span { padding: 4px; font-size: 11px; }
.point-photo-viewer {
  width: calc(100% - 24px); max-width: 720px; max-height: calc(100dvh - 24px); overflow: auto;
  padding: 12px; border-radius: 16px;
}
.point-photo-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.point-photo-viewer-header h2 { margin: 0; font-size: 16px; }
.point-photo-viewer .button { min-width: 44px; min-height: 44px; }
.point-photo-viewer-frame {
  display: grid; place-items: center; min-height: min(180px, 35dvh); margin: 8px 0;
  border-radius: 8px; background: #161517; color: white; overflow: hidden;
}
.point-photo-viewer-frame img { display: block; max-width: 100%; max-height: 65dvh; object-fit: contain; }
.point-photo-viewer-frame p { margin: 0; padding: 16px; color: white; }
.point-photo-viewer-actions { justify-content: space-between; }
.point-photo-viewer-actions button:first-child { margin-right: auto; }
.point-photo-viewer-actions button:last-child { margin-left: auto; }
#removePointPhoto { color: var(--sac-red, #b5121b); }
.point-photos [hidden], .point-photo-viewer [hidden] { display: none !important; }
.marker-photo-badge {
  position: absolute; top: -5px; left: 75%; display: flex; align-items: center; gap: 2px;
  padding: 2px 3px; border: 1px solid white; border-radius: 6px; background: #241f25; color: white;
  font: 700 8px/1 system-ui, sans-serif; white-space: nowrap; pointer-events: none;
}
.marker-photo-badge svg { width: 9px; height: 9px; }
#markers .marker-photo-readonly {
  padding: 0; appearance: none; pointer-events: auto; cursor: pointer; user-select: none;
}
#markers .marker-photo-readonly:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 3px; }
@media (max-width: 540px) {
  .point-photo-viewer { width: calc(100% - 16px); }
}

.point-clear-bar {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 8px var(--sac-gutter, 14px);
  border-top: 1px solid #eed7a8;
  background: #fff7e6;
  color: #523d19;
}
.point-clear-bar p { flex: 1 1 180px; margin: 0; font-size: 13px; }
.point-clear-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.point-clear-actions .button { min-height: 44px; }
@media (max-width: 540px) {
  .point-clear-actions { width: 100%; }
  .point-clear-actions .button { flex: 1 1 125px; }
}
