Files
notas-online/web/css/app.css
T
lgcosta ea6b3b915d feat(ui): botões 'rich' em CSS puro + toolbar mobile em 3 linhas organizadas
Sistema de botões (mesma linguagem do Rich Button do spell.sh — que é
React/Tailwind e não se aplica a um app vanilla com CSP script-src 'self'):
- gradiente vertical com gloss de vidro (::after), borda e sombra derivadas
  dos tokens, lift no hover, press no active, focus ring, glow no primário
- variantes primary/danger/icon/small, selects e segmented control ricos
- 100% via color-mix() + light-dark() sobre os tokens: adapta-se sozinho aos
  21 temas (color-scheme declarado em todos, incl. nativos agora)
- cores antes fixas (#cfe2fa/#e9e6e2/#dcd7d2/#dbe9fb/#e5effb) tokenizadas

Toolbar responsiva (≤760px):
- fim do scroll horizontal: quebra em 3 linhas — arquivo+formato+versões /
  alternador de modo full-width / ferramentas de formatação full-width com
  flex-wrap de segurança; alvos ≥40px
- verificado em 393px (última borda 385) e 320px (311), uma linha de ícones

sw.js: CACHE notas-shell-v8; README atualizado
2026-11-05 09:28:20 -03:00

1803 lines
53 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* Notas — tema claro sóbrio inspirado no Mousepad (XFCE/Greybird). */
:root {
color-scheme: light;
--bg: #f6f5f4;
--panel: #ffffff;
--panel-2: #f0eeeb;
--border: #cdc7c2;
--border-soft: #dedad6;
--fg: #2e3436;
--muted: #787d80;
--accent: #3584e4;
--accent-dark: #1c71d8;
--danger: #c01c28;
--success: #26a269;
--warn: #e5a50a;
--diff-add: #d8f0dd;
--diff-del: #f8d7da;
--diff-hunk: #dce8fa;
--mono: "DejaVu Sans Mono", "Ubuntu Mono", "Cascadia Code", Consolas, monospace;
--sans: "Cantarell", "Noto Sans", "DejaVu Sans", "Segoe UI", sans-serif;
/* editor overlay */
--editor-font: var(--mono);
--editor-size: 14px;
--line-h: 22px;
--pad-x: 16px;
--pad-y: 14px;
/* cores de tokens (tema claro Greybird) */
--tk-heading: #1c5d99;
--tk-strong: #8f3f00;
--tk-em: #613583;
--tk-strike: #7c4a03;
--tk-code: #0f6b46;
--tk-code-bg: #eef1ee;
--tk-fence: #5e5c64;
--tk-link: #1a5fb4;
--tk-url: #57636e;
--tk-tag: #1c71d8;
--tk-mark: #c35c00;
--tk-quote: #57636e;
--tk-html: #a51d2d;
--tk-attr: #8b5a00;
--tk-str: #26734d;
--tk-comment: #888a85;
--tk-punc: #5e5c64;
--tk-ent: #9859ae;
--marker: #e5a50a;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
font-family: var(--sans);
font-size: 14px;
color: var(--fg);
background: var(--bg);
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12px; }
code { font-family: var(--mono); font-size: 0.92em; }
#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
/* ------------------------------------------------------------------ menus */
#menubar {
display: flex;
align-items: stretch;
height: 30px;
background: var(--panel-2);
border-bottom: 1px solid var(--border);
padding: 0 6px;
flex: none;
}
.menu-brand { display: flex; align-items: center; gap: 6px; padding-right: 8px; }
.brand-title { font-weight: 700; font-size: 13px; letter-spacing: .2px; }
.menu { position: relative; display: flex; }
.menu-btn {
border: 0;
background: none;
font: inherit;
font-size: 13px;
color: var(--fg);
padding: 0 11px;
height: 100%;
cursor: pointer;
border-radius: 0;
}
.menu-btn:hover, .menu.open .menu-btn { background: var(--accent); color: #fff; }
#btn-sidebar { width: 34px; border-radius: 3px; margin: 3px 0; }
#btn-sidebar:hover { background: #e0dcd8; }
.menu-dropdown {
display: none;
position: absolute;
top: 100%;
left: 0;
z-index: 40;
min-width: 240px;
margin: 0;
padding: 4px 0;
list-style: none;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 0 0 4px 4px;
box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.menu.open .menu-dropdown { display: block; }
.menu-dropdown li {
padding: 5px 14px;
font-size: 13px;
cursor: pointer;
display: flex;
justify-content: space-between;
gap: 18px;
white-space: nowrap;
}
.menu-dropdown li:hover { background: var(--accent); color: #fff; }
.menu-dropdown li:hover .accel { color: color-mix(in oklab, var(--accent), white 78%); }
.menu-dropdown .accel { color: var(--muted); font-size: 11px; }
.menu-sep { height: 0; padding: 0; margin: 4px 8px; border-top: 1px solid var(--border-soft); cursor: default; }
.menu-sep:hover { background: none; }
/* --------------------------------------------------------------- toolbar */
#toolbar {
display: flex;
align-items: center;
gap: 4px;
height: 38px;
padding: 0 8px;
background: var(--panel);
border-bottom: 1px solid var(--border);
flex: none;
}
.tb-group { display: flex; align-items: center; gap: 2px; }
.tb-caption { font-size: 12px; color: var(--muted); margin-right: 4px; }
.tb-sep { width: 1px; height: 22px; background: var(--border-soft); margin: 0 6px; }
.tb-grow { flex: 1; }
.tb-label { font-size: 12px; margin-left: 4px; }
/* ---------------------------------------------------------------------------
Sistema de botões "rich" (mesma linguagem visual do Rich Button do
spell.sh — gradientes, brilho interno, glow e micro-interações — porém 100%
CSS puro, sem React/Tailwind, derivado dos tokens de tema via color-mix +
light-dark, portanto compatível com os 21 temas e com CSP estrita).
--------------------------------------------------------------------------- */
.btn {
position: relative;
isolation: isolate;
font: inherit;
font-size: 13px;
color: var(--fg);
border: 1px solid color-mix(in oklab, var(--border) 70%, var(--fg) 30%);
border-radius: 8px;
padding: 4px 12px;
cursor: pointer;
background:
linear-gradient(180deg,
color-mix(in oklab, var(--panel-2), white 55%) 0%,
var(--panel-2) 48%,
color-mix(in oklab, var(--panel-2), var(--fg) 10%) 100%);
box-shadow:
inset 0 1px 0 light-dark(rgba(255, 255, 255, .85), rgba(255, 255, 255, .14)),
inset 0 -1px 0 color-mix(in oklab, var(--panel-2), var(--fg) 14%),
0 1px 2px rgba(0, 0, 0, .12),
0 2px 6px -2px rgba(0, 0, 0, .10);
text-shadow: 0 1px 0 light-dark(rgba(255, 255, 255, .7), rgba(0, 0, 0, .35));
transition: transform .12s ease, box-shadow .16s ease, filter .16s ease;
}
.btn::after { /* reflexo superior estilo "vidro" */
content: '';
position: absolute;
inset: 1px 1px 50% 1px;
z-index: -1;
border-radius: 7px 7px 10px 10px;
background: linear-gradient(180deg, light-dark(rgba(255, 255, 255, .5), rgba(255, 255, 255, .07)), transparent);
pointer-events: none;
}
.btn:hover {
transform: translateY(-1px);
filter: brightness(1.04) saturate(1.05);
box-shadow:
inset 0 1px 0 light-dark(rgba(255, 255, 255, .9), rgba(255, 255, 255, .18)),
inset 0 -1px 0 color-mix(in oklab, var(--panel-2), var(--fg) 16%),
0 3px 8px -1px rgba(0, 0, 0, .18),
0 6px 16px -6px rgba(0, 0, 0, .14);
}
.btn:active {
transform: translateY(1px) scale(.98);
filter: brightness(.97);
box-shadow:
inset 0 2px 5px rgba(0, 0, 0, .22),
inset 0 -1px 0 light-dark(rgba(255, 255, 255, .5), rgba(255, 255, 255, .08));
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:disabled {
opacity: .45;
cursor: default;
transform: none;
filter: saturate(.4);
box-shadow: inset 0 1px 0 light-dark(rgba(255, 255, 255, .6), rgba(255, 255, 255, .1));
}
.btn-icon { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; }
.btn-primary {
color: #fff;
text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
border-color: color-mix(in oklab, var(--accent), black 28%);
background:
linear-gradient(180deg,
color-mix(in oklab, var(--accent), white 26%) 0%,
var(--accent) 48%,
color-mix(in oklab, var(--accent), black 14%) 100%);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, .38),
inset 0 -1px 0 color-mix(in oklab, var(--accent), black 24%),
0 2px 8px -1px color-mix(in oklab, var(--accent) 55%, transparent),
0 1px 2px rgba(0, 0, 0, .18);
}
.btn-primary::after { background: linear-gradient(180deg, rgba(255, 255, 255, .28), transparent); }
.btn-primary:hover {
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, .45),
inset 0 -1px 0 color-mix(in oklab, var(--accent), black 26%),
0 4px 14px -2px color-mix(in oklab, var(--accent) 65%, transparent),
0 2px 4px rgba(0, 0, 0, .2);
}
.btn-danger {
color: #fff;
text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
border-color: color-mix(in oklab, var(--danger), black 26%);
background:
linear-gradient(180deg,
color-mix(in oklab, var(--danger), white 24%) 0%,
var(--danger) 48%,
color-mix(in oklab, var(--danger), black 12%) 100%);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, .35),
inset 0 -1px 0 color-mix(in oklab, var(--danger), black 22%),
0 2px 8px -1px color-mix(in oklab, var(--danger) 50%, transparent);
}
.btn-danger::after { background: linear-gradient(180deg, rgba(255, 255, 255, .25), transparent); }
.btn-small { font-size: 12px; padding: 2px 9px; border-radius: 6px; }
.fmt { min-width: 32px; justify-content: center; font-size: 13px; }
#fmt-tools.disabled { opacity: .45; pointer-events: none; }
#toolbar select {
font: inherit;
font-size: 13px;
color: var(--fg);
background:
linear-gradient(180deg,
color-mix(in oklab, var(--panel), white 40%) 0%,
var(--panel) 50%,
color-mix(in oklab, var(--panel), var(--fg) 6%) 100%);
border: 1px solid color-mix(in oklab, var(--border) 70%, var(--fg) 30%);
border-radius: 8px;
padding: 4px 8px;
box-shadow: inset 0 1px 0 light-dark(rgba(255, 255, 255, .8), rgba(255, 255, 255, .12)), 0 1px 2px rgba(0, 0, 0, .1);
}
.segmented {
display: inline-flex;
border: 1px solid color-mix(in oklab, var(--border) 70%, var(--fg) 30%);
border-radius: 9px;
overflow: hidden;
background: color-mix(in oklab, var(--panel-2), var(--fg) 6%);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .12);
padding: 2px;
gap: 2px;
}
.segmented .seg {
border: 0;
background: transparent;
font: inherit;
font-size: 12px;
padding: 4px 14px;
cursor: pointer;
color: var(--muted);
border-radius: 7px;
transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.segmented .seg:hover { color: var(--fg); background: color-mix(in oklab, var(--panel), transparent 35%); }
.segmented .seg.active {
background:
linear-gradient(180deg,
color-mix(in oklab, var(--accent), white 22%) 0%,
var(--accent) 55%,
color-mix(in oklab, var(--accent), black 10%) 100%);
color: #fff;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 4px color-mix(in oklab, var(--accent) 50%, transparent);
text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
/* ---------------------------------------------------------------- layout */
#layout { display: flex; flex: 1 1 auto; min-height: 0; }
/* sidebar ------------------------------------------------------------- */
#sidebar {
width: 272px;
flex: none;
display: flex;
flex-direction: column;
background: var(--panel-2);
border-right: 1px solid var(--border);
overflow-y: auto;
}
body.sidebar-off #sidebar { display: none; }
.side-section { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); }
.side-label {
display: block;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: .4px;
color: var(--muted);
margin-bottom: 6px;
}
#sidebar input[type="search"] {
width: 100%;
font: inherit;
font-size: 13px;
padding: 5px 8px;
border: 1px solid var(--border);
border-radius: 3px;
background: var(--panel);
color: var(--fg);
}
#tag-cloud { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-chip {
font: inherit;
font-size: 12px;
border: 1px solid var(--border);
background: var(--panel);
color: var(--accent-dark);
border-radius: 10px;
padding: 1px 8px;
cursor: pointer;
}
.tag-chip:hover { border-color: var(--accent); }
.tag-chip.active { background: var(--accent); border-color: var(--accent-dark); color: #fff; }
.tag-chip .tag-n { color: var(--muted); margin-left: 3px; font-size: 10px; }
.tag-chip.active .tag-n { color: color-mix(in oklab, var(--accent), white 75%); }
.side-notes { flex: 1 1 auto; border-bottom: 0; display: flex; flex-direction: column; }
.side-listhead { display: flex; justify-content: space-between; align-items: baseline; }
#notes-count { font-size: 11px; }
#notes-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
#notes-list li {
padding: 7px 10px;
border-bottom: 1px solid var(--border-soft);
cursor: pointer;
}
#notes-list li:hover { background: color-mix(in oklab, var(--panel-2), var(--fg) 9%); }
#notes-list li.active { background: color-mix(in oklab, var(--panel), var(--accent) 24%); box-shadow: inset 3px 0 0 var(--accent); }
.n-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-sub { font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-ext { color: var(--accent-dark); font-family: var(--mono); font-size: 10px; }
/* editor ------------------------------------------------------------ */
#editor-pane { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; background: var(--panel); }
#note-meta {
display: flex;
gap: 8px;
padding: 8px 10px;
border-bottom: 1px solid var(--border-soft);
background: var(--panel);
flex: none;
}
#note-title {
flex: 1 1 auto;
font-size: 15px;
font-weight: 600;
border: 1px solid transparent;
border-radius: 3px;
padding: 4px 8px;
background: var(--panel-2);
color: var(--fg);
}
#note-title:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
#editor-host { flex: 1 1 auto; display: flex; min-height: 0; position: relative; }
/* editor com overlay de realce (textarea transparente sobre #hl) */
#editor-wrap { flex: 1 1 auto; display: flex; min-width: 0; min-height: 0; }
#gutter {
flex: none;
overflow: hidden;
background: var(--panel-2);
border-right: 1px solid var(--border-soft);
user-select: none;
}
body.no-gutter #gutter { display: none; }
#gutter-inner { padding: var(--pad-y) 0; }
.ln {
height: var(--line-h);
font-family: var(--editor-font);
font-size: var(--editor-size);
line-height: var(--line-h);
text-align: right;
color: var(--muted);
padding: 0 9px 0 12px;
min-width: 42px;
}
#code-area { position: relative; flex: 1 1 auto; min-width: 0; }
#hl {
position: absolute;
inset: 0;
z-index: 1;
overflow: hidden;
padding: var(--pad-y) var(--pad-x);
font-family: var(--editor-font);
font-size: var(--editor-size);
line-height: var(--line-h);
color: var(--fg);
white-space: pre-wrap;
overflow-wrap: break-word;
pointer-events: none;
tab-size: var(--tab-size, 4);
}
#hl.nowrap { white-space: pre; overflow-wrap: normal; }
.hl-line { min-height: var(--line-h); }
#col-marker {
position: absolute;
top: 0;
bottom: 0;
width: 1px;
background: var(--marker);
opacity: .6;
z-index: 2;
pointer-events: none;
}
#editor {
position: absolute;
inset: 0;
z-index: 3;
width: 100%;
height: 100%;
border: 0;
resize: none;
overflow: auto;
padding: var(--pad-y) var(--pad-x);
font-family: var(--editor-font);
font-size: var(--editor-size);
line-height: var(--line-h);
background: transparent;
color: transparent;
caret-color: var(--fg);
tab-size: var(--tab-size, 4);
}
#editor:focus { outline: none; }
#editor::selection { background: rgba(53, 132, 228, .30); }
#editor::placeholder { color: var(--muted); }
/* tokens de colorização */
.tk-h { color: var(--tk-heading); font-weight: 700; }
.tk-strong { color: var(--tk-strong); font-weight: 700; }
.tk-em { color: var(--tk-em); font-style: italic; }
.tk-strike { color: var(--tk-strike); text-decoration: line-through; }
.tk-code { color: var(--tk-code); background: var(--tk-code-bg); }
.tk-fence { color: var(--tk-fence); }
.tk-fline { color: var(--tk-code); }
.tk-link { color: var(--tk-link); text-decoration: underline; }
.tk-url { color: var(--tk-url); text-decoration: underline; }
.tk-tag { color: var(--tk-tag); font-weight: 600; }
.tk-mark { color: var(--tk-mark); font-weight: 700; }
.tk-quote { color: var(--tk-quote); font-style: italic; }
.tk-html { color: var(--tk-html); }
.tk-attr { color: var(--tk-attr); }
.tk-str { color: var(--tk-str); }
.tk-comment{ color: var(--tk-comment); font-style: italic; }
.tk-punc { color: var(--tk-punc); }
.tk-ent { color: var(--tk-ent); }
#preview {
flex: 1 1 auto;
overflow-y: auto;
padding: 16px 22px;
background: var(--panel);
white-space: pre-wrap; /* usado no modo txt; sobrescrito pelas regras md */
}
#preview-frame { flex: 1 1 auto; width: 100%; border: 0; background: #fff; }
/* preview markdown + wysiwyg ------------------------------------------ */
#preview.md, #wysiwyg { white-space: normal; line-height: 1.55; }
#preview.md h1, #wysiwyg h1, #preview.md h2, #wysiwyg h2, #preview.md h3, #wysiwyg h3 { margin: 18px 0 8px; line-height: 1.25; }
#preview.md h1, #wysiwyg h1 { font-size: 1.7em; border-bottom: 1px solid var(--border-soft); padding-bottom: 4px; }
#preview.md h2, #wysiwyg h2 { font-size: 1.35em; }
#preview.md p, #wysiwyg p { margin: 8px 0; }
#preview.md ul, #wysiwyg ul, #preview.md ol, #wysiwyg ol { margin: 8px 0; padding-left: 26px; }
#preview.md blockquote, #wysiwyg blockquote {
margin: 10px 0; padding: 4px 14px; color: var(--muted);
border-left: 3px solid var(--accent); background: var(--panel-2);
}
#preview.md pre, #wysiwyg pre {
background: var(--panel-2); border: 1px solid var(--border-soft);
border-radius: 4px; padding: 10px 12px; overflow-x: auto;
}
#preview.md code, #wysiwyg code { background: var(--panel-2); padding: 1px 4px; border-radius: 3px; }
#preview.md pre code, #wysiwyg pre code { background: none; padding: 0; }
#preview.md table, #wysiwyg table { border-collapse: collapse; margin: 10px 0; }
#preview.md th, #wysiwyg th, #preview.md td, #wysiwyg td { border: 1px solid var(--border); padding: 4px 10px; }
#preview.md a, #wysiwyg a { color: var(--accent-dark); }
#preview.md hr, #wysiwyg hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
/* painel de versões --------------------------------------------------- */
#versions-panel {
width: 350px;
flex: none;
display: flex;
flex-direction: column;
background: var(--panel-2);
border-left: 1px solid var(--border);
min-height: 0;
}
.panel-head {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 10px;
border-bottom: 1px solid var(--border-soft);
}
.panel-head .side-label { margin: 0; }
#revisions-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 0 1 40%; }
#revisions-list li { padding: 7px 10px; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
#revisions-list li:hover { background: color-mix(in oklab, var(--panel-2), var(--fg) 9%); }
#revisions-list li.active { background: color-mix(in oklab, var(--panel), var(--accent) 24%); box-shadow: inset 3px 0 0 var(--accent); }
.rev-top { display: flex; justify-content: space-between; font-size: 12px; gap: 8px; }
.rev-hash { font-family: var(--mono); color: var(--accent-dark); font-size: 11px; }
.rev-msg { font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rev-when { font-size: 11px; color: var(--muted); }
#version-detail {
flex: 1 1 auto;
display: flex;
flex-direction: column;
min-height: 0;
border-top: 2px solid var(--border);
background: var(--panel);
}
.diff-head {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
padding: 8px 10px;
border-bottom: 1px solid var(--border-soft);
}
#version-info { font-size: 12px; }
#version-diff {
flex: 1 1 auto;
margin: 0;
overflow: auto;
padding: 8px 10px;
font-family: var(--mono);
font-size: 11.5px;
line-height: 1.5;
background: var(--panel);
white-space: pre;
}
.d-add { display: block; background: var(--diff-add); }
.d-del { display: block; background: var(--diff-del); }
.d-hunk { display: block; color: var(--accent-dark); background: var(--diff-hunk); }
.d-head { display: block; color: var(--muted); }
.panel-foot { padding: 8px 10px; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 6px; }
.panel-foot input {
font: inherit;
font-size: 12.5px;
padding: 5px 8px;
border: 1px solid var(--border);
border-radius: 3px;
background: var(--panel);
color: var(--fg);
}
/* barra de status ------------------------------------------------------ */
#statusbar {
display: flex;
align-items: center;
gap: 4px;
height: 26px;
padding: 0 8px;
background: var(--panel-2);
border-top: 1px solid var(--border);
font-size: 12px;
color: var(--muted);
flex: none;
}
.st-item {
padding: 0 10px;
border-right: 1px solid var(--border-soft);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.st-grow { flex: 1; }
#st-saved.dirty { color: var(--warn); font-weight: 600; }
#st-saved.ok { color: var(--success); }
/* overlays / diálogos --------------------------------------------------- */
.overlay {
position: fixed;
inset: 0;
z-index: 100;
display: flex;
align-items: center;
justify-content: center;
background: rgba(20, 20, 20, .45);
}
.dialog {
width: min(440px, 92vw);
background: var(--panel);
border: 1px solid var(--border);
border-radius: 6px;
box-shadow: 0 12px 40px rgba(0,0,0,.35);
padding: 18px 20px;
}
.dialog h1 { margin: 0 0 6px; font-size: 18px; }
.dialog-hint { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.dialog input {
width: 100%;
font: inherit;
font-size: 14px;
padding: 7px 10px;
border: 1px solid var(--border);
border-radius: 4px;
}
.dialog-error { color: var(--danger); font-size: 12.5px; margin: 8px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
#modal-body { font-size: 13px; line-height: 1.6; }
#modal-body code { background: var(--panel-2); padding: 1px 5px; border-radius: 3px; }
#toast {
position: fixed;
left: 50%;
bottom: 40px;
transform: translateX(-50%);
z-index: 120;
background: #2e3436;
color: #fff;
font-size: 13px;
padding: 8px 18px;
border-radius: 4px;
box-shadow: 0 6px 18px rgba(0,0,0,.3);
}
/* ------------------------------------------------------------- abas */
#tabbar {
display: flex;
align-items: stretch;
background: var(--panel-2);
border-bottom: 1px solid var(--border);
flex: none;
min-height: 32px;
}
#tabs { display: flex; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
#tabs::-webkit-scrollbar { display: none; }
.tab {
display: flex;
align-items: center;
gap: 6px;
border: 0;
border-right: 1px solid var(--border-soft);
background: var(--panel-2);
font: inherit;
font-size: 12.5px;
color: var(--muted);
padding: 6px 8px 6px 12px;
cursor: pointer;
white-space: nowrap;
max-width: 240px;
}
.tab.active {
background: var(--panel);
color: var(--fg);
font-weight: 600;
box-shadow: inset 0 2px 0 var(--accent);
}
.tab.dirty .tab-label::after { content: ' ●'; color: var(--warn); }
.tab-label { overflow: hidden; text-overflow: ellipsis; }
.tab-close {
flex: none;
width: 16px;
height: 16px;
line-height: 15px;
text-align: center;
border-radius: 3px;
font-size: 10px;
}
.tab-close:hover { background: var(--danger); color: #fff; }
.tab-new { margin: 3px 4px; }
/* ------------------------------------------------- árvore de categorias */
#cat-tree { max-height: 240px; overflow-y: auto; }
.tree-row {
display: flex;
align-items: center;
gap: 4px;
padding: 4px 8px;
border-radius: 3px;
cursor: pointer;
font-size: 13px;
color: var(--fg);
}
.tree-row:hover { background: color-mix(in oklab, var(--panel-2), var(--fg) 9%); }
.tree-row.active { background: color-mix(in oklab, var(--panel), var(--accent) 24%); box-shadow: inset 3px 0 0 var(--accent); }
.tree-caret {
border: 0;
background: none;
width: 14px;
padding: 0;
color: var(--muted);
cursor: pointer;
font-size: 10px;
}
.tree-icon { flex: none; }
.tree-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-count {
font-size: 10px;
color: var(--muted);
background: var(--panel);
border: 1px solid var(--border-soft);
border-radius: 8px;
padding: 0 5px;
}
.tree-menu {
border: 0;
background: none;
color: var(--muted);
cursor: pointer;
padding: 0 4px;
border-radius: 3px;
visibility: hidden;
}
.tree-row:hover .tree-menu, .tree-row.active .tree-menu { visibility: visible; }
.tree-menu:hover { background: color-mix(in oklab, var(--panel-2), var(--fg) 14%); color: var(--fg); }
/* ------------------------------------------------- popover de categorias */
#note-meta { position: relative; }
#btn-cats {
flex: none;
max-width: 240px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.cat-picker {
position: absolute;
top: 100%;
right: 8px;
z-index: 45;
width: min(300px, 90vw);
max-height: 300px;
overflow-y: auto;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 0 0 5px 5px;
box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
padding: 6px;
}
.picker-row {
display: flex;
align-items: center;
gap: 6px;
padding: 5px 6px;
border-radius: 3px;
font-size: 13px;
cursor: pointer;
}
.picker-row:hover { background: var(--panel-2); }
.picker-empty { padding: 8px; font-size: 12px; }
/* ------------------------------------------------- menu de contexto */
.ctx-menu {
position: fixed;
z-index: 70;
min-width: 180px;
margin: 0;
padding: 4px 0;
list-style: none;
background: var(--panel);
border: 1px solid var(--border);
border-radius: 4px;
box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}
.ctx-menu li { padding: 7px 14px; font-size: 13px; cursor: pointer; }
.ctx-menu li:hover { background: var(--accent); color: #fff; }
.ctx-danger { color: var(--danger); }
.ctx-danger:hover { color: #fff; }
/* ------------------------------------------------- backdrop */
#backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .4); }
.btn, .menu-btn, .tab, .tag-chip, .tree-row, .seg { touch-action: manipulation; }
/* ------------------------------------------------- responsivo (celular) */
@media (max-width: 760px) {
#menubar { padding: 0 2px; overflow-x: auto; scrollbar-width: none; }
#menubar::-webkit-scrollbar { display: none; }
.menu-btn { padding: 0 9px; }
.menu-dropdown li { padding: 9px 14px; }
#toolbar {
height: auto;
min-height: 0;
flex-wrap: wrap;
align-content: flex-start;
row-gap: 6px;
padding: 6px 8px 8px;
overflow: visible;
}
#toolbar .tb-sep, #toolbar .tb-grow { display: none; }
.tb-label, .tb-caption { display: none; }
#toolbar .tb-group { display: contents; }
#toolbar #fmt-tools { display: flex; } /* grupo de formatação permanece unido */
/* linha 1: ações de arquivo, botão de versões e seletor de formato */
#btn-new, #btn-save, #btn-export, #btn-versions { min-height: 40px; }
#toolbar select { min-height: 40px; }
/* linha 2: alternador de modo ocupa a largura toda */
#mode-toggle { order: 40; flex: 1 1 100%; }
#mode-toggle .seg { flex: 1; min-height: 38px; font-size: 13px; }
/* linha 3: ferramentas de formatação distribuídas, alvos de toque */
#fmt-tools { order: 50; flex: 1 1 100%; min-width: 0; flex-wrap: wrap; justify-content: space-between; }
#fmt-tools .fmt { flex: 1 1 0; min-width: 0; min-height: 40px; margin: 1px; padding: 4px 2px; }
/* sidebar vira gaveta */
#sidebar {
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: min(320px, 86vw);
z-index: 60;
transform: translateX(-105%);
transition: transform .18s ease;
box-shadow: 6px 0 20px rgba(0, 0, 0, .25);
padding-top: env(safe-area-inset-top);
}
body.sidebar-off #sidebar { display: flex; } /* F9 é atalho de desktop */
body.sidebar-open #sidebar { transform: none; }
/* painel de versões ocupa a tela toda */
#versions-panel {
position: fixed;
inset: 0;
width: auto;
z-index: 60;
box-shadow: none;
padding-top: env(safe-area-inset-top);
}
#statusbar {
height: 32px;
padding-bottom: env(safe-area-inset-bottom);
font-size: 11.5px;
}
#st-stats, #st-format { display: none; }
.st-item { padding: 0 8px; }
#note-meta { flex-wrap: wrap; }
#note-title { flex: 1 1 100%; }
.tab { padding: 9px 10px; }
/* 16px evita zoom automático do iOS ao focar o textarea */
#editor, #hl, .ln { font-size: max(var(--editor-size), 16px); }
}
@media (min-width: 761px) {
body.sidebar-open #sidebar { display: flex; } /* classe mobile não vaza no desktop */
}
/* ---------------------------------------------------- temas / esquemas */
html[data-theme="escuro"] {
color-scheme: dark;
--bg: #232323;
--panel: #1e1e1e;
--panel-2: #262626;
--border: #454545;
--border-soft: #383838;
--fg: #dbdbdb;
--muted: #9a9a9a;
--accent: #3584e4;
--accent-dark: #62a0ea;
--danger: #f66151;
--success: #33d17a;
--warn: #f5c211;
--diff-add: #22352a;
--diff-del: #3d2629;
--diff-hunk: #24334d;
--tk-heading: #73c2ff;
--tk-strong: #ffa348;
--tk-em: #c58fe0;
--tk-strike: #e8b07d;
--tk-code: #57e389;
--tk-code-bg: #2a3330;
--tk-fence: #b0b0b0;
--tk-link: #78aeff;
--tk-url: #a5a5a5;
--tk-tag: #78aeff;
--tk-mark: #ffb84d;
--tk-quote: #9a9a9a;
--tk-html: #ff7b6b;
--tk-attr: #ffc27d;
--tk-str: #6bd490;
--tk-comment: #6f6f6f;
--tk-punc: #b0b0b0;
--tk-ent: #d99ce8;
--marker: #a86f00;
}
html[data-theme="escuro"] #editor::selection { background: rgba(120, 174, 255, .28); }
html[data-theme="escuro"] #notes-list li.active,
html[data-theme="escuro"] #revisions-list li.active { background: #2b3f5c; }
html[data-theme="escuro"] #notes-list li:hover,
html[data-theme="escuro"] #revisions-list li:hover { background: #303030; }
html[data-theme="solar-claro"] {
color-scheme: light;
--bg: #eee8d5;
--panel: #fdf6e3;
--panel-2: #f4efdc;
--border: #d9cfb0;
--border-soft: #e4dcc2;
--fg: #586e75;
--muted: #93a1a1;
--accent: #268bd2;
--accent-dark: #1a6bab;
--danger: #dc322f;
--success: #859900;
--warn: #b58900;
--diff-add: #e6edc9;
--diff-del: #f6ddd8;
--diff-hunk: #d8e6f3;
--tk-heading: #268bd2;
--tk-strong: #cb4b16;
--tk-em: #6c71c4;
--tk-strike: #b58900;
--tk-code: #2aa198;
--tk-code-bg: #efe9d4;
--tk-fence: #93a1a1;
--tk-link: #268bd2;
--tk-url: #93a1a1;
--tk-tag: #268bd2;
--tk-mark: #cb4b16;
--tk-quote: #93a1a1;
--tk-html: #dc322f;
--tk-attr: #b58900;
--tk-str: #859900;
--tk-comment: #aaa79b;
--tk-punc: #93a1a1;
--tk-ent: #d33682;
--marker: #b58900;
}
html[data-theme="solar-escuro"] {
color-scheme: dark;
--bg: #073642;
--panel: #002b36;
--panel-2: #0a3d4a;
--border: #2b5662;
--border-soft: #1b4552;
--fg: #93a1a1;
--muted: #657b83;
--accent: #268bd2;
--accent-dark: #2aa198;
--danger: #dc322f;
--success: #859900;
--warn: #b58900;
--diff-add: #0d4440;
--diff-del: #3c2a2e;
--diff-hunk: #0a3d5c;
--tk-heading: #268bd2;
--tk-strong: #cb4b16;
--tk-em: #6c71c4;
--tk-strike: #b58900;
--tk-code: #2aa198;
--tk-code-bg: #0a3d4a;
--tk-fence: #586e75;
--tk-link: #268bd2;
--tk-url: #657b83;
--tk-tag: #2aa198;
--tk-mark: #cb4b16;
--tk-quote: #657b83;
--tk-html: #dc322f;
--tk-attr: #b58900;
--tk-str: #859900;
--tk-comment: #586e75;
--tk-punc: #657b83;
--tk-ent: #d33682;
--marker: #b58900;
}
html[data-theme="solar-escuro"] #editor::selection { background: rgba(38, 139, 210, .30); }
html[data-theme="solar-escuro"] #notes-list li.active,
html[data-theme="solar-escuro"] #revisions-list li.active { background: #0a4a63; }
html[data-theme="solar-escuro"] #notes-list li:hover,
html[data-theme="solar-escuro"] #revisions-list li:hover { background: #0c4450; }
/* ------------------------------------------------- diálogo preferências */
.dialog-wide { width: min(560px, 92vw); }
.dialog fieldset {
border: 1px solid var(--border-soft);
border-radius: 4px;
margin: 12px 0 0;
padding: 8px 14px 12px;
}
.dialog legend { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 0 6px; }
.dialog .row {
display: flex;
align-items: center;
gap: 8px;
margin: 8px 0 0;
font-size: 13.5px;
color: var(--fg);
}
.dialog .row input[type="checkbox"] { width: auto; margin: 0; }
.dialog .row select {
flex: 1 1 auto;
font: inherit;
font-size: 13px;
padding: 4px 8px;
border: 1px solid var(--border);
border-radius: 3px;
background: var(--panel);
color: var(--fg);
}
.dialog .row select.compact { flex: 0 1 auto; }
.dialog .num { width: 74px; flex: none; }
/* diálogos no celular (depois das regras base de .dialog) */
@media (max-width: 760px) {
.dialog .row { font-size: 15px; }
.dialog input { font-size: 16px; }
.tree-menu { visibility: visible; } /* toque não tem hover */
}
/* ------------------------------------------------- WYSIWYG (contenteditable) */
#wysiwyg {
flex: 1 1 auto;
overflow-y: auto;
padding: 16px 22px;
background: var(--panel);
color: var(--fg);
outline: none;
min-height: 0;
caret-color: var(--accent-dark);
font-family: var(--sans);
font-size: 15px;
}
#wysiwyg:empty::before { content: 'Comece a escrever…'; color: var(--muted); }
#wysiwyg [contenteditable="true"]:focus { outline: none; }
/* ------------------------------------------------- presença e autosave */
.presence-badge {
align-self: center;
display: flex;
align-items: center;
gap: 4px;
font-size: 12px;
color: var(--warn);
white-space: nowrap;
flex: none;
}
.tab .tab-pres { color: var(--warn); font-size: 10px; flex: none; }
#st-saved.pending { color: var(--accent); font-weight: 600; }
/* =========================================================================
Esquemas de cores do projeto iTerm2-Color-Schemes
(https://github.com/mbadolato/iTerm2-Color-Schemes, MIT).
UI e tokens derivados do Background/Foreground + ANSI 0–15 de cada
arquivo .itermcolors; nomes dos esquemas entre parênteses. */
/* Dracula — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="dracula"] { color-scheme: dark;
--bg: #1f212a;
--panel: #282a36;
--panel-2: #393a45;
--border: #66686e;
--border-soft: #4d4f58;
--fg: #f8f8f2;
--muted: #a1a1a3;
--accent: #d6acff;
--accent-dark: #bd93f9;
--danger: #ff6e6e;
--success: #69ff94;
--warn: #ffffa5;
--diff-add: #324c45;
--diff-del: #4a353f;
--diff-hunk: #47415a;
--tk-heading: #d6acff;
--tk-strong: #ffffa5;
--tk-em: #ff92df;
--tk-strike: #ffb78a;
--tk-code: #a4ffff;
--tk-code-bg: #37444e;
--tk-fence: #a1a1a3;
--tk-link: #d6acff;
--tk-url: #a1a1a3;
--tk-tag: #d6acff;
--tk-mark: #ffffa5;
--tk-quote: #a1a1a3;
--tk-html: #ff6e6e;
--tk-attr: #ffffa5;
--tk-str: #69ff94;
--tk-comment: #6272a4;
--tk-punc: #afb0b0;
--tk-ent: #ff92df;
--marker: #ffffa5;
}
html[data-theme="dracula"] #editor::selection { background: rgba(214,172,255, .30); }
html[data-theme="dracula"] #notes-list li.active,
html[data-theme="dracula"] #revisions-list li.active { background: #524966; }
html[data-theme="dracula"] #notes-list li:hover,
html[data-theme="dracula"] #revisions-list li:hover { background: #41434d; }
/* Nord — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="nord"] { color-scheme: dark;
--bg: #242932;
--panel: #2e3440;
--panel-2: #3c424e;
--border: #616773;
--border-soft: #4d535e;
--fg: #d8dee9;
--muted: #9197a2;
--accent: #81a1c1;
--accent-dark: #81a1c1;
--danger: #bf616a;
--success: #a3be8c;
--warn: #ebcb8b;
--diff-add: #414a4c;
--diff-del: #453b47;
--diff-hunk: #3d4857;
--tk-heading: #81a1c1;
--tk-strong: #ebcb8b;
--tk-em: #b48ead;
--tk-strike: #d5967b;
--tk-code: #8fbcbb;
--tk-code-bg: #3a444f;
--tk-fence: #9197a2;
--tk-link: #81a1c1;
--tk-url: #9197a2;
--tk-tag: #81a1c1;
--tk-mark: #ebcb8b;
--tk-quote: #9197a2;
--tk-html: #bf616a;
--tk-attr: #ebcb8b;
--tk-str: #a3be8c;
--tk-comment: #4c566a;
--tk-punc: #9da3ae;
--tk-ent: #b48ead;
--marker: #ebcb8b;
}
html[data-theme="nord"] #editor::selection { background: rgba(129,161,193, .30); }
html[data-theme="nord"] #notes-list li.active,
html[data-theme="nord"] #revisions-list li.active { background: #424e5f; }
html[data-theme="nord"] #notes-list li:hover,
html[data-theme="nord"] #revisions-list li:hover { background: #424854; }
/* Gruvbox Dark — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="gruvbox-dark"] { color-scheme: dark;
--bg: #1f1f1f;
--panel: #282828;
--panel-2: #383633;
--border: #635e51;
--border-soft: #4b4841;
--fg: #ebdbb2;
--muted: #999078;
--accent: #83a598;
--accent-dark: #458588;
--danger: #fb4934;
--success: #b8bb26;
--warn: #fabd2f;
--diff-add: #3f4028;
--diff-del: #4a2d2a;
--diff-hunk: #383f3c;
--tk-heading: #83a598;
--tk-strong: #fabd2f;
--tk-em: #d3869b;
--tk-strike: #fb8332;
--tk-code: #8ec07c;
--tk-code-bg: #343a32;
--tk-fence: #999078;
--tk-link: #83a598;
--tk-url: #999078;
--tk-tag: #83a598;
--tk-mark: #fabd2f;
--tk-quote: #999078;
--tk-html: #fb4934;
--tk-attr: #fabd2f;
--tk-str: #b8bb26;
--tk-comment: #928374;
--tk-punc: #a79c82;
--tk-ent: #d3869b;
--marker: #fabd2f;
}
html[data-theme="gruvbox-dark"] #editor::selection { background: rgba(131,165,152, .30); }
html[data-theme="gruvbox-dark"] #notes-list li.active,
html[data-theme="gruvbox-dark"] #revisions-list li.active { background: #3e4643; }
html[data-theme="gruvbox-dark"] #notes-list li:hover,
html[data-theme="gruvbox-dark"] #revisions-list li:hover { background: #3f3d39; }
/* Catppuccin Mocha — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="catppuccin-mocha"] { color-scheme: dark;
--bg: #171724;
--panel: #1e1e2e;
--panel-2: #2c2d3e;
--border: #535569;
--border-soft: #3e3f52;
--fg: #cdd6f4;
--muted: #8489a1;
--accent: #aeccfc;
--accent-dark: #89b4fa;
--danger: #f7aec2;
--success: #c2ecbf;
--warn: #fcd682;
--diff-add: #383f45;
--diff-del: #413546;
--diff-hunk: #383d53;
--tk-heading: #aeccfc;
--tk-strong: #fcd682;
--tk-em: #f398da;
--tk-strike: #fac2a2;
--tk-code: #b1eae1;
--tk-code-bg: #303643;
--tk-fence: #8489a1;
--tk-link: #aeccfc;
--tk-url: #8489a1;
--tk-tag: #aeccfc;
--tk-mark: #fcd682;
--tk-quote: #8489a1;
--tk-html: #f7aec2;
--tk-attr: #fcd682;
--tk-str: #c2ecbf;
--tk-comment: #585b70;
--tk-punc: #9096af;
--tk-ent: #f398da;
--marker: #fcd682;
}
html[data-theme="catppuccin-mocha"] #editor::selection { background: rgba(174,204,252, .30); }
html[data-theme="catppuccin-mocha"] #notes-list li.active,
html[data-theme="catppuccin-mocha"] #revisions-list li.active { background: #41485f; }
html[data-theme="catppuccin-mocha"] #notes-list li:hover,
html[data-theme="catppuccin-mocha"] #revisions-list li:hover { background: #333446; }
/* Tomorrow Night — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="tomorrow-night"] { color-scheme: dark;
--bg: #17181a;
--panel: #1d1f21;
--panel-2: #2a2d2e;
--border: #4f5253;
--border-soft: #3b3d3f;
--fg: #c5c8c6;
--muted: #7e8181;
--accent: #81a2be;
--accent-dark: #81a2be;
--danger: #cc6666;
--success: #b5bd68;
--warn: #f0c674;
--diff-add: #35382c;
--diff-del: #392a2c;
--diff-hunk: #2f373d;
--tk-heading: #81a2be;
--tk-strong: #f0c674;
--tk-em: #b294bb;
--tk-strike: #de966d;
--tk-code: #8abeb7;
--tk-code-bg: #2a3233;
--tk-fence: #7e8181;
--tk-link: #81a2be;
--tk-url: #7e8181;
--tk-tag: #81a2be;
--tk-mark: #f0c674;
--tk-quote: #7e8181;
--tk-html: #cc6666;
--tk-attr: #f0c674;
--tk-str: #b5bd68;
--tk-comment: #000000;
--tk-punc: #8a8d8c;
--tk-ent: #b294bb;
--marker: #f0c674;
}
html[data-theme="tomorrow-night"] #editor::selection { background: rgba(129,162,190, .30); }
html[data-theme="tomorrow-night"] #notes-list li.active,
html[data-theme="tomorrow-night"] #revisions-list li.active { background: #353e47; }
html[data-theme="tomorrow-night"] #notes-list li:hover,
html[data-theme="tomorrow-night"] #revisions-list li:hover { background: #313335; }
/* Ayu Mirage — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="ayu-mirage"] { color-scheme: dark;
--bg: #181c25;
--panel: #1f2430;
--panel-2: #2d313c;
--border: #53565c;
--border-soft: #3e424a;
--fg: #cccac2;
--muted: #838485;
--accent: #73d0ff;
--accent-dark: #6dcbfa;
--danger: #f28779;
--success: #d5ff80;
--warn: #ffd173;
--diff-add: #3c473d;
--diff-del: #41343c;
--diff-hunk: #2e4355;
--tk-heading: #73d0ff;
--tk-strong: #ffd173;
--tk-em: #dfbfff;
--tk-strike: #f9ac76;
--tk-code: #95e6cb;
--tk-code-bg: #2d3b43;
--tk-fence: #838485;
--tk-link: #73d0ff;
--tk-url: #838485;
--tk-tag: #73d0ff;
--tk-mark: #ffd173;
--tk-quote: #838485;
--tk-html: #f28779;
--tk-attr: #ffd173;
--tk-str: #d5ff80;
--tk-comment: #686868;
--tk-punc: #8f908f;
--tk-ent: #dfbfff;
--marker: #ffd173;
}
html[data-theme="ayu-mirage"] #editor::selection { background: rgba(115,208,255, .30); }
html[data-theme="ayu-mirage"] #notes-list li.active,
html[data-theme="ayu-mirage"] #revisions-list li.active { background: #334d62; }
html[data-theme="ayu-mirage"] #notes-list li:hover,
html[data-theme="ayu-mirage"] #revisions-list li:hover { background: #343842; }
/* Kanagawa Wave — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="kanagawa-wave"] { color-scheme: dark;
--bg: #18181f;
--panel: #1f1f28;
--panel-2: #2e2e34;
--border: #585654;
--border-soft: #414042;
--fg: #dcd7ba;
--muted: #8d8a7d;
--accent: #7fb4ca;
--accent-dark: #7e9cd8;
--danger: #e82424;
--success: #98bb6c;
--warn: #e6c384;
--diff-add: #323833;
--diff-del: #3f2027;
--diff-hunk: #303a45;
--tk-heading: #7fb4ca;
--tk-strong: #e6c384;
--tk-em: #938aa9;
--tk-strike: #e77454;
--tk-code: #7aa89f;
--tk-code-bg: #2a2f36;
--tk-fence: #8d8a7d;
--tk-link: #7fb4ca;
--tk-url: #8d8a7d;
--tk-tag: #7fb4ca;
--tk-mark: #e6c384;
--tk-quote: #8d8a7d;
--tk-html: #e82424;
--tk-attr: #e6c384;
--tk-str: #98bb6c;
--tk-comment: #727169;
--tk-punc: #9a9787;
--tk-ent: #938aa9;
--marker: #e6c384;
}
html[data-theme="kanagawa-wave"] #editor::selection { background: rgba(127,180,202, .30); }
html[data-theme="kanagawa-wave"] #notes-list li.active,
html[data-theme="kanagawa-wave"] #revisions-list li.active { background: #36434f; }
html[data-theme="kanagawa-wave"] #notes-list li:hover,
html[data-theme="kanagawa-wave"] #revisions-list li:hover { background: #36353a; }
/* Catppuccin Latte — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="catppuccin-latte"] { color-scheme: light;
--bg: #e3e5e9;
--panel: #eff1f5;
--panel-2: #e5e7ed;
--border: #bec0cb;
--border-soft: #d2d4dc;
--fg: #4c4f69;
--muted: #9093a4;
--accent: #1e66f5;
--accent-dark: #1e66f5;
--danger: #d20f39;
--success: #40a02b;
--warn: #df8e1d;
--diff-add: #d3e4d5;
--diff-del: #eacdd7;
--diff-hunk: #c9d8f5;
--tk-heading: #1e66f5;
--tk-strong: #df8e1d;
--tk-em: #ea76cb;
--tk-strike: #d94f2b;
--tk-code: #179299;
--tk-code-bg: #d5e6ea;
--tk-fence: #9093a4;
--tk-link: #1e66f5;
--tk-url: #9093a4;
--tk-tag: #1e66f5;
--tk-mark: #d20f39;
--tk-quote: #9093a4;
--tk-html: #d20f39;
--tk-attr: #df8e1d;
--tk-str: #40a02b;
--tk-comment: #acb0be;
--tk-punc: #85889a;
--tk-ent: #ea76cb;
--marker: #df8e1d;
}
html[data-theme="catppuccin-latte"] #editor::selection { background: rgba(30,102,245, .30); }
html[data-theme="catppuccin-latte"] #notes-list li.active,
html[data-theme="catppuccin-latte"] #revisions-list li.active { background: #bdd0f5; }
html[data-theme="catppuccin-latte"] #notes-list li:hover,
html[data-theme="catppuccin-latte"] #revisions-list li:hover { background: #e2e4ea; }
/* Gruvbox Light — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="gruvbox-light"] { color-scheme: light;
--bg: #eee5bd;
--panel: #fbf1c7;
--panel-2: #f0e6be;
--border: #c2ba9c;
--border-soft: #d9d0ad;
--fg: #3c3836;
--muted: #8c8673;
--accent: #458588;
--accent-dark: #458588;
--danger: #cc241d;
--success: #98971a;
--warn: #d79921;
--diff-add: #ebe3ab;
--diff-del: #f3d0ac;
--diff-hunk: #dadebc;
--tk-heading: #458588;
--tk-strong: #d79921;
--tk-em: #b16286;
--tk-strike: #d25f1f;
--tk-code: #689d6a;
--tk-code-bg: #e9e7bc;
--tk-fence: #8c8673;
--tk-link: #458588;
--tk-url: #8c8673;
--tk-tag: #458588;
--tk-mark: #cc241d;
--tk-quote: #8c8673;
--tk-html: #cc241d;
--tk-attr: #d79921;
--tk-str: #98971a;
--tk-comment: #928374;
--tk-punc: #7f7969;
--tk-ent: #b16286;
--marker: #d79921;
}
html[data-theme="gruvbox-light"] #editor::selection { background: rgba(69,133,136, .30); }
html[data-theme="gruvbox-light"] #notes-list li.active,
html[data-theme="gruvbox-light"] #revisions-list li.active { background: #cfd7b8; }
html[data-theme="gruvbox-light"] #notes-list li:hover,
html[data-theme="gruvbox-light"] #revisions-list li:hover { background: #ece2bb; }
/* Nord Light — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="nord-light"] { color-scheme: light;
--bg: #dadde4;
--panel: #e5e9f0;
--panel-2: #dbdfe7;
--border: #b4b9c2;
--border-soft: #c7ccd5;
--fg: #414858;
--muted: #868c98;
--accent: #81a1c1;
--accent-dark: #81a1c1;
--danger: #bf616a;
--success: #a3be8c;
--warn: #ebcb8b;
--diff-add: #dae2e0;
--diff-del: #dfd3db;
--diff-hunk: #d3dce8;
--tk-heading: #81a1c1;
--tk-strong: #ebcb8b;
--tk-em: #b48ead;
--tk-strike: #d5967b;
--tk-code: #88c0d0;
--tk-code-bg: #dae4ec;
--tk-fence: #868c98;
--tk-link: #81a1c1;
--tk-url: #868c98;
--tk-tag: #81a1c1;
--tk-mark: #bf616a;
--tk-quote: #868c98;
--tk-html: #bf616a;
--tk-attr: #ebcb8b;
--tk-str: #a3be8c;
--tk-comment: #4c566a;
--tk-punc: #7a808d;
--tk-ent: #b48ead;
--marker: #ebcb8b;
}
html[data-theme="nord-light"] #editor::selection { background: rgba(129,161,193, .30); }
html[data-theme="nord-light"] #notes-list li.active,
html[data-theme="nord-light"] #revisions-list li.active { background: #cdd8e5; }
html[data-theme="nord-light"] #notes-list li:hover,
html[data-theme="nord-light"] #revisions-list li:hover { background: #d8dce4; }
/* Tomorrow — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="tomorrow"] { color-scheme: light;
--bg: #f2f2f2;
--panel: #ffffff;
--panel-2: #f4f4f4;
--border: #cacac9;
--border-soft: #dfdfdf;
--fg: #4d4d4c;
--muted: #989897;
--accent: #4271ae;
--accent-dark: #4271ae;
--danger: #c82829;
--success: #718c00;
--warn: #eab700;
--diff-add: #e8edd6;
--diff-del: #f6dddd;
--diff-hunk: #dde5f0;
--tk-heading: #4271ae;
--tk-strong: #eab700;
--tk-em: #8959a8;
--tk-strike: #d97015;
--tk-code: #3e999f;
--tk-code-bg: #e8f3f3;
--tk-fence: #989897;
--tk-link: #4271ae;
--tk-url: #989897;
--tk-tag: #4271ae;
--tk-mark: #c82829;
--tk-quote: #989897;
--tk-html: #c82829;
--tk-attr: #eab700;
--tk-str: #718c00;
--tk-comment: #000000;
--tk-punc: #8b8b8b;
--tk-ent: #8959a8;
--marker: #eab700;
}
html[data-theme="tomorrow"] #editor::selection { background: rgba(66,113,174, .30); }
html[data-theme="tomorrow"] #notes-list li.active,
html[data-theme="tomorrow"] #revisions-list li.active { background: #d2ddec; }
html[data-theme="tomorrow"] #notes-list li:hover,
html[data-theme="tomorrow"] #revisions-list li:hover { background: #f1f1f1; }
/* Ayu Light — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="ayu-light"] { color-scheme: light;
--bg: #ecedee;
--panel: #f8f9fa;
--panel-2: #eff0f1;
--border: #c9cbce;
--border-soft: #dcdedf;
--fg: #5c6166;
--muted: #9ea1a4;
--accent: #3199e1;
--accent-dark: #3199e1;
--danger: #ea6c6d;
--success: #6cbf43;
--warn: #eca944;
--diff-add: #e2f0dd;
--diff-del: #f6e2e3;
--diff-hunk: #d4e8f6;
--tk-heading: #3199e1;
--tk-strong: #eca944;
--tk-em: #9e75c7;
--tk-strike: #eb8b59;
--tk-code: #46ba94;
--tk-code-bg: #e3f1ee;
--tk-fence: #9ea1a4;
--tk-link: #3199e1;
--tk-url: #9ea1a4;
--tk-tag: #3199e1;
--tk-mark: #ea6c6d;
--tk-quote: #9ea1a4;
--tk-html: #ea6c6d;
--tk-attr: #eca944;
--tk-str: #6cbf43;
--tk-comment: #686868;
--tk-punc: #93969a;
--tk-ent: #9e75c7;
--marker: #eca944;
}
html[data-theme="ayu-light"] #editor::selection { background: rgba(49,153,225, .30); }
html[data-theme="ayu-light"] #notes-list li.active,
html[data-theme="ayu-light"] #revisions-list li.active { background: #c8e2f4; }
html[data-theme="ayu-light"] #notes-list li:hover,
html[data-theme="ayu-light"] #revisions-list li:hover { background: #ecedee; }
/* Atom One Dark — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="one-dark"] { color-scheme: dark;
--bg: #1a1d22;
--panel: #21252b;
--panel-2: #2c3037;
--border: #4a4f57;
--border-soft: #3a3e46;
--fg: #abb2bf;
--muted: #717781;
--accent: #61afef;
--accent-dark: #61afef;
--danger: #e06c75;
--success: #98c379;
--warn: #e5c07b;
--diff-add: #343e37;
--diff-del: #403037;
--diff-hunk: #2d3e4e;
--tk-heading: #61afef;
--tk-strong: #e5c07b;
--tk-em: #c678dd;
--tk-strike: #e39678;
--tk-code: #56b6c2;
--tk-code-bg: #27363d;
--tk-fence: #747a84;
--tk-link: #61afef;
--tk-url: #717781;
--tk-tag: #61afef;
--tk-mark: #e5c07b;
--tk-quote: #717781;
--tk-html: #e06c75;
--tk-attr: #e5c07b;
--tk-str: #98c379;
--tk-comment: #767676;
--tk-punc: #7b818b;
--tk-ent: #c678dd;
--marker: #e5c07b;
}
html[data-theme="one-dark"] #editor::selection { background: rgba(97,175,239, .30); }
html[data-theme="one-dark"] #notes-list li.active,
html[data-theme="one-dark"] #revisions-list li.active { background: #30465a; }
html[data-theme="one-dark"] #notes-list li:hover,
html[data-theme="one-dark"] #revisions-list li:hover { background: #32363d; }
/* Atom One Light — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="one-light"] { color-scheme: light;
--bg: #ededed;
--panel: #f9f9f9;
--panel-2: #ededed;
--border: #bbbcbe;
--border-soft: #d4d4d5;
--fg: #2a2c33;
--muted: #818286;
--accent: #2f5af3;
--accent-dark: #2648c2;
--danger: #de3e35;
--success: #3f953a;
--warn: #d2b67c;
--diff-add: #dbe9da;
--diff-del: #f5dbda;
--diff-hunk: #d5dcf8;
--tk-heading: #2f5af3;
--tk-strong: #d2b67c;
--tk-em: #950095;
--tk-strike: #d87a59;
--tk-code: #3f953a;
--tk-code-bg: #e3ede2;
--tk-fence: #7d7e82;
--tk-link: #2f5af3;
--tk-url: #818286;
--tk-tag: #2f5af3;
--tk-mark: #de3e35;
--tk-quote: #818286;
--tk-html: #de3e35;
--tk-attr: #d2b67c;
--tk-str: #3f953a;
--tk-comment: #000000;
--tk-punc: #727478;
--tk-ent: #950095;
--marker: #d2b67c;
}
html[data-theme="one-light"] #editor::selection { background: rgba(47,90,243, .30); }
html[data-theme="one-light"] #notes-list li.active,
html[data-theme="one-light"] #revisions-list li.active { background: #c9d3f8; }
html[data-theme="one-light"] #notes-list li:hover,
html[data-theme="one-light"] #revisions-list li:hover { background: #e8e9e9; }
/* Monokai Pro — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="monokai"] { color-scheme: dark;
--bg: #232124;
--panel: #2d2a2e;
--panel-2: #3e3b3e;
--border: #6b696b;
--border-soft: #525053;
--fg: #fcfcfa;
--muted: #a5a4a4;
--accent: #fc9867;
--accent-dark: #fc9867;
--danger: #ff6188;
--success: #a9dc76;
--warn: #ffd866;
--diff-add: #41463a;
--diff-del: #4f333c;
--diff-hunk: #523e38;
--tk-heading: #fc9867;
--tk-strong: #ffd866;
--tk-em: #ab9df2;
--tk-strike: #ff9d77;
--tk-code: #78dce8;
--tk-code-bg: #363f44;
--tk-fence: #a9a8a8;
--tk-link: #fc9867;
--tk-url: #a5a4a4;
--tk-tag: #fc9867;
--tk-mark: #ffd866;
--tk-quote: #a5a4a4;
--tk-html: #ff6188;
--tk-attr: #ffd866;
--tk-str: #a9dc76;
--tk-comment: #727072;
--tk-punc: #b4b3b3;
--tk-ent: #ab9df2;
--marker: #ffd866;
}
html[data-theme="monokai"] #editor::selection { background: rgba(252,152,103, .30); }
html[data-theme="monokai"] #notes-list li.active,
html[data-theme="monokai"] #revisions-list li.active { background: #5f443c; }
html[data-theme="monokai"] #notes-list li:hover,
html[data-theme="monokai"] #revisions-list li:hover { background: #464346; }
/* Tokyo Night — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="tokyo-night"] { color-scheme: dark;
--bg: #14151e;
--panel: #1a1b26;
--panel-2: #272937;
--border: #4c5064;
--border-soft: #383b4b;
--fg: #c0caf5;
--muted: #7a819e;
--accent: #7aa2f7;
--accent-dark: #7aa2f7;
--danger: #f7768e;
--success: #9ece6a;
--warn: #e0af68;
--diff-add: #2f3831;
--diff-del: #3d2a37;
--diff-hunk: #2b334c;
--tk-heading: #7aa2f7;
--tk-strong: #e0af68;
--tk-em: #bb9af7;
--tk-strike: #ec937b;
--tk-code: #7dcfff;
--tk-code-bg: #263140;
--tk-fence: #7e84a2;
--tk-link: #7aa2f7;
--tk-url: #7a819e;
--tk-tag: #7aa2f7;
--tk-mark: #e0af68;
--tk-quote: #7a819e;
--tk-html: #f7768e;
--tk-attr: #e0af68;
--tk-str: #9ece6a;
--tk-comment: #414868;
--tk-punc: #868dad;
--tk-ent: #bb9af7;
--marker: #e0af68;
}
html[data-theme="tokyo-night"] #editor::selection { background: rgba(122,162,247, .30); }
html[data-theme="tokyo-night"] #notes-list li.active,
html[data-theme="tokyo-night"] #revisions-list li.active { background: #313b58; }
html[data-theme="tokyo-night"] #notes-list li:hover,
html[data-theme="tokyo-night"] #revisions-list li:hover { background: #2e303f; }
/* Carbon Paper — iTerm2-Color-Schemes (mbadolato, MIT) */
html[data-theme="carbon-paper"] { color-scheme: light;
--bg: #eceae1;
--panel: #f8f6ed;
--panel-2: #ebe9e1;
--border: #b6b6b2;
--border-soft: #d1cfca;
--fg: #1d2028;
--muted: #797a7b;
--accent: #17458b;
--accent-dark: #12376f;
--danger: #842424;
--success: #145a37;
--warn: #654d00;
--diff-add: #d4ddd0;
--diff-del: #e5d4cd;
--diff-hunk: #d0d6db;
--tk-heading: #17458b;
--tk-strong: #654d00;
--tk-em: #603187;
--tk-strike: #753912;
--tk-code: #005866;
--tk-code-bg: #dae3dd;
--tk-fence: #757677;
--tk-link: #17458b;
--tk-url: #797a7b;
--tk-tag: #17458b;
--tk-mark: #842424;
--tk-quote: #797a7b;
--tk-html: #842424;
--tk-attr: #654d00;
--tk-str: #145a37;
--tk-comment: #474b53;
--tk-punc: #6a6b6d;
--tk-ent: #603187;
--marker: #654d00;
}
html[data-theme="carbon-paper"] #editor::selection { background: rgba(23,69,139, .30); }
html[data-theme="carbon-paper"] #notes-list li.active,
html[data-theme="carbon-paper"] #revisions-list li.active { background: #c2ccd5; }
html[data-theme="carbon-paper"] #notes-list li:hover,
html[data-theme="carbon-paper"] #revisions-list li:hover { background: #e6e5dd; }