/* IAM — заметка в подложке и панель форматирования (js/ui/46-tray-note.js, 11.11.2026 sh134). Как окно создания (tray-add.css): светлый лист, Nunito, сетка 56/88. */
#iam-trn { position: absolute; left: 0; right: 0; top: 28px; height: calc(var(--tr-up) + 8px); z-index: 6; background: var(--tr-bg, #e4e4df); color: #1d1d20;
  padding: 26px 58px 0 56px; display: flex; flex-direction: column; opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: opacity .25s ease, transform .45s cubic-bezier(.2,.85,.2,1); font-family: 'Nunito', system-ui, sans-serif; cursor: default; }
#iam-trn.on { opacity: 1; pointer-events: auto; transform: none; transition-delay: .06s; }
#iam-trn::before { content: ""; position: absolute; left: 50%; top: 8px; width: 56px; height: 4px; margin-left: -28px; border-radius: 2px; background: #b5b5ba; }
html.trn-on #iam-tray .tr-strip { opacity: 0; pointer-events: none; transition: opacity .2s; }
html.trn-on #iam-tray .tr-panel { visibility: hidden; }
#iam-trn .trn-top { display: flex; align-items: center; gap: 14px; min-height: 30px; flex: none; }
#iam-trn .trn-ic { width: 20px; display: grid; place-items: center; color: #8d8d92; flex: none; } #iam-trn .trn-ic svg { width: 16px; height: 16px; }
#iam-trn .trn-t { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 0; font: 800 18px/1.3 'Nunito', system-ui; color: #1d1d20; }
#iam-trn .trn-t::placeholder { color: #a3a3a6; }
#iam-trn .trn-body { flex: 1; min-height: 0; overflow-y: auto; margin: 12px 0 0 34px; padding-right: 6px; scrollbar-width: thin; }
#iam-trn .re-wrap { height: 100%; }
#iam-trn .re-editor { min-height: 100% !important; outline: 0; border: 0; background: none; padding: 0 0 40px; font: 500 15px/1.6 'Nunito', system-ui; color: #2a2a2e; cursor: text; }
#iam-trn .re-editor:empty::before { content: attr(data-placeholder); color: #a3a3a6; }
#iam-trn .re-editor :is(h1, h2) { margin: 14px 0 4px; line-height: 1.25; color: #161618; } #iam-trn .re-editor h1 { font: 800 22px/1.25 'Nunito'; } #iam-trn .re-editor h2 { font: 800 17px/1.3 'Nunito'; }
#iam-trn .re-editor :is(ul, ol) { margin: 4px 0; padding-left: 22px; } #iam-trn .re-editor li { margin: 2px 0; }
#iam-trn .re-editor blockquote { margin: 6px 0; padding: 2px 0 2px 14px; border-left: 3px solid #b9f36c; color: #45454a; }
#iam-trn .re-editor code { font: 600 13px ui-monospace, 'SF Mono', Menlo, monospace; background: rgba(0,0,0,.07); padding: 1px 5px; border-radius: 5px; }
#iam-trn .re-editor a { color: #3b6fd9; text-decoration: underline; text-underline-offset: 2px; }
#iam-trn .re-editor img { max-width: 100%; border-radius: 10px; }
#iam-trn .trn-row { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; margin: 8px 0 26px 22.5px; }
#iam-trn .trn-row button { height: 32px; padding: 0 12px; border: 0; border-radius: 10px; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); font: 700 13px 'Nunito'; color: #45454a; cursor: pointer; white-space: nowrap; }
#iam-trn .trn-row button:hover { background: rgba(255,255,255,.95); color: #161618; }
#iam-trn .trn-row button.red { background: none; box-shadow: none; color: #c4383d; } #iam-trn .trn-row button.red:hover { background: rgba(229,72,77,.1); }
#iam-trn .trn-row button.go { height: 40px; padding: 0 18px; border-radius: 12px; background: #1d1d20; color: #f4f4f2; box-shadow: none; font-weight: 800; font-size: 14px; }
#iam-trn .trn-row button.go kbd { font: 700 10.5px 'Nunito'; color: #8d8d92; margin-left: 6px; }
#iam-trn .trn-meta { font: 700 12.5px 'Nunito'; color: #8d8d92; margin-left: 8px; white-space: nowrap; }
#iam-trn .trn-sp { flex: 1; }
#iam-trn .trn-hint { font: 700 11px 'Nunito'; color: #a3a3a6; margin-right: 6px; white-space: nowrap; }
#iam-trn .trn-hint kbd { font: 800 10.5px 'Nunito'; color: #8d8d92; border: 1px solid rgba(0,0,0,.14); border-radius: 6px; padding: 0 5px; }

/* панель над выделенным текстом — во всех редакторах заметок (тёмная, как плашки IAM) */
#trn-fmt { position: fixed; z-index: 3000; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; background: #1d1d20; box-shadow: 0 10px 30px -8px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.07);
  opacity: 0; pointer-events: none; transform: translateY(4px) scale(.98); transition: opacity .14s, transform .18s cubic-bezier(.2,.85,.2,1); }
#trn-fmt.on { opacity: 1; pointer-events: auto; transform: none; }
#trn-fmt button { min-width: 30px; height: 30px; padding: 0 7px; border: 0; border-radius: 8px; background: none; color: #d4d4d8; font: 800 13px 'Nunito', system-ui; cursor: pointer; display: grid; place-items: center; }
#trn-fmt button code { font: 700 11px ui-monospace, Menlo, monospace; }
#trn-fmt button:hover { background: rgba(255,255,255,.09); color: #fff; }
#trn-fmt button.a { background: #b9f36c; color: #161618; }
#trn-fmt i { width: 1px; height: 18px; background: rgba(255,255,255,.12); margin: 0 4px; }
/* то же оформление текста — в заметках в списке и в проекте */
html.iam-tray .re-editor h1 { font: 800 22px/1.25 'Nunito'; margin: 12px 0 4px; } html.iam-tray .re-editor h2 { font: 800 17px/1.3 'Nunito'; margin: 10px 0 4px; }
html.iam-tray .re-editor blockquote { margin: 6px 0; padding: 2px 0 2px 14px; border-left: 3px solid #b9f36c; }
html.iam-tray .re-editor code { font: 600 13px ui-monospace, 'SF Mono', Menlo, monospace; background: rgba(127,127,127,.18); padding: 1px 5px; border-radius: 5px; }
#iam-trn:not(.on) { height: calc(var(--tr-up) + 8px) !important; }

/* sh135: блоки в заметке — секции, пункты, меню «/» (js/ui/47-note-blocks.js, макет design/iam-notes-more/live.html) */
#iam-trn .trn-body { margin-left: 8px !important; padding-left: 26px; }   /* стрелка секции висит левее текста — место под неё внутри прокрутки */
#iam-trn .trn-row button { display: inline-flex; align-items: center; gap: 7px; }
#iam-trn .trn-row button svg { width: 17px; height: 17px; flex: none; color: #6d6d72; } #iam-trn .trn-row button:hover svg { color: #161618; }
#iam-trn .nb-todo { display: flex; gap: 9px; align-items: flex-start; margin: 1px 0; }
#iam-trn .nb-cb { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #a3a3a6; flex: none; margin-top: 5px; cursor: pointer; transition: background .15s, border-color .15s; }
#iam-trn .nb-cb:hover { border-color: #6d6d72; }
#iam-trn .nb-todo.d .nb-cb { background: #b9f36c; border-color: #b9f36c; } #iam-trn .nb-todo.d .nb-tx { color: #a3a3a6; text-decoration: line-through; }
#iam-trn .nb-tx { flex: 1; min-width: 0; }
#iam-trn .nb-sec { margin: 2px 0; }
#iam-trn .nb-sh { display: flex; align-items: center; gap: 6px; font: 800 15px/1.6 'Nunito', system-ui; color: #161618; margin-left: -26px; }
#iam-trn .nb-ar { width: 20px; height: 20px; flex: none; display: grid; place-items: center; cursor: pointer; border-radius: 6px; transition: transform .2s cubic-bezier(.2,.85,.2,1), background .15s; }
#iam-trn .nb-ar::before { content: ""; border-style: solid; border-width: 4.5px 0 4.5px 7px; border-color: transparent transparent transparent #8d8d92; margin-left: 2px; }
#iam-trn .nb-ar:hover { background: rgba(0,0,0,.07); } #iam-trn .nb-ar:hover::before { border-left-color: #1d1d20; }
#iam-trn .nb-sec.open > .nb-sh .nb-ar { transform: rotate(90deg); }
#iam-trn .nb-st { flex: 0 1 auto; min-width: 20px; outline: 0; } #iam-trn .nb-st:empty::before { content: 'Название секции'; color: #a3a3a6; font-weight: 700; }
#iam-trn .nb-cnt { font: 700 12px 'Nunito', system-ui; color: #a3a3a6; margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; user-select: none; }
#iam-trn .nb-sec.open > .nb-sh .nb-cnt { display: none; }
#iam-trn .nb-sb { margin-left: -17px; padding-left: 17px; border-left: 2px solid rgba(0,0,0,.07); margin-bottom: 4px; min-height: 24px; }
#iam-trn .nb-sec:not(.open) > .nb-sb { display: none; }
/* те же блоки — в тексте новой заметки (окно создания, sh136) */
#iam-tra .nb-todo { display: flex; gap: 9px; align-items: flex-start; margin: 1px 0; }
#iam-tra .nb-cb { width: 15px; height: 15px; border-radius: 50%; border: 2px solid #a3a3a6; flex: none; margin-top: 5px; cursor: pointer; transition: background .15s, border-color .15s; }
#iam-tra .nb-cb:hover { border-color: #6d6d72; }
#iam-tra .nb-todo.d .nb-cb { background: #b9f36c; border-color: #b9f36c; } #iam-tra .nb-todo.d .nb-tx { color: #a3a3a6; text-decoration: line-through; }
#iam-tra .nb-tx { flex: 1; min-width: 0; }
#iam-tra .nb-sec { margin: 2px 0; }
#iam-tra .nb-sh { display: flex; align-items: center; gap: 6px; font: 800 15px/1.6 'Nunito', system-ui; color: #161618; margin-left: -26px; }
#iam-tra .nb-ar { width: 20px; height: 20px; flex: none; display: grid; place-items: center; cursor: pointer; border-radius: 6px; transition: transform .2s cubic-bezier(.2,.85,.2,1), background .15s; }
#iam-tra .nb-ar::before { content: ""; border-style: solid; border-width: 4.5px 0 4.5px 7px; border-color: transparent transparent transparent #8d8d92; margin-left: 2px; }
#iam-tra .nb-ar:hover { background: rgba(0,0,0,.07); } #iam-tra .nb-ar:hover::before { border-left-color: #1d1d20; }
#iam-tra .nb-sec.open > .nb-sh .nb-ar { transform: rotate(90deg); }
#iam-tra .nb-st { flex: 0 1 auto; min-width: 20px; outline: 0; } #iam-tra .nb-st:empty::before { content: 'Название секции'; color: #a3a3a6; font-weight: 700; }
#iam-tra .nb-cnt { font: 700 12px 'Nunito', system-ui; color: #a3a3a6; margin-left: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; user-select: none; }
#iam-tra .nb-sec.open > .nb-sh .nb-cnt { display: none; }
#iam-tra .nb-sb { margin-left: -17px; padding-left: 17px; border-left: 2px solid rgba(0,0,0,.07); margin-bottom: 4px; min-height: 24px; }
#iam-tra .nb-sec:not(.open) > .nb-sb { display: none; }
#iam-trn .re-editor hr { border: 0; border-top: 1.5px solid rgba(0,0,0,.12); margin: 12px 0; }
#nb-sl { position: fixed; z-index: 3000; width: 300px; max-height: 380px; overflow-y: auto; background: #1d1d20; color: #e4e4e8; border-radius: 14px; padding: 6px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.07); font: 700 13.5px 'Nunito', system-ui; display: none; }
#nb-sl.on { display: block; } #nb-sl .q { padding: 6px 10px; color: #8d8d92; font-size: 12px; }
#nb-sl .it { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; cursor: pointer; } #nb-sl .it.on { background: rgba(185,243,108,.16); }
#nb-sl .it em { font-style: normal; width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.08); display: grid; place-items: center; font-size: 12px; flex: none; } #nb-sl .it em svg { width: 15px; height: 15px; }
#nb-sl .it small { margin-left: auto; color: #8d8d92; font-size: 11.5px; } #nb-sl .none { padding: 8px 10px; color: #8d8d92; }
/* секции в простом просмотре заметки (плитки, проект): h3/h4 — как заголовок секции */
html.iam-tray :is(.note-content-html, .ntb-x) :is(h3, h4) { font: 800 15px/1.5 'Nunito'; margin: 6px 0 2px; }
#iam-trn .re-editor { overflow: visible !important; }   /* стрелки секций висят левее текста — не обрезать */
/* sh145: один шрифт во всей заметке, что бы ни вставили (из Claude, браузера…): всё наследует шрифт и размер текста заметки;
   свои размеры только у H1 / H2 и заголовка секции; чужие h3–h6 — как H2 */
:is(#iam-trn .re-editor, #iam-tra .tra-rte) :is(div, p, span, li, ul, ol, blockquote, pre, font, a, u, i, em, s, del, code) { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; letter-spacing: inherit !important; }
:is(#iam-trn .re-editor, #iam-tra .tra-rte) :is(div, p, span, li, blockquote, font) { font-weight: inherit; }
:is(#iam-trn .re-editor, #iam-tra .tra-rte) :is(b, strong) { font-family: inherit !important; font-size: inherit !important; font-weight: 800 !important; }
:is(#iam-trn .re-editor, #iam-tra .tra-rte) :is(h3, h4, h5, h6) { font: 800 17px/1.3 'Nunito', system-ui !important; color: #161618; margin: 8px 0 3px; }
:is(#iam-trn .re-editor, #iam-tra .tra-rte) p { margin: 0; }
:is(#iam-trn .re-editor, #iam-tra .tra-rte) blockquote { color: #45454a; }
:is(#iam-trn .re-editor, #iam-tra .tra-rte) code { font-family: ui-monospace, 'SF Mono', Menlo, monospace !important; font-size: 13px !important; }
:is(#iam-trn .re-editor, #iam-tra .tra-rte) .nb-st { font: 800 15px/1.6 'Nunito', system-ui !important; }
