/* Compact, consistent controls and overlay panels. */
.graph-controls{justify-content:space-between!important;gap:8px!important}.graph-tools-left,.graph-tools-right{display:flex;align-items:center;gap:5px;min-width:0;flex-wrap:wrap}.graph-tools-right{margin-left:auto}.graph-controls .graph-legend{margin:0;position:relative}.graph-controls .graph-legend>summary{display:grid;place-items:center;width:32px;height:32px;padding:0;list-style:none;border:1px solid var(--line);border-radius:7px;cursor:pointer}.graph-controls .graph-legend[open]>summary,.tree-icon-toggle[aria-pressed=true]{background:var(--active);color:var(--text);border-color:var(--accent)}.graph-controls .tree-icon-toggle{display:grid;place-items:center;width:32px;height:32px;padding:0;min-height:32px}.graph-legend-content{right:0;left:auto;z-index:80}.ref-toolbar .graph-add-root{display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;border:1px solid var(--accent);background:var(--active);color:var(--text);border-radius:6px}.ref-toolbar .graph-add-root svg{display:block;width:18px;height:18px}
.ref-toolbar [aria-pressed=true],.ref-dock-header [aria-pressed=true]{background:var(--active);border-color:var(--accent);color:var(--text)}.ref-pen-controls{display:flex;align-items:center;gap:4px}.ref-pen-controls[hidden]{display:none!important}.ref-pen-controls input[type=color]{width:30px;height:28px;min-height:0;padding:1px;margin:0}.ref-pen-controls input[type=number]{width:48px;height:28px;min-height:0;padding:3px 4px;margin:0;font-size:11px}.ref-pen-ready,.ref-pen-ready .ref-item{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='m4 20-1 5 5-1L23 9l-4-4z' fill='%23fff' stroke='%23222' stroke-width='1.5'/%3E%3Cpath d='m16 8 4 4' stroke='%23222'/%3E%3C/svg%3E") 3 25,crosshair!important}.ref-eraser-ready,.ref-eraser-ready .ref-item{cursor:cell!important}.ref-ink-preview{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:100}.ref-ink-image-toggle{position:absolute;right:3px;top:3px;z-index:12;display:grid;place-items:center;width:23px;height:23px;min-height:0;padding:2px;background:color-mix(in srgb,var(--surface) 92%,transparent);color:var(--text);border:1px solid var(--line);border-radius:4px}.ref-ink-image-toggle svg{width:16px;height:16px}.ref-ink-image-toggle[aria-pressed=false]{opacity:.6}.ref-ink-image-toggle[aria-pressed=true]{border-color:var(--accent)}.ref-theme-colors .ref-item.ref-drawing,.ref-item.ref-drawing{background:transparent!important;box-shadow:none!important;border-radius:0!important}.ref-drawing>.ref-note-text{display:none!important}.ref-drawing-hidden{visibility:hidden}.ref-ink{overflow:visible;pointer-events:none!important}
.ref-option-fold>summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:5px;padding:3px 0}.ref-option-fold>summary:before{content:'›';font-size:14px;line-height:1;transform:rotate(0)}.ref-option-fold[open]>summary:before{transform:rotate(90deg)}.ref-option-fold>summary h3{margin:0!important;font-size:11px}.ref-option-fold>div{display:grid;gap:3px;padding-top:3px}.reference-options-layout .reference-option-section{padding:5px 0!important;margin:0!important}.ref-preset-fields{display:grid;gap:3px}.ref-preset-fields select,.ref-preset-fields input{width:100%;min-height:25px!important;height:25px!important;font-size:11px!important;padding:3px 5px!important;margin:0!important}.ref-preset-actions{gap:3px}.ref-preset-actions button{padding:3px 5px!important;min-height:24px!important}.ref-inline-colors{display:inline-flex;align-items:center;gap:4px}.ref-inline-color{display:inline-flex;margin:0!important;padding:0!important}.ref-inline-color input[type=color]{width:27px;height:25px;min-height:0;margin:0;padding:1px}.ref-inline-colors button{width:25px;height:25px;min-height:0;padding:0}.ref-group-colors{position:absolute;z-index:102;background:var(--surface);border:1px solid var(--line);border-radius:6px;padding:4px;box-shadow:0 2px 8px color-mix(in srgb,var(--ui_000000, #000000) 20%, transparent)}.ref-label-editor .ref-inline-colors{margin-top:4px}.ref-note-toolbar .ref-note-format{flex-wrap:wrap}.ref-dock-panel{position:absolute!important;z-index:104;box-sizing:border-box;margin:0!important;padding:6px!important;max-height:55%;min-height:0!important;height:auto!important;background:var(--surface);border:1px solid var(--line);border-radius:7px;box-shadow:0 3px 12px color-mix(in srgb,var(--ui_000000, #000000) 20%, transparent);overflow:auto;flex:none!important}.ref-dock-panel[hidden]{display:none!important}.ref-dock-header{display:flex;align-items:center;gap:4px;cursor:grab;touch-action:none;border-bottom:1px solid var(--line);padding-bottom:4px;margin-bottom:4px;position:sticky;top:-6px;background:var(--surface);z-index:2}.ref-dock-header strong{font-size:11px;flex:1;min-width:0}.ref-dock-header select{width:80px!important;min-height:23px!important;height:23px;padding:2px!important;font-size:10px!important;margin:0!important}.ref-dock-header button{width:23px;min-height:23px!important;height:23px!important;padding:0!important}.ref-bookmark-dock form{display:flex;gap:3px;margin:5px 0 0}.ref-bookmark-dock form input{width:100%;min-width:0;font-size:11px;padding:4px 5px;min-height:26px;margin:0}.ref-bookmark-dock form button{padding:3px 6px;min-height:26px}.ref-bookmark-list{display:grid;gap:3px}.ref-bookmark-dock small{font-size:11px}.ref-dock-panel.ref-hierarchy>button{display:block;width:100%;font-size:11px;padding:5px;min-height:27px;text-align:left}.ref-navigating .ref-selection-box,.ref-navigating .ref-group-colors,.ref-navigating [data-ref-handle]{visibility:hidden}.ref-world{will-change:transform}.ref-duplicate-notice{position:fixed;right:12px;bottom:12px;width:min(470px,calc(100vw - 24px));z-index:180;padding:12px;box-shadow:0 5px 25px color-mix(in srgb,var(--ui_000000, #000000) 33%, transparent)}.ref-duplicate-list{max-height:35vh;overflow:auto;margin:7px 0}.ref-duplicate-list label{display:grid;grid-template-columns:minmax(0,1fr) 150px;gap:8px;border-top:1px solid var(--line);padding:6px 0;font-size:11px;margin:0}.ref-duplicate-list span{white-space:pre-line;overflow-wrap:anywhere}.ref-duplicate-list select{font-size:11px;height:30px;min-height:0;padding:4px;margin:0}.ref-duplicate-notice .actions{gap:4px;flex-wrap:wrap}.ref-duplicate-notice button{font-size:11px;padding:4px 7px;min-height:27px}.ref-duplicate-notice small{font-size:11px;color:var(--sub)}
@media(max-width:650px){.graph-controls{align-items:flex-start}.graph-tools-left,.graph-tools-right{gap:3px}.graph-tools-right{margin-left:auto}.ref-pen-controls input[type=number]{width:40px}.ref-dock-panel{max-height:45%}.ref-option-fold>div{gap:2px}.ref-toolbar>.ref-tool-group{flex-wrap:wrap}.ref-dock-header select{width:66px!important}}
/* 0.57.19: board decorations scale with the board; tool panels remain viewport UI. */
.ref-theme-colors .ref-item.ref-drawing{background-color:transparent!important;background-image:none!important}.ref-drawing{pointer-events:none!important}.ref-drawing .ref-ink path{pointer-events:stroke}.ref-drawing [data-ref-handle]{pointer-events:auto}.ref-ink-image-layer{pointer-events:none!important}.ref-ink-image-toggle{min-width:0!important;min-height:0!important;line-height:1;box-sizing:border-box}.ref-ink-image-toggle svg{max-width:none!important;max-height:none!important}.ref-drawing-actions{position:absolute;z-index:120;display:flex}.ref-drawing-actions button{display:grid;place-items:center;width:27px;height:27px;min-height:0;padding:4px;border:1px solid var(--line);background:var(--surface);color:var(--text);border-radius:5px}.ref-drawing-actions button[aria-pressed=true]{background:var(--active);border-color:var(--accent);color:var(--accent)}.ref-toolbar{justify-content:space-between!important}.ref-toolbar>.ref-tool-group:last-of-type{margin-left:auto!important;flex:0 1 auto!important}.ref-dock-header select{display:none!important}.ref-dock-header{min-height:24px}.ref-dock-preview{position:absolute;z-index:110;box-sizing:border-box;pointer-events:none;border:2px dashed var(--accent);border-radius:7px;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--text);padding:8px;font-size:11px}.ref-dock-preview.ready{border-style:solid;background:color-mix(in srgb,var(--accent) 24%,transparent)}.my-task-controls>.completed-task-filter,.my-task-right-tools{margin-left:auto}.my-task-right-tools{display:flex;align-items:center;gap:5px}.completed-task-filter{display:grid!important;place-items:center;width:32px;height:32px;min-height:32px!important;padding:0!important}.completed-task-filter[aria-pressed=true]{background:var(--active);color:var(--text);border-color:var(--accent)}.graph-tools-right [data-view-options]{width:32px;height:32px;min-height:32px;display:grid;place-items:center;padding:5px}.graph-tools-right [data-view-options] svg{width:20px!important;height:20px!important}.rights-scroll{overflow:auto;max-height:70vh}.rights-matrix table{width:100%;border-collapse:separate;border-spacing:0;font-size:12px}.rights-matrix th,.rights-matrix td{padding:8px 10px;border-bottom:1px solid var(--line);text-align:center}.rights-matrix th:first-child{min-width:175px;text-align:left;position:sticky;left:0;background:var(--surface);z-index:1}.rights-matrix thead th{position:sticky;top:0;background:var(--surface);z-index:3;min-width:100px}.rights-matrix thead th:first-child{z-index:4}.rights-matrix thead .avatar{margin:0 auto 4px}.rights-matrix thead th>span:last-child{display:block;font-size:12px}.rights-matrix .rights-group th{background:var(--soft);color:var(--sub);font-size:11px;padding:6px 10px}.rights-matrix input[type=checkbox]{appearance:auto;width:16px;height:16px;min-height:0;padding:0;margin:0;accent-color:var(--accent);cursor:pointer}.rights-matrix td:focus-within{background:var(--active)}.rights-hint{padding:0 12px;font-size:12px;color:var(--sub);line-height:1.5}.team-member [data-member-rights]{display:none!important}@media(max-width:650px){.rights-matrix th,.rights-matrix td{padding:7px}.rights-matrix th:first-child{min-width:145px}.my-task-right-tools{gap:3px}}
/* Board-only focus, scope and scalable drawing controls. */
.ref-stage,.ref-stage:focus,.ref-stage:focus-visible{outline:none!important;border:0!important}.ref-item.ref-drawing{pointer-events:auto!important}.ref-drawing .ref-ink,.ref-drawing .ref-ink path{pointer-events:none!important}.ref-drawing [data-ref-handle]{pointer-events:auto!important}.ref-scope-indicator{position:absolute;left:8px;top:8px;z-index:85;pointer-events:none;padding:4px 7px;border-left:3px solid var(--accent);border-radius:3px;background:color-mix(in srgb,var(--surface) 92%,transparent);color:var(--text);font-size:11px;line-height:1.3}.ref-group-frame.ref-active-scope{box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 20%,transparent)!important}.ref-pin-target{outline:3px solid var(--accent)!important}.ref-drawing-actions button{min-width:0!important;max-width:none!important;touch-action:none}.ref-save-status{position:absolute;left:8px;bottom:6px;z-index:82;pointer-events:none;font-size:10px;line-height:1.2;opacity:.75;color:var(--sub)}.ref-compact-board>.ref-footer{display:none!important}.reference-options-layout .ref-shortcut-help{margin:0!important;padding:3px 0!important;font-size:11px}.reference-options-layout .ref-shortcut-help>summary{font-size:12px;font-weight:600;padding:4px 0}.reference-options-layout .ref-shortcut-help>div{position:static!important;max-height:none!important;width:auto!important;padding:0!important;border:0!important;box-shadow:none!important;background:none!important;font-size:11px;line-height:1.4}.reference-options-layout .ref-shortcut-help p{margin:4px 0}.ref-compact-board{display:flex;flex-direction:column}.ref-compact-board .ref-body{flex:1;min-height:0}

#reference-editor.reference-maximized .ref-stage,#reference-editor:fullscreen .ref-stage{height:100%!important}

/* Controls remain above the ink/content plane, including during a live stroke. */
.ref-stage .ref-ink-preview{z-index:20000}.ref-stage .ref-selection-box{z-index:20010}.ref-stage .ref-drawing-actions,.ref-stage .ref-note-toolbar,.ref-stage .ref-group-colors{z-index:20020}.ref-stage .ref-scope-indicator,.ref-stage .ref-save-status,.ref-stage .ref-load-progress{z-index:20030}.ref-stage .ref-dock-panel{z-index:30000}.ref-stage .ref-dock-preview{z-index:30010}
.project-shortcuts{display:inline-flex;align-items:center;gap:3px;flex-wrap:wrap}.project-shortcuts button{display:grid;place-items:center;width:27px;height:27px;min-height:27px!important;padding:4px!important;background:transparent;border:1px solid var(--line);border-radius:5px;color:var(--sub)}.project-shortcuts button:hover,.project-shortcuts button:focus-visible{background:var(--active);color:var(--text);border-color:var(--accent)}.projectcard>.project-shortcuts{margin-top:7px}.project-overview-row .project-shortcuts{flex-shrink:0}.ref-drawing-actions button{width:32px!important;height:32px!important;padding:5px!important}.ref-drawing-actions button svg{width:20px;height:20px}.ref-bookmark-row{display:flex;align-items:center;gap:3px;padding:4px 0;border-bottom:1px solid var(--line)}.ref-bookmark-row:last-child{border-bottom:0}.ref-bookmark-row>button:first-child{display:flex;align-items:center;gap:6px;min-width:0;padding:2px!important;flex:1}.ref-bookmark-row>button:first-child>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.ref-bookmark-thumb{width:64px;height:40px;flex:0 0 64px;object-fit:contain;background:var(--bg);border-radius:3px}.ref-bookmark-thumb[hidden]{display:none}.ref-bookmark-row>button:not(:first-child){display:grid;place-items:center;width:24px;height:26px;min-height:26px;padding:3px!important;border-radius:4px}.ref-dock-panel .ref-bookmark-list{min-width:0}.reference-options-layout .ref-shortcut-help>summary{font-size:11px;font-weight:inherit;padding:3px 0}.reference-options-layout .ref-shortcut-help>summary h3{margin:0!important;font-size:11px}.reference-options-layout .ref-shortcut-help>summary:before{flex-shrink:0}@media(max-width:650px){.project-overview-row{flex-wrap:wrap}.project-overview-row .project-shortcuts{margin-left:auto}.project-shortcuts button{width:27px;height:27px}}

/* Compact bookmarks: name and actions first, optional assignment beneath. */
.ref-dock-panel .ref-bookmark-row{display:grid;grid-template-columns:minmax(0,1fr) 24px 24px;gap:3px;align-items:center;padding:5px 0;min-width:0}
.ref-dock-panel .ref-bookmark-row>button:first-child{grid-column:1;grid-row:1;width:100%;min-width:0;min-height:24px;overflow:hidden}
.ref-dock-panel .ref-bookmark-row>button:first-child>span{white-space:normal;overflow-wrap:anywhere;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.ref-dock-panel .ref-bookmark-row>button:nth-child(2){grid-column:2;grid-row:1}.ref-dock-panel .ref-bookmark-row>button:nth-child(3){grid-column:3;grid-row:1}
.ref-dock-panel .ref-bookmark-row>select{grid-column:1/3;grid-row:2;min-width:0!important;width:100%!important;max-width:100%!important;height:24px!important;min-height:24px!important;padding:2px 20px 2px 5px!important;font-size:11px!important;line-height:1.2;box-sizing:border-box;text-overflow:ellipsis}
.ref-dock-panel .ref-bookmark-row>button:nth-of-type(4){grid-column:3;grid-row:2}.ref-dock-panel .ref-bookmark-thumb{width:32px;height:22px;flex:0 0 32px}

.task-bookmark-link{position:relative!important;display:inline-grid!important;place-items:center;width:27px!important;min-width:27px!important;height:27px!important;min-height:27px!important;padding:4px!important;flex:0 0 27px;margin:0!important;line-height:1!important}.task-bookmark-link svg{width:16px;height:16px}.task-bookmark-link>span{position:absolute;right:-1px;top:-3px;font-size:10px;line-height:10px;background:transparent;border-radius:2px}.node-quick .task-bookmark-link{width:23px!important;min-width:23px!important;flex-basis:23px;height:23px!important;min-height:23px!important;padding:3px!important}

.node-reference-files{display:inline-flex;align-items:center;gap:3px;min-width:0}.task-tree-jump{position:relative}.task-tree-jump svg{width:15px;height:15px}.task-tree-jump>span{position:absolute;right:0;top:-2px;font-size:9px;line-height:10px;background:transparent}

/* Keep bookmark navigation beside status, out of the file/timer action column. */
.my-task-table .task-table-status{position:relative;box-sizing:border-box;padding-left:27px;display:flex;align-items:center;min-width:0}.my-task-table .task-table-status>.task-bookmark-link{position:absolute!important;left:0;top:50%;transform:translateY(-50%);width:23px!important;min-width:23px!important;height:25px!important;min-height:25px!important;flex-basis:23px}.my-task-table .task-table-status>select{min-width:0;width:100%;box-sizing:border-box}.my-task-table .task-actions{display:flex;align-items:center;flex-wrap:nowrap;gap:3px}
.my-task-table .task-table-head,.my-task-table .task-table-row{grid-template-columns:minmax(120px,2fr) minmax(80px,1.25fr) 116px 110px 66px}
@media(max-width:760px){.my-task-table .task-table-head,.my-task-table .task-table-row{grid-template-columns:minmax(58px,1.4fr) minmax(46px,1fr) 89px 82px 58px;gap:3px}}

.my-task-table .task-table-head,.my-task-table .task-table-row{grid-template-columns:minmax(110px,1.4fr) minmax(110px,1fr) 140px 116px 110px 32px}.my-task-table .task-table-live{display:flex;align-items:center;gap:4px;min-width:0;white-space:nowrap;font-variant-numeric:tabular-nums}.my-task-table .task-table-live .person-clock{display:inline-flex;align-items:center;gap:3px;min-width:0;white-space:nowrap;padding:3px 5px}.my-task-table .task-table-live [data-clock-user]{display:inline-block;min-width:8ch;font-variant-numeric:tabular-nums}.my-task-table{overflow-x:auto}.my-task-table .task-table-head,.my-task-table .task-table-row{min-width:740px}.time-summary .live-time-note{color:var(--sub)}

.my-task-table .task-table-live{flex-wrap:wrap;row-gap:2px}

.graph-node .node-file-link{background:transparent!important;border-color:transparent!important;box-shadow:none!important}.graph-node .node-file-link:hover{background:var(--soft)!important}

.graph-node .node-file-link{display:inline-flex;align-items:center;justify-content:center;gap:1px;min-width:18px;padding:2px!important;position:relative}.graph-node .node-file-link.is-empty{opacity:.5}.graph-node .node-file-link.has-attachments{color:var(--accent)!important;opacity:1!important}.graph-node .node-file-link.has-attachments svg{stroke-width:2.3}.graph-node .node-file-count{display:inline-block;font-size:9px;font-weight:800;line-height:12px;min-width:10px;text-align:center;color:var(--accent);font-variant-numeric:tabular-nums}.graph-node .node-file-link:hover{opacity:1}

/* Keep each bookmark and its task link within one compact visual group. */
.ref-dock-panel .ref-bookmark-list{gap:4px}.ref-dock-panel .ref-bookmark-row{grid-template-columns:minmax(0,1fr) 22px 22px;gap:2px;padding:3px 4px;border:1px solid var(--line);border-radius:5px;background:var(--bg);min-width:0}.ref-dock-panel .ref-bookmark-row:focus-within{border-color:var(--accent)}.ref-dock-panel .ref-bookmark-row>button:first-child{height:22px!important;min-height:22px!important;padding:1px!important;gap:4px;border:0;background:transparent}.ref-dock-panel .ref-bookmark-row>button:first-child>span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:18px;font-size:11px}.ref-dock-panel .ref-bookmark-thumb{width:28px;height:18px;flex-basis:28px}.ref-dock-panel .ref-bookmark-row>button:not(:first-child){width:22px;height:22px!important;min-height:22px!important;padding:2px!important;border:0;background:transparent}.ref-dock-panel .ref-bookmark-row>button:hover{background:var(--soft)}.ref-dock-panel .ref-bookmark-row>select{height:22px!important;min-height:22px!important;padding:1px 18px 1px 4px!important;margin:0!important;font-size:10px!important}

.ref-dock-panel .ref-bookmark-row.ref-bookmark-sortable{position:relative;padding-left:15px}.ref-dock-panel .ref-bookmark-row>.ref-bookmark-grip{position:absolute;grid-column:auto!important;grid-row:auto!important;left:1px;top:4px;width:12px!important;min-width:12px!important;height:18px!important;min-height:18px!important;padding:0!important;margin:0!important;font-size:15px;line-height:18px;color:var(--sub);cursor:grab;touch-action:none;user-select:none;background:transparent!important;border:0!important}.ref-bookmark-grip:active{cursor:grabbing!important}.ref-bookmark-dragging{opacity:.65}.ref-dock-panel .ref-bookmark-drop-before{box-shadow:0 -2px 0 var(--accent)}.ref-dock-panel .ref-bookmark-drop-after{box-shadow:0 2px 0 var(--accent)}
