/* Shared private notes tool. The editor's model/camera controls keep ownership. */
.project-notes-tool { display:flex; }
.project-notes-toggle { flex-shrink:0; }
.project-notes-toggle[aria-expanded="true"] { color:var(--accent,#ff9a5b); border-color:var(--accent,#ff9a5b); }
.project-notes-scrim { position:fixed; inset:0; z-index:160; background:#05080d88; }
.project-notes-panel {
  position:fixed; z-index:161; top:max(16px,env(safe-area-inset-top)); right:76px; bottom:max(16px,env(safe-area-inset-bottom));
  display:flex; flex-direction:column; width:min(410px,calc(100vw - 100px)); min-width:0; box-sizing:border-box; padding:0; margin:0;
  border:1px solid var(--line-bright,#49505c); border-radius:12px; overflow:hidden;
  color:var(--text,#f0f2f5); background:var(--panel,#20242b); box-shadow:0 12px 60px #0009;
  font:14px/1.5 var(--font-body,sans-serif); color-scheme:dark;
}
.project-notes-panel [hidden], .project-notes-panel[hidden], .project-notes-scrim[hidden] { display:none !important; }
.project-notes-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-bottom:1px solid var(--line,#3c424d); flex-shrink:0; }
.project-notes-header h2 { margin:0; font:600 19px/1.3 var(--font-body,sans-serif); text-transform:none; letter-spacing:normal; }
.project-notes-body { min-height:0; overflow:auto; overscroll-behavior:contain; padding:16px; scrollbar-width:thin; scroll-padding:16px; }
.project-notes-body > * { margin-top:0; margin-bottom:12px; }
.project-notes-body > :last-child { margin-bottom:0; }
.project-notes-panel p { overflow-wrap:anywhere; }
.project-notes-muted { color:var(--text-dim,#c1c7d0); font-size:12px; line-height:1.5; }
.project-notes-notice, .project-notes-error { padding:12px; border:1px solid #866343; border-radius:6px; background:#372d24; color:#ffdab2; }
.project-notes-error p { margin:0 0 8px; }
.project-notes-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.project-notes-toolbar p { margin:0; }
.project-notes-button {
  box-sizing:border-box; min-width:44px; min-height:44px; padding:8px 12px; border:1px solid var(--line-bright,#49505c); border-radius:6px;
  font:inherit; line-height:1.3; color:var(--text,#f0f2f5); background:var(--panel-2,#2b3038); cursor:pointer; overflow-wrap:anywhere;
}
.project-notes-button:enabled:hover { border-color:var(--accent,#ff9a5b); }
.project-notes-button:enabled:active { background:#493328; }
.project-notes-button:disabled { opacity:.5; cursor:default; }
.project-notes-toggle { padding:0; border-radius:50%; background:rgba(18,21,26,.85); }
.project-notes-toggle svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.project-notes-close { padding:4px; font-size:26px; background:transparent; border-color:transparent; }
.project-notes-panel :is(button,textarea,input,a):focus-visible, .project-notes-toggle:focus-visible { outline:2px solid var(--accent,#ff9a5b); outline-offset:2px; }
.project-notes-list { display:grid; gap:12px; }
.project-notes-day { min-width:0; border-bottom:1px solid var(--line,#3c424d); padding-bottom:10px; }
.project-notes-day-heading { cursor:pointer; min-height:44px; padding:6px 0; display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; }
.project-notes-day-heading::before, .project-notes-meta::before { content:'›'; font-size:20px; line-height:1; width:12px; flex-shrink:0; }
.project-notes-day[open] > summary::before, .project-notes-card[open] > summary::before { transform:rotate(90deg); }
.project-notes-day-heading::-webkit-details-marker, .project-notes-meta::-webkit-details-marker { display:none; }
.project-notes-day-body { display:grid; gap:8px; padding-top:8px; }
.project-notes-card { min-width:0; padding:12px; border:1px solid var(--line,#3c424d); border-radius:8px; background:var(--panel-2,#2b3038); }
.project-notes-meta { display:grid; grid-template-columns:12px minmax(0,1fr); gap:4px 8px; overflow-wrap:anywhere; min-height:44px; cursor:pointer; list-style:none; }
.project-notes-meta::before { grid-row:1 / 4; align-self:center; }
.project-notes-meta > * { grid-column:2; }
.project-notes-note-kind { color:var(--accent,#ff9a5b); font-size:12px; }
.project-notes-content { padding-top:4px; }
.project-notes-panel summary:focus-visible { outline:2px solid var(--accent,#ff9a5b); outline-offset:3px; }
.project-notes-meta strong { font-weight:600; }
.project-notes-text { white-space:pre-wrap; margin:10px 0 0; }
.project-notes-image { display:block; max-width:100%; max-height:520px; width:auto; height:auto; object-fit:contain; margin:12px auto 0; border-radius:4px; background:#fff; }
.project-notes-compose { display:grid; gap:10px; padding-top:16px; border-top:1px solid var(--line,#3c424d); }
.project-notes-compose > label { font-weight:600; }
.project-notes-compose textarea { width:100%; min-height:100px; box-sizing:border-box; padding:10px; resize:vertical; border:1px solid var(--line-bright,#49505c); border-radius:6px; color:var(--text,#f0f2f5); background:var(--panel-2,#2b3038); font:inherit; font-size:16px; }
.project-notes-compose > p { margin:0; }
.project-notes-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.project-notes-actions > span { margin-left:auto; }
.project-notes-preview { display:grid; gap:8px; padding:10px; border:1px solid var(--line-bright,#49505c); border-radius:6px; }
.project-notes-preview img { max-width:100%; max-height:220px; object-fit:contain; justify-self:center; background:#fff; }
.project-notes-preview p { margin:0; }
.project-notes-drawing { display:grid; gap:10px; min-width:0; padding:0; margin:0; }
.project-notes-drawing > p { margin:0; }
.project-notes-drawing canvas { display:block; width:100%; height:auto; aspect-ratio:1000/650; border-radius:4px; background:#fff; cursor:crosshair; touch-action:none; user-select:none; }
.project-notes-colors { display:flex; flex-wrap:wrap; gap:8px; }
.project-notes-shapes { display:flex; flex-wrap:wrap; gap:6px; }
.project-notes-shapes button { flex:1 1 auto; font-size:12px; padding:8px; }
.project-notes-shapes button[aria-pressed="true"] { border-color:var(--accent,#ff9a5b); color:var(--accent,#ff9a5b); background:#493328; }
.project-notes-pen { flex:1 1 42%; display:flex; align-items:center; justify-content:center; gap:6px; }
.project-notes-pen::before { content:""; width:14px; height:14px; flex-shrink:0; border-radius:50%; border:1px solid #ffffff80; background:var(--pen-color,#17202b); }
.project-notes-pen[aria-pressed="true"] { border-color:var(--accent,#ff9a5b); text-decoration:underline; text-underline-offset:3px; }
.project-notes-send { background:var(--accent,#ff9a5b); border-color:var(--accent,#ff9a5b); color:var(--accent-ink,#20150c); font-weight:600; }
@media(max-width:600px) {
  .project-notes-panel { inset:0 0 0 auto; width:min(100%,440px); border-radius:0; padding-top:env(safe-area-inset-top); padding-bottom:env(safe-area-inset-bottom); max-height:100dvh; }
  .project-notes-header { padding:8px 12px; }
  .project-notes-body { padding:12px max(12px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
}
@media(prefers-reduced-motion:reduce) { .project-notes-toggle { transition:none; } }
