#notes-view { max-width:none; }
.notes-workspace { min-width:0; }
.notes-history,.notes-editor { background:var(--surface); border:1px solid var(--line); border-radius:10px; min-width:0; }
.notes-history { padding:24px; }
.note-filters { display:flex; align-items:end; flex-wrap:wrap; gap:16px; margin-bottom:20px; }
.note-filters label { display:grid; gap:8px; min-width:140px; color:var(--muted); font-size:13px; }
.note-filters select { width:100%; }
#noteListCount { margin-left:auto; padding-bottom:10px; color:var(--muted); font-size:13px; }
#noteListMessage:empty { display:none; }
.notes-table { width:100%; min-width:0; table-layout:fixed; }
.notes-table th:first-child { width:155px; }.notes-table th:last-child { width:125px; }
.notes-table time { font-variant-numeric:tabular-nums; white-space:nowrap; }
.note-excerpt { display:block; overflow-wrap:anywhere; white-space:normal; line-height:1.7; }
.notes-table .notes-empty { color:var(--muted); padding:48px 16px; text-align:center; font-size:13px; line-height:1.8; }
#backToNotes { margin-bottom:24px; }
.notes-editor { padding:24px; }
.notes-meta { display:flex; align-items:end; flex-wrap:wrap; gap:16px; margin-bottom:24px; }
.notes-meta label { display:grid; gap:8px; color:var(--muted); font-size:13px; }
#noteDate { width:190px; color:var(--ink); background:var(--surface); }
#noteDraftStatus { color:var(--muted); font-size:12px; padding-bottom:12px; }
.note-body-label { display:block; margin-bottom:10px; font-size:13px; color:var(--muted); }
.note-composer { border:1px solid var(--line-strong); border-radius:6px; overflow:hidden; }
.note-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:5px; padding:10px 12px; border-bottom:1px solid var(--line); background:var(--surface); }
#notes-view .note-toolbar .icon-button { background:transparent; border-color:transparent; box-shadow:none; width:36px; height:36px; color:var(--ink); }
#notes-view .note-toolbar .icon-button:hover { background:var(--soft); border-color:var(--line); }
#notePreviewToggle { margin-left:auto; }
#noteBody,.note-preview { display:block; width:100%; min-height:390px; padding:18px; background:var(--surface); color:var(--ink); font:inherit; line-height:1.8; overflow-wrap:anywhere; }
#noteBody { height:390px; resize:vertical; border:0; border-radius:0; box-shadow:none; caret-color:var(--brand); }
#noteBody:focus-visible { outline:2px solid var(--brand); outline-offset:-2px; }
#noteBody::placeholder { color:var(--muted); opacity:1; }
#noteBody::selection,.note-preview ::selection { background:var(--amber-soft); color:var(--ink); }
.note-preview { max-height:650px; overflow:auto; }
.note-preview > :first-child { margin-top:0; }
.note-preview h1 { font-size:26px; }.note-preview h2 { font-size:22px; }.note-preview h3 { font-size:18px; }
.note-preview p { max-width:75ch; margin:12px 0; }
.note-preview blockquote { border-left:1px solid var(--line-strong); margin:16px 0; padding:2px 16px; color:var(--muted); }
.note-preview pre { background:var(--soft); overflow:auto; padding:14px; border-radius:4px; }
.note-preview code { font-family:Consolas,monospace; }
.note-preview a { color:var(--brand); text-decoration:underline; text-underline-offset:3px; }
.note-preview table { min-width:0; }
.note-preview th,.note-preview td { padding:8px 12px; }
.note-editor-foot { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; padding:10px 18px; color:var(--muted); font-size:12px; background:var(--surface); }
#noteLength { font-variant-numeric:tabular-nums; }
.note-actions { display:flex; align-items:center; gap:10px; margin-top:20px; }
#noteMessage { flex:1; margin:0; color:var(--ink); overflow-wrap:anywhere; font-size:13px; }
#notes-view .note-delete { background:#dc2626; border-color:#dc2626; color:white; }
#notes-view .note-delete:hover { background:#b91c1c; border-color:#b91c1c; }
#notes-view :focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
#notes-view textarea,#noteList,.note-preview { scrollbar-width:thin; scrollbar-color:var(--line-strong) var(--surface); }
.review-link-control { display:flex; align-items:center; gap:6px; min-width:265px; }
.review-link-control input { flex:1; min-width:160px; }
.review-link-control button { flex-shrink:0; }
@media(max-width:1100px) { .notes-editor { padding:20px; } }
@media(max-width:650px) {
  #reviews-panel .review-toolbar { flex-basis:auto; }
  .notes-history { padding:14px; }
  .note-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .note-filters label { min-width:0; }
  #noteListCount { grid-column:1/-1; margin-left:0; padding-bottom:0; }
  .notes-table th:first-child { width:105px; }.notes-table th:last-child { width:88px; }
  .notes-table th,.notes-table td { padding:12px 6px; }
  .notes-table .action-group { gap:4px; }
  .notes-editor { padding:16px; }
  .note-toolbar { padding:8px; gap:3px; }
  #notePreviewToggle { margin-left:0; }
  #noteBody { font-size:16px; min-height:330px; height:330px; padding:14px; }
  .note-actions { flex-wrap:wrap; justify-content:flex-end; }
  #noteMessage:not(:empty) { flex-basis:100%; }
}
