.on-workspace { border: 1px solid var(--line); border-radius: 8px; display: grid; grid-template-columns: 280px minmax(0,1fr); min-height: 680px; overflow: hidden; }
.on-library { background: #f7f9f9; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.on-library-head { border-bottom: 1px solid var(--line); display: grid; gap: 10px; padding: 14px; }
.on-library-title { align-items: center; display: flex; justify-content: space-between; }
.on-library-title h2 { font-size: 18px; margin: 0; }
.on-library-title span { color: var(--muted); font-size: 12px; font-weight: 800; }
.on-view-toggle { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; }
.on-view-toggle button,.on-library-head > button { background: #fff; border: 1px solid var(--line); border-radius: 6px; color: var(--text); cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; min-height: 38px; padding: 7px 9px; }
.on-view-toggle button.is-selected,.on-view-toggle button:hover,.on-library-head > button:hover { border-color: var(--accent); color: var(--accent-strong); }
.on-search-row { display: grid; gap: 8px; grid-template-columns: minmax(0,1fr) 88px; }
.on-search-row input,.on-search-row select { min-width: 0; }
.on-note-list { display: grid; align-content: start; gap: 7px; overflow-y: auto; padding: 10px; }
.on-note-item { background: transparent; border: 1px solid transparent; border-radius: 7px; color: var(--text); cursor: pointer; display: grid; gap: 4px; min-width: 0; padding: 10px; text-align: left; }
.on-note-item:hover { background: #fff; border-color: var(--line); }
.on-note-item.is-active { background: #fff; border-color: var(--accent); }
.on-note-title { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-note-preview,.on-note-time { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-pin-mark { border: 1px solid var(--accent); border-radius: 4px; color: var(--accent-strong); font-size: 9px; margin-right: 6px; padding: 2px 4px; text-transform: uppercase; }
.on-empty-list { align-items: center; color: var(--muted); display: flex; flex-direction: column; gap: 5px; padding: 30px 10px; text-align: center; }
.on-editor-shell { display: grid; grid-template-rows: auto minmax(360px,1fr) auto auto; min-width: 0; }
.on-editor-toolbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
.on-editor-toolbar button,.on-editor-toolbar select { background: #fff; border: 1px solid var(--line); border-radius: 6px; color: var(--text); cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; min-height: 34px; padding: 6px 8px; }
.on-editor-toolbar button:hover { border-color: var(--accent); color: var(--accent-strong); }
.on-editor-toolbar button[hidden] { display: none; }
.on-editor-toolbar .is-danger { color: #9a302c; }
.on-editor-toolbar-spacer { flex: 1 1 auto; }
.on-editor { display: grid; grid-template-rows: auto minmax(0,1fr); min-height: 0; padding: 22px 24px 16px; }
.on-title-input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--text); font-size: 26px; font-weight: 900; margin-bottom: 12px; padding: 8px 0 12px; width: 100%; }
.on-title-input:focus { border-color: var(--accent); box-shadow: none; outline: none; }
.on-textarea { border: 0; border-radius: 0; font-family: ui-monospace,"SFMono-Regular",Consolas,monospace; font-size: 15px; line-height: 1.7; min-height: 360px; padding: 0; resize: none; width: 100%; }
.on-textarea:focus { box-shadow: none; outline: none; }
.on-textarea:disabled,.on-title-input:disabled { background: #fff; color: var(--muted); }
.on-stats { align-items: center; border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; font-size: 12px; gap: 14px; padding: 9px 14px; }
.on-stats strong { color: var(--text); }
.on-save-state { margin-left: auto; }
.on-history { border-top: 1px solid var(--line); padding: 14px; }
.on-history-head { align-items: center; display: flex; justify-content: space-between; margin-bottom: 10px; }
.on-history-head h3 { font-size: 15px; margin: 0; }
.on-history-head span { color: var(--muted); font-size: 12px; }
.on-history-list { display: grid; gap: 8px; max-height: 230px; overflow-y: auto; }
.on-version { align-items: start; border: 1px solid var(--line); border-radius: 7px; display: grid; gap: 10px; grid-template-columns: minmax(0,1fr) auto; padding: 10px; }
.on-version div { min-width: 0; }.on-version strong,.on-version span,.on-version p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.on-version span,.on-version p { color: var(--muted); font-size: 12px; margin: 3px 0 0; }
.on-version button { background: #fff; border: 1px solid var(--line); border-radius: 5px; color: var(--accent-strong); cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; padding: 5px 7px; }
.on-empty-history { color: var(--muted); font-size: 13px; padding: 10px 0; }
.on-settings-band { align-items: end; display: grid; gap: 14px; grid-template-columns: repeat(3,minmax(0,1fr)) auto; }
.on-settings-band label { min-width: 0; }.on-settings-band .tool-actions { margin: 0; }
.on-feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.on-feature-grid article { border-left: 3px solid var(--accent); min-width: 0; padding: 2px 0 2px 14px; }
.on-feature-grid h3 { margin: 0 0 6px; }.on-feature-grid p { margin: 0; }
@media (max-width:920px) { .on-workspace { grid-template-columns: 240px minmax(0,1fr); }.on-settings-band { grid-template-columns: repeat(2,minmax(0,1fr)); }.on-settings-band .tool-actions { grid-column: 1 / -1; }.on-feature-grid { grid-template-columns: 1fr; } }
@media (max-width:700px) { .on-workspace { grid-template-columns: 1fr; min-height: 0; }.on-library { border-bottom: 1px solid var(--line); border-right: 0; }.on-note-list { max-height: 250px; }.on-editor-shell { grid-template-rows: auto minmax(460px,auto) auto auto; }.on-editor { padding: 16px; }.on-title-input { font-size: 22px; }.on-settings-band { grid-template-columns: 1fr; }.on-editor-toolbar-spacer { display: none; }.on-save-state { margin-left: 0; width: 100%; }.on-stats { gap: 9px; } }

.on-view-toggle button,.on-library-head > button,.on-editor-toolbar button { line-height: 1.25; overflow-wrap: anywhere; white-space: normal; }
.on-editor-toolbar select { max-width: 100%; }
