/* Note Brain — записки (стикеры): окно на рабочем столе Windows, список и окно в приложении. */
body.sticky-page { height: 100vh; overflow: hidden; background: transparent; }
body.sticky-page #st { height: 100vh; }

.sticky {
  --st-bg: #fff7d1; --st-bar: #fff1a8; --st-ink: #1d1d1b;
  display: flex; flex-direction: column; height: 100%; background: var(--st-bg); color: var(--st-ink);
  font: 15px/1.45 var(--font);
}
.st-bar { height: 34px; flex: none; display: flex; align-items: center; padding: 0 2px; background: var(--st-bar); -webkit-app-region: drag; user-select: none; }
.st-drag { flex: 1; align-self: stretch; }
.st-btn {
  width: 34px; height: 30px; flex: none; border: 0; border-radius: 4px; background: transparent; color: var(--st-ink, var(--text));
  opacity: .72; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; -webkit-app-region: no-drag; font-size: 15px;
}
.st-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.st-btn:hover { background: rgba(0, 0, 0, .08); opacity: 1; }
.sticky[data-color="charcoal"] .st-btn:hover { background: rgba(255, 255, 255, .12); }
.st-close:hover { background: #c42b1c !important; color: #fff; }
.st-body { flex: 1; min-height: 0; overflow: auto; padding: 10px 16px; outline: 0; overflow-wrap: anywhere; }
.st-body:empty::before { content: attr(data-ph); color: var(--st-ink); opacity: .45; pointer-events: none; }
.st-body p, .st-body div { margin: 0; }
.st-body ul, .st-body ol { margin: 0; padding-left: 22px; }
.st-body img { max-width: 100%; height: auto; border-radius: 3px; }
.st-body a { color: inherit; }
.st-tools {
  flex: none; display: flex; gap: 2px; padding: 2px 8px 6px; border-top: 1px solid rgba(0, 0, 0, .07); opacity: 0; transition: opacity .15s;
}
.st-tools .st-btn { width: 36px; }
.sticky:focus-within .st-tools, .sticky:hover .st-tools { opacity: 1; }
.st-colors { display: flex; padding: 4px; gap: 0; }
.st-color { flex: 1; height: 38px; min-width: 34px; border: 0; cursor: pointer; }
.st-color.on { box-shadow: inset 0 0 0 2px #333; }

/* список записок */
.st-list { display: flex; flex-direction: column; height: 100%; background: var(--panel); color: var(--text); }
.st-list-head { height: 34px; flex: none; display: flex; align-items: center; padding: 0 2px; -webkit-app-region: drag; }
.st-list-title { font-size: 22px; font-weight: 600; padding: 2px 16px 10px; }
.st-search-wrap { padding: 0 12px 10px; flex: none; }
.st-search { width: 100%; height: 34px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel2); padding: 0 10px; outline: 0; color: var(--text); }
.st-search:focus { border-color: var(--accent); }
.st-cards { flex: 1; overflow: auto; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.st-card {
  background: var(--st-bg); color: var(--st-ink); border-top: 4px solid var(--st-bar); border-radius: 4px; padding: 6px 12px 10px;
  cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); flex: none;
}
.st-card:hover, .st-card:focus-visible { box-shadow: 0 2px 8px rgba(0, 0, 0, .2); outline: 0; }
.st-card-date { font-size: 12px; text-align: right; opacity: .6; }
.st-card-text { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.st-ph { opacity: .5; font-style: italic; }
.st-empty { padding: 16px 4px; color: var(--muted); font-size: 14px; }
.pages-list .st-list { background: transparent; height: auto; }
.pages-list .st-cards { overflow: visible; padding: 0 2px 8px; }
.pages-list .st-search-wrap { padding: 0 2px 10px; }

/* записка в окне приложения (телефон, браузер) */
.dialog.sticky-dlg { width: min(420px, 100%); height: min(72vh, 560px); overflow: hidden; padding: 0; }
.dialog.sticky-dlg .d-body { padding: 0; height: 100%; }
.dialog.sticky-dlg .st-tools { opacity: 1; }
.dialog.sticky-dlg .st-bar { -webkit-app-region: no-drag; }
@media (max-width: 759px) {
  .dialog.sticky-dlg { height: min(80vh, 640px); }
  .st-btn { width: 40px; height: 36px; }
}
