:root{--bg:#f9f8f4;--surface:#efeee9;--surface-elevated:#fff;--text:#2c2c2a;--text-muted:#5f5e5a;--grid:#66655e;--border:#0000001f;--accent:#3b5fa8;--c1:#3157a3;--c2:#0b6b4f;--c3:#9a4d00;--c4:#8a3a5b}@media (prefers-color-scheme:dark){:root{--bg:#161513;--surface:#1e1d1a;--surface-elevated:#262522;--text:#c2c0b6;--text-muted:#9c9a92;--grid:#5b5a53;--border:#ffffff1f;--accent:#8fb4ff;--c1:#8fb4ff;--c2:#5fd0a8;--c3:#f0b45d;--c4:#e08aae}}*,:before,:after{box-sizing:border-box}*{margin:0;padding:0}html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;height:100%}body{height:100%;overflow:hidden}button,input,select,textarea{color:inherit;font:inherit}button{appearance:none}canvas,img,picture,svg,video{max-width:100%;display:block}body{background:var(--bg);color:var(--text);flex-direction:column;align-items:stretch;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;display:flex}.visually-hidden{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}#root{flex:1;min-height:0;display:flex}#stage{background:var(--surface);touch-action:none;-webkit-user-select:none;user-select:none;flex:1;position:relative;overflow:hidden}#stage canvas{pointer-events:none;width:100%;height:100%;display:block;position:absolute;inset:0}#grid{z-index:0}#arrows{z-index:1}.item{z-index:2}.note-layer{pointer-events:none;position:absolute;inset:0}#stage.mode-pan,#stage.mode-edit,#stage.mode-move{cursor:grab}#stage.mode-edit.near-snap{cursor:text}#stage.mode-arrow,#stage.mode-arrow .item:not(.editing){cursor:crosshair}#stage.dragging{cursor:grabbing!important}#stage.item-drag{cursor:move!important}#stage.mode-pan .item:not(.editing),#stage.mode-pan.arrow-hover{cursor:pointer}#stage.mode-edit .item:not(.editing){cursor:text}#stage.mode-edit .item[data-note-content-kind=image]:not(.editing){cursor:pointer}#stage.mode-move .item:not(.editing){cursor:move}.item{pointer-events:auto;transform-origin:50%;-webkit-user-select:none;user-select:none;white-space:pre-wrap;will-change:transform, opacity;font-size:16px;font-weight:500;position:absolute;top:0;left:0}.item:not(.editing):not(.as-dot):not(.as-pill-h):not(.as-pill-v):after{content:"";opacity:0;pointer-events:none;border:2px solid;border-radius:8px;position:absolute;inset:-5px -7px}.item.c1{color:var(--c1)}.item.c2{color:var(--c2)}.item.c3{color:var(--c3)}.item.c4{color:var(--c4)}.item[data-note-selected=true]:not([data-note-link=external]):not(.as-dot):not(.as-pill-h):not(.as-pill-v){text-decoration:none}.item[data-note-selected=true]:not(.as-dot):not(.as-pill-h):not(.as-pill-v):after{opacity:.9}#stage:not(.dragging):not(.item-drag) .item:not([data-note-link=external]):not(.as-dot):not(.as-pill-h):not(.as-pill-v):hover{text-decoration:none}#stage:not(.dragging):not(.item-drag) .item:not(.as-dot):not(.as-pill-h):not(.as-pill-v):hover:after{opacity:.55}.item[data-note-link=external]:not(.as-dot):not(.as-pill-h):not(.as-pill-v){text-underline-offset:.16em;text-decoration-line:underline;text-decoration-thickness:.08em}.item[data-note-content-kind=coordinate]:not(.as-dot):not(.as-pill-h):not(.as-pill-v){justify-content:center;align-items:center;line-height:1;display:inline-flex}.note-coordinate-icon{pointer-events:none;width:24px;height:24px}.item[data-note-content-kind=image]:not(.as-dot):not(.as-pill-h):not(.as-pill-v){background:var(--surface-elevated);border-radius:8px;line-height:0;box-shadow:0 8px 24px #0000001f}.item[data-note-content-kind=image]:not(.as-dot):not(.as-pill-h):not(.as-pill-v):after{border-radius:10px;inset:-3px}.note-image{object-fit:contain;pointer-events:none;border-radius:8px;max-width:240px;max-height:180px;display:block}.coordinate-note-preview{background:var(--surface-elevated);border:1px solid var(--border);color:var(--text);overflow-wrap:anywhere;pointer-events:none;white-space:pre-wrap;z-index:11;border-top:3px solid;border-radius:8px;max-width:min(280px,100vw - 32px);padding:8px 10px;font-size:14px;font-weight:500;line-height:1.35;position:absolute;box-shadow:0 12px 32px #00000024}.coordinate-note-preview.c1{border-top-color:var(--c1)}.coordinate-note-preview.c2{border-top-color:var(--c2)}.coordinate-note-preview.c3{border-top-color:var(--c3)}.coordinate-note-preview.c4{border-top-color:var(--c4)}.item.as-dot{background:currentColor;border-radius:50%;width:6px;height:6px;font-size:0;line-height:0;outline:none!important;padding:0!important}.item.as-dot .note-image,.item.as-pill-h .note-image,.item.as-pill-v .note-image{display:none}.item[data-note-content-kind=image].as-dot,.item[data-note-content-kind=image].as-pill-h,.item[data-note-content-kind=image].as-pill-v{background:var(--dot-color,currentColor)}.item.as-pill-h,.item.as-pill-v{background:currentColor;border-radius:99px;font-size:0;line-height:0;outline:none!important;padding:0!important}.item.as-pill-h{width:16px;height:3px}.item.as-pill-v{width:3px;height:16px}.item.editing{background:var(--surface-elevated);cursor:text;outline:1.5px solid var(--accent);outline-offset:4px;-webkit-user-select:text;user-select:text;z-index:10;border-radius:8px;padding:8px 16px;width:auto!important;height:auto!important;font-size:16px!important;line-height:normal!important;text-decoration:none!important}.note-editor-overlay{background:var(--surface-elevated);border:1px solid var(--border);z-index:12;border-top:3px solid;border-radius:8px;flex-direction:column;gap:10px;width:320px;max-width:min(340px,100vw - 32px);padding:12px;display:flex;position:absolute;top:0;left:0;box-shadow:0 14px 40px #00000029}.note-editor-overlay.c1{color:var(--c1)}.note-editor-overlay.c2{color:var(--c2)}.note-editor-overlay.c3{color:var(--c3)}.note-editor-overlay.c4{color:var(--c4)}.note-editor-overlay textarea{color:var(--text);font:inherit;resize:vertical;-webkit-user-select:text;user-select:text;background:0 0;border:none;outline:none;width:100%;min-height:96px;font-size:15px;line-height:1.45}.note-editor-tools{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;display:flex}.note-color-swatches,.note-editor-actions{border:0;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:6px;min-width:0;max-width:100%;margin:0;padding:0;display:flex}.note-color-swatches button{border:1px solid var(--border);cursor:pointer;border-radius:50%;width:18px;height:18px;padding:0;transition:box-shadow .12s,transform .12s}.note-color-swatches button[data-color=c1]{background:var(--c1)}.note-color-swatches button[data-color=c2]{background:var(--c2)}.note-color-swatches button[data-color=c3]{background:var(--c3)}.note-color-swatches button[data-color=c4]{background:var(--c4)}.note-color-swatches button.active{outline-offset:2px;outline:2px solid}.note-color-swatches button:hover{transform:scale(1.08);box-shadow:0 1px 4px #0000002e}.note-editor-actions button{border:.5px solid var(--border);color:var(--text);cursor:pointer;font:inherit;background:0 0;border-radius:6px;align-items:center;gap:5px;padding:4px 9px;font-size:13px;line-height:1.4;display:inline-flex}.note-editor-actions button:hover{background:var(--surface)}.note-editor-actions button.danger{color:#a43737}.image-note-toolbar{z-index:12;position:absolute;transform:translate(-35%,-65%)}.image-note-toolbar button.danger{background:var(--surface-elevated);border:.5px solid var(--border);color:#a43737;cursor:pointer;border-radius:999px;align-items:center;padding:9px;display:inline-flex;box-shadow:0 6px 18px #0000002e}.image-note-toolbar button.danger:hover{background:var(--surface)}.arrow-inspector{background:var(--surface-elevated);border:1px solid var(--border);z-index:12;border-top:3px solid;border-radius:8px;flex-direction:column;align-items:stretch;gap:8px;width:196px;padding:10px;display:flex;position:absolute;top:0;left:0;box-shadow:0 14px 40px #00000029}.arrow-inspector.c1{color:var(--c1)}.arrow-inspector.c2{color:var(--c2)}.arrow-inspector.c3{color:var(--c3)}.arrow-inspector.c4{color:var(--c4)}.arrow-inspector-label{border:.5px solid var(--border);color:var(--text);font:inherit;-webkit-user-select:text;user-select:text;background:0 0;border-radius:6px;outline:none;width:100%;padding:5px 8px;font-size:14px}.arrow-inspector-label:focus{border-color:currentColor}.arrow-inspector-tools{justify-content:space-between;align-items:center;gap:10px;display:flex}.arrow-endpoint-controls{border:0;grid-template-columns:repeat(4,1fr);align-items:center;gap:4px;padding:0;display:grid}.arrow-endpoint-controls button{border:.5px solid var(--border);color:var(--text-muted);cursor:pointer;background:0 0;border-radius:6px;justify-content:center;align-items:center;height:28px;display:inline-flex}.arrow-endpoint-controls button:hover,.arrow-endpoint-controls button.active{background:var(--surface);color:var(--text)}.arrow-inspector-tools>button{border:.5px solid var(--border);cursor:pointer;background:0 0;border-radius:6px;align-items:center;padding:5px 7px;display:inline-flex}.arrow-inspector-tools>button:hover{background:var(--surface)}.arrow-inspector-tools>button.danger{color:#a43737}.inspector{background:var(--surface-elevated);border:.5px solid var(--border);z-index:6;border-radius:8px;flex-direction:column;gap:10px;width:260px;max-width:min(280px,100vw - 32px);padding:10px;display:flex;position:absolute;top:16px;right:16px}.inspector-actions{gap:6px;display:flex}.inspector-note{color:var(--text);text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.4;overflow:hidden}.inspector-swatches{align-self:flex-start}.inspector-actions button{border:.5px solid var(--border);color:var(--text);cursor:pointer;font:inherit;background:0 0;border-radius:6px;padding:4px 9px;font-size:13px;line-height:1.4}.inspector-actions button:hover:not(:disabled){background:var(--surface)}.inspector-actions button:disabled{color:var(--text-muted);cursor:default;opacity:.55}.inspector-actions button.danger{color:#a43737}.top-left-controls{z-index:5;align-items:flex-start;gap:10px;display:flex;position:absolute;top:16px;left:16px}.app-menu{position:relative}.app-menu-trigger,.history-controls{background:var(--surface-elevated);border:.5px solid var(--border);border-radius:8px}.app-menu-trigger{color:var(--text-muted);cursor:pointer;justify-content:center;align-items:center;width:38px;height:38px;display:inline-flex}.app-menu-trigger:hover,.app-menu-trigger[aria-expanded=true]{background:var(--surface);color:var(--text)}.app-menu-popover{background:var(--surface-elevated);border:.5px solid var(--border);z-index:6;border-radius:8px;min-width:132px;padding:4px;box-shadow:0 10px 28px #0000001f}.app-menu-item{color:var(--text);cursor:pointer;white-space:nowrap;background:0 0;border:0;border-radius:6px;align-items:center;gap:8px;width:100%;padding:7px 9px;font-size:13px;line-height:1.4;text-decoration:none;display:flex}.app-menu-item:hover{background:var(--surface)}.app-menu-github-mark{flex:none}.history-controls{gap:4px;padding:4px;display:flex}.history-controls button{color:var(--text-muted);cursor:pointer;font:inherit;background:0 0;border:none;border-radius:6px;align-items:center;padding:6px 8px;font-size:13px;line-height:1.4;display:inline-flex}.history-controls button:hover:not(:disabled){color:var(--text)}.history-controls button:disabled{cursor:default;opacity:.45}.mode-buttons{background:var(--surface-elevated);border:.5px solid var(--border);border-radius:8px;gap:4px;padding:4px;display:flex}.tooltip-anchor{display:inline-flex}.tooltip-popover{background:var(--text);color:var(--surface-elevated);pointer-events:none;white-space:normal;z-index:20;border-radius:6px;max-width:min(240px,100vw - 24px);padding:5px 8px;font-size:12px;line-height:1.3}.mode-buttons button{color:var(--text-muted);cursor:pointer;font:inherit;background:0 0;border:none;border-radius:6px;align-items:center;gap:5px;padding:5px 11px;font-size:13px;line-height:1.4;display:inline-flex}.mode-buttons button:hover{color:var(--text)}.mode-buttons button.active{background:var(--surface);color:var(--text);box-shadow:0 1px 2px #0000000a}.mode-buttons button:disabled{cursor:default;opacity:.45}.view-history-controls{border-left:.5px solid var(--border);gap:2px;margin-left:2px;padding-left:6px;display:flex}.view-history-controls button{justify-content:center;padding-inline:7px}.zoom-control{background:var(--surface-elevated);border:.5px solid var(--border);color:var(--text-muted);z-index:5;border-radius:8px;align-items:center;gap:10px;padding:6px 14px;font-size:13px;display:flex;position:absolute;bottom:16px;right:16px}.zoom-control input[type=range]{accent-color:var(--accent);width:120px}.zoom-control #zoom-val{font-variant-numeric:tabular-nums;text-align:right;min-width:32px}.zoom-control button{border:.5px solid var(--border);color:var(--text);cursor:pointer;font:inherit;background:0 0;border-radius:8px;align-items:center;gap:5px;padding:4px 10px;line-height:1.4;display:inline-flex}.zoom-control button:hover{background:var(--surface)}.zoom-control button:active{transform:scale(.98)}.zoom-control button.active{background:var(--accent);border-color:var(--accent);color:var(--surface-elevated)}.coordinate-indicator{background:var(--surface-elevated);border:.5px solid var(--border);color:var(--text);cursor:copy;font:inherit;text-align:left;z-index:5;border-radius:8px;align-items:center;gap:10px;max-width:min(520px,100vw - 32px);padding:8px 12px;font-size:13px;line-height:1.4;display:flex;position:absolute;bottom:16px;left:16px}.coordinate-indicator:hover{background:var(--surface)}.coordinate-indicator-title{color:var(--text-muted);white-space:nowrap;flex:none}.coordinate-indicator code{color:var(--text);text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;font-family:SFMono-Regular,Consolas,Liberation Mono,monospace;overflow:hidden}
