:root {
  color-scheme: light;
  --ink: #252522;
  --muted: #989790;
  --paper: #fff;
  --canvas: #f5f5f2;
  --line: #ecebe7;
  --gold: #d89d35;
  --gold-pale: #fbf4e6;
  --blue: #4f78b5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { background: var(--canvas); color: var(--ink); }
button, input { font: inherit; }
button { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { width: min(1180px, 100%); height: 100dvh; min-height: 400px; margin: 0 auto; display: grid; grid-template-columns: 330px minmax(0, 1fr); background: var(--paper); box-shadow: 0 10px 55px #27251f0a; overflow: hidden; }
.notes-panel { display: flex; min-width: 0; flex-direction: column; background: #f9f9f7; border-right: 1px solid var(--line); }
.list-header { padding: 29px 22px 12px; }
.eyebrow { color: #aaa9a1; font-size: 9px; font-weight: 700; letter-spacing: .16em; }
.list-title-row { display: flex; align-items: center; justify-content: space-between; margin: 7px 0 18px; }
.list-header-actions { display: flex; align-items: center; gap: 4px; }
h1 { margin: 0; font: 500 37px/1 Georgia, "Times New Roman", serif; letter-spacing: -.04em; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #77766f; cursor: pointer; transition: background .15s, color .15s; }
.icon-button:hover { background: #eeede8; color: var(--ink); }
.new-note-button { background: var(--gold-pale); color: #b57a1c; }
.new-note-button:hover { background: #f4e8d0; color: #94600d; }
.folder-add-button { color: #77766f; }
.search-box { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border: 1px solid #eeede9; border-radius: 9px; background: #f1f1ee; color: #a3a29c; }
.search-box svg { width: 16px; height: 16px; flex: none; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box input::placeholder { color: #aaa9a3; }
.search-box kbd { flex: none; padding: 2px 4px; border: 1px solid #e2e1db; border-radius: 4px; color: #aaa9a1; font: 10px sans-serif; }
.folder-tree { max-height: 190px; overflow-y: auto; margin-top: 12px; padding: 2px 0; }
.folder-all, .folder-row { display: flex; width: 100%; min-height: 30px; align-items: center; gap: 4px; border: 0; border-radius: 7px; background: transparent; color: #686760; font-size: 11px; text-align: left; }
.folder-all { padding: 4px 8px; cursor: pointer; }
.folder-all > svg, .folder-name > svg { width: 16px; height: 16px; flex: none; color: #a68b58; }
.folder-all:hover, .folder-row:hover { background: #f1f1ed; }
.folder-all.selected, .folder-row.selected { background: #f1ede4; color: #37362f; }
.folder-row { padding: 1px 4px 1px calc(4px + var(--folder-depth, 0) * 16px); }
.folder-disclosure { display: grid; width: 20px; height: 24px; flex: none; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #898880; font-size: 16px; cursor: pointer; }
.folder-disclosure:disabled { cursor: default; opacity: .25; }
.folder-name { display: flex; min-width: 0; flex: 1; align-items: center; gap: 6px; overflow: hidden; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.folder-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-count { flex: none; color: #aaa9a2; font-size: 9px; }
.folder-tool { display: grid; width: 22px; height: 24px; flex: none; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #8b8a83; font-size: 16px; cursor: pointer; }
.folder-tool:hover { background: #e8e6df; color: #4c4b45; }
.folder-remove:hover { background: #fbeeed; color: #b65d52; }
.notes-count { margin: 8px 2px 7px; color: #a3a29b; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.note-list { flex: 1; overflow-y: auto; padding: 0 10px; }
.note-card { position: relative; display: flex; width: 100%; align-items: center; gap: 3px; padding: 8px 7px 8px 13px; border: 0; border-radius: 9px; background: transparent; }
.note-card + .note-card { margin-top: 2px; }
.note-card:hover { background: #f1f1ed; }
.note-card.selected { background: #f1ede4; }
.note-card.selected::before { position: absolute; top: 13px; bottom: 13px; left: -10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); content: ''; }
.note-card-main { display: block; min-width: 0; flex: 1; padding: 5px 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.note-card-main:focus-visible, .note-share-button:focus-visible { outline: 2px solid #d89d35; outline-offset: 1px; }
.note-share-button { display: grid; width: 32px; height: 32px; flex: none; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #87867f; cursor: pointer; }
.note-share-button svg { width: 17px; height: 17px; }
.note-share-button:hover { background: #e8e6df; color: #4c4b45; }
.note-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.note-card-title { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.note-card-date { flex: none; color: #aaa9a2; font-size: 9px; }
.note-card-preview { display: -webkit-box; overflow: hidden; margin-top: 5px; color: #8e8d86; font-size: 10px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 17px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: #a2a19a; font-size: 9px; }
.list-footer > span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: #8daf8e; }
.text-button { padding: 4px; border: 0; background: transparent; color: #a2824f; font-size: 9px; cursor: pointer; white-space: nowrap; }

.editor-panel { display: flex; min-width: 0; flex-direction: column; background: var(--paper); }
.editor-toolbar { display: grid; min-height: 57px; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 27px; border-bottom: 1px solid #f2f1ed; }
.back-button { display: none; align-items: center; justify-self: start; gap: 1px; padding: 6px 0; border: 0; background: none; color: var(--blue); font-size: 12px; cursor: pointer; }
.back-button svg { width: 18px; height: 18px; }
.toolbar-center { color: #aaa9a1; font-size: 10px; }
.delete-button { justify-self: end; width: 34px; height: 34px; }
.delete-button svg { width: 17px; height: 17px; }
.delete-button:hover { background: #fbeeed; color: #b65d52; }
.toolbar-actions { display: flex; align-items: center; justify-self: end; gap: 4px; }
.theme-button { font-size: 20px; }
.editor-content { display: flex; width: min(690px, 100%); min-height: 0; flex: 1; flex-direction: column; align-self: center; padding: 49px 52px 24px; }
.note-meta-row { display: flex; min-height: 24px; align-items: center; gap: 7px; margin-bottom: 22px; }
.note-folder-label { color: #aaa9a2; font-size: 10px; }
.note-folder-select { max-width: min(190px, 45%); padding: 4px 20px 4px 7px; border: 1px solid #eeede9; border-radius: 6px; background: #fafaf8; color: #77766f; font: inherit; font-size: 10px; }
.date-label { margin: 0 0 0 auto; color: #aaa9a2; font-size: 10px; text-align: right; white-space: nowrap; }
.note-title { width: 100%; min-height: 1.2em; padding: 0; border: 0; outline: 0; background: transparent; color: #2c2b27; font: 500 34px/1.2 Georgia, "Times New Roman", serif; letter-spacing: -.025em; white-space: pre-wrap; overflow-wrap: anywhere; caret-color: var(--gold); }
.note-title:empty::before { color: #d0cfca; content: attr(data-placeholder); pointer-events: none; }
.note-title a { border-radius: 2px; color: #4773a8; text-decoration: underline; text-decoration-color: #bdcfe1; text-underline-offset: 3px; cursor: pointer; }
.note-body { min-height: 120px; flex: 1; margin-top: 13px; outline: 0; overflow-y: auto; color: #51504b; font-size: 14px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; caret-color: var(--gold); }
.note-body:empty::before { color: #b7b6af; content: attr(data-placeholder); pointer-events: none; }
.note-body a { border-radius: 2px; background: #f1f5fa; color: #4773a8; text-decoration: underline; text-decoration-color: #bdcfe1; text-underline-offset: 3px; cursor: pointer; }
.note-body ol, .note-body ul { padding-left: 1.6em; white-space: normal; }
.note-body li { padding-left: .15em; }
.note-body blockquote { margin: .25em 0 .25em 1.5em; padding-left: .75em; border-left: 2px solid #e4e2dc; }
.note-body [data-line-style="title"] { font-size: 1.5em; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.note-body [data-line-style="heading"] { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.note-body [data-line-style="subheading"] { font-weight: 700; }
.note-body [data-line-style] { position: relative; padding-right: 32px; }
.note-body .outline-toggle { position: absolute; top: .35em; right: 0; display: grid; width: 26px; height: 26px; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #85847d; cursor: pointer; }
.note-body .outline-toggle:hover, .note-body .outline-toggle:focus-visible { background: #f1f0ec; color: #34332e; outline: none; }
.note-body .outline-toggle svg { width: 16px; height: 16px; transition: transform .15s ease; }
.note-body .outline-toggle:not(.is-collapsed) svg { transform: rotate(90deg); }
.note-body [data-outline-hidden][hidden] { display: none !important; }
.note-body img { display: inline-block; max-width: min(100%, 180px); max-height: 150px; margin: 5px 7px; border: 1px solid #ecebe7; border-radius: 9px; object-fit: cover; vertical-align: middle; cursor: zoom-in; }
.format-bar { position: sticky; bottom: 0; z-index: 2; display: flex; flex: none; align-items: center; gap: 4px; min-height: 46px; margin-top: 8px; padding: 5px 8px; border-top: 1px solid #eeede9; background: #ffffffed; backdrop-filter: blur(12px); }
.format-bar button { display: grid; min-width: 36px; height: 34px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #64635d; font-size: 17px; cursor: pointer; }
.format-bar button:hover, .format-bar button:focus-visible { background: #f1f0ec; outline: none; }
.format-bar button.active { background: var(--gold-pale); color: #a76d14; }
.format-bar strong { font-size: 16px; }
.format-bar u { font-size: 14px; text-underline-offset: 2px; }
.format-bar .italic-icon { font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-style: italic; font-weight: 600; }
.format-bar .camera-icon { width: 21px; height: 21px; stroke-width: 1.8; }
.format-bar .camera-body { fill: var(--gold-pale); }
.format-bar .camera-icon circle:first-of-type { fill: #f4e4c1; }
.format-bar .camera-icon circle:nth-of-type(2) { fill: var(--gold); stroke: var(--paper); stroke-width: 1; }
.aa-icon { font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.format-menu { position: absolute; right: 10px; bottom: calc(100% + 8px); z-index: 20; display: flex; width: min(310px, calc(100vw - 24px)); flex-direction: column; overflow: hidden; padding: 5px; border: 1px solid #e9e8e2; border-radius: 12px; background: #fff; box-shadow: 0 12px 35px #24221f24; }
.format-menu[hidden] { display: none; }
.format-menu button { display: flex; min-height: 48px; align-items: center; justify-content: flex-start; gap: 12px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.format-menu button:hover, .format-menu button:focus-visible { background: #f5f4f0; outline: none; }
.format-example { color: #33332f; white-space: nowrap; }
.format-example-normal { font-size: 15px; }
.format-example-title { font-size: 22px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.format-example-heading { font-size: 16px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.format-example-subheading { font-size: 16px; font-weight: 700; }
.format-divider { width: 1px; height: 22px; margin: 0 4px; background: #e6e5df; }
.link-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 20px; color: #b2b1aa; font-size: 9px; }
.link-note svg { width: 13px; height: 13px; }
.empty-list { padding: 28px 12px; color: #a6a59e; font-size: 11px; line-height: 1.6; text-align: center; }

.help-dialog { width: min(340px, calc(100% - 36px)); padding: 27px; border: 1px solid #efeee9; border-radius: 18px; background: white; box-shadow: 0 24px 90px #24221d30; }
.help-dialog::backdrop { background: #24231f61; backdrop-filter: blur(3px); }
.help-dialog form { position: relative; }
.dialog-close { position: absolute; top: -18px; right: -13px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f4f3ef; color: #6f6e68; font-size: 22px; cursor: pointer; }
.dialog-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--gold-pale); color: #b77c21; font-size: 20px; }
.help-dialog h2 { margin: 17px 0 8px; font: 500 25px/1.1 Georgia, "Times New Roman", serif; }
.help-dialog p { color: #77766f; font-size: 12px; line-height: 1.7; }
.help-dialog strong { color: #44433e; }
.help-dialog .privacy-note { margin: 17px 0; padding: 11px; border-radius: 8px; background: #f8f7f4; font-size: 10px; }
.dialog-done { width: 100%; padding: 11px; border: 0; border-radius: 9px; background: #36352f; color: white; font-size: 12px; cursor: pointer; }
.image-dialog { position: relative; width: min(92vw, 900px); max-width: 92vw; max-height: 90dvh; padding: 42px 12px 12px; border: 0; border-radius: 14px; background: #fff; box-shadow: 0 24px 90px #24221f55; }
.image-dialog::backdrop { background: #171714bb; backdrop-filter: blur(3px); }
.image-dialog img { display: block; max-width: 100%; max-height: calc(90dvh - 54px); margin: 0 auto; object-fit: contain; }
.image-dialog .dialog-close { top: 7px; right: 7px; }
.verse-context-menu { position: fixed; z-index: 70; width: max-content; max-width: calc(100vw - 16px); overflow: hidden; padding: 4px; border: 1px solid #e9e8e2; border-radius: 10px; background: #fff; box-shadow: 0 10px 30px #24221f30; }
.verse-context-menu[hidden] { display: none; }
.verse-context-menu button { display: block; width: 100%; padding: 10px 13px; border: 0; border-radius: 7px; background: transparent; color: #33332f; font-size: 13px; text-align: left; white-space: nowrap; }
.verse-context-menu button:hover, .verse-context-menu button:focus-visible { background: #f5f4f0; outline: none; }
.verse-quote-dialog { position: relative; width: min(410px, calc(100% - 32px)); max-width: 410px; padding: 25px; border: 1px solid #efeee9; border-radius: 18px; background: #fff; color: #252522; box-shadow: 0 24px 90px #24221d30; }
.verse-quote-dialog::backdrop { background: #24231f61; backdrop-filter: blur(3px); }
.verse-quote-dialog .dialog-close { top: 8px; right: 8px; }
.verse-quote-dialog h2 { margin: 14px 0 6px; font: 500 24px/1.1 Georgia, "Times New Roman", serif; }
.verse-quote-dialog p { color: #77766f; font-size: 12px; line-height: 1.55; }
.verse-open-link { display: inline-block; margin: 2px 0 3px; color: #4773a8; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.verse-quote-dialog label { display: block; margin: 17px 0 7px; color: #55544e; font-size: 12px; font-weight: 600; }
.verse-quote-dialog textarea { display: block; width: 100%; min-height: 112px; resize: vertical; padding: 10px; border: 1px solid #e7e6e0; border-radius: 9px; background: #fafaf8; color: #333; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.verse-quote-dialog textarea:focus { border-color: #c7a664; outline: 2px solid #d89d3526; }
.verse-paste { margin-top: 8px; padding: 7px 10px; border: 1px solid #e7e6e0; border-radius: 7px; background: #fafaf8; color: #55544e; font-size: 11px; cursor: pointer; }
.verse-paste:hover { background: #f1f0ec; }
.verse-quote-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 17px; }
.verse-quote-actions button { padding: 9px 13px; border: 0; border-radius: 8px; font-size: 12px; cursor: pointer; }
.verse-cancel { background: #f1f0ec; color: #55544e; }
.verse-insert { background: #36352f; color: white; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ececec;
  --muted: #a9a9a9;
  --paper: #212121;
  --canvas: #212121;
  --line: #383838;
  --gold: #e0ad54;
  --gold-pale: #3b3222;
  --blue: #8ab4f8;
}
:root[data-theme="dark"] body,
:root[data-theme="dark"] .editor-panel,
:root[data-theme="dark"] .app-shell { background: #212121; color: #ececec; }
:root[data-theme="dark"] .notes-panel { background: #171717; border-color: #383838; }
:root[data-theme="dark"] .editor-toolbar,
:root[data-theme="dark"] .list-footer { border-color: #383838; }
:root[data-theme="dark"] .editor-toolbar { border-bottom-color: #303030; }
:root[data-theme="dark"] .toolbar-center,
:root[data-theme="dark"] .date-label,
:root[data-theme="dark"] .list-footer,
:root[data-theme="dark"] .notes-count { color: #9b9b9b; }
:root[data-theme="dark"] .search-box { border-color: #383838; background: #242424; color: #aaa; }
:root[data-theme="dark"] .search-box input { color: #ececec; }
:root[data-theme="dark"] .search-box input::placeholder,
:root[data-theme="dark"] .search-box kbd { color: #999; }
:root[data-theme="dark"] .search-box kbd { border-color: #454545; }
:root[data-theme="dark"] .note-card:hover { background: #242424; }
:root[data-theme="dark"] .note-card.selected { background: #30302e; }
:root[data-theme="dark"] .note-card-title,
:root[data-theme="dark"] .note-title { color: #f2f2f2; }
:root[data-theme="dark"] .note-card-date,
:root[data-theme="dark"] .note-card-preview,
:root[data-theme="dark"] .eyebrow { color: #aaa; }
:root[data-theme="dark"] .folder-all,
:root[data-theme="dark"] .folder-row { color: #c0c0c0; }
:root[data-theme="dark"] .folder-add-button { color: #b8b8b8; }
:root[data-theme="dark"] .folder-all:hover,
:root[data-theme="dark"] .folder-row:hover { background: #242424; }
:root[data-theme="dark"] .folder-all.selected,
:root[data-theme="dark"] .folder-row.selected { background: #30302e; color: #eee; }
:root[data-theme="dark"] .folder-tool { color: #aaa; }
:root[data-theme="dark"] .folder-tool:hover { background: #3a3a3a; color: #eee; }
:root[data-theme="dark"] .note-share-button { color: #aaa; }
:root[data-theme="dark"] .note-share-button:hover { background: #3a3a3a; color: #eee; }
:root[data-theme="dark"] .note-folder-select { border-color: #444; background: #292929; color: #ccc; }
:root[data-theme="dark"] .note-title:empty::before { color: #686868; }
:root[data-theme="dark"] .note-title a { color: #9cc7ff; text-decoration-color: #6386ac; }
:root[data-theme="dark"] .note-body { color: #e6e6e6; }
:root[data-theme="dark"] .note-body:empty::before { color: #888; }
:root[data-theme="dark"] .note-body a { background: #243449; color: #9cc7ff; text-decoration-color: #6386ac; }
:root[data-theme="dark"] .note-body blockquote { border-left-color: #555; }
:root[data-theme="dark"] .note-body [data-line-style="title"],
:root[data-theme="dark"] .note-body [data-line-style="heading"] { text-decoration-color: #ddd; }
:root[data-theme="dark"] .note-body .outline-toggle { color: #aaa; }
:root[data-theme="dark"] .note-body .outline-toggle:hover,
:root[data-theme="dark"] .note-body .outline-toggle:focus-visible { background: #333; color: #eee; }
:root[data-theme="dark"] .note-body img { border-color: #484848; }
:root[data-theme="dark"] .format-bar { border-color: #383838; background: #212121ed; }
:root[data-theme="dark"] .format-bar button { color: #d0d0d0; }
:root[data-theme="dark"] .format-bar button:hover,
:root[data-theme="dark"] .format-bar button:focus-visible { background: #333; }
:root[data-theme="dark"] .format-bar button.active { background: #3b3222; color: #f0bf67; }
:root[data-theme="dark"] .format-divider { background: #444; }
:root[data-theme="dark"] .format-menu { border-color: #444; background: #2b2b2b; box-shadow: 0 12px 35px #0008; }
:root[data-theme="dark"] .format-menu button:hover,
:root[data-theme="dark"] .format-menu button:focus-visible { background: #3a3a3a; }
:root[data-theme="dark"] .format-example { color: #eee; }
:root[data-theme="dark"] .format-description { color: #aaa; }
:root[data-theme="dark"] .icon-button { color: #b8b8b8; }
:root[data-theme="dark"] .icon-button:hover { background: #333; color: #fff; }
:root[data-theme="dark"] .new-note-button { color: #e4b75e; }
:root[data-theme="dark"] .new-note-button:hover { background: #48391f; color: #ffd47d; }
:root[data-theme="dark"] .delete-button:hover { background: #482a28; color: #ff9a91; }
:root[data-theme="dark"] .link-note { color: #929292; }
:root[data-theme="dark"] .text-button { color: #d0ad72; }
:root[data-theme="dark"] .empty-list { color: #999; }
:root[data-theme="dark"] .help-dialog,
:root[data-theme="dark"] .image-dialog { border-color: #444; background: #2b2b2b; color: #eee; }
:root[data-theme="dark"] .help-dialog h2,
:root[data-theme="dark"] .help-dialog strong { color: #f0f0f0; }
:root[data-theme="dark"] .help-dialog p { color: #c0c0c0; }
:root[data-theme="dark"] .help-dialog .privacy-note { background: #363636; }
:root[data-theme="dark"] .dialog-close { background: #3b3b3b; color: #ddd; }
:root[data-theme="dark"] .dialog-done { background: #ececec; color: #202020; }
:root[data-theme="dark"] .image-dialog .dialog-close { background: #3b3b3b; }
:root[data-theme="dark"] .verse-context-menu { border-color: #444; background: #2b2b2b; box-shadow: 0 10px 30px #0008; }
:root[data-theme="dark"] .verse-context-menu button { color: #eee; }
:root[data-theme="dark"] .verse-context-menu button:hover,
:root[data-theme="dark"] .verse-context-menu button:focus-visible { background: #3a3a3a; }
:root[data-theme="dark"] .verse-quote-dialog { border-color: #444; background: #2b2b2b; color: #eee; }
:root[data-theme="dark"] .verse-quote-dialog p,
:root[data-theme="dark"] .verse-quote-dialog label { color: #c0c0c0; }
:root[data-theme="dark"] .verse-open-link { color: #9cc7ff; }
:root[data-theme="dark"] .verse-quote-dialog textarea { border-color: #484848; background: #222; color: #eee; }
:root[data-theme="dark"] .verse-paste { border-color: #484848; background: #333; color: #eee; }
:root[data-theme="dark"] .verse-paste:hover { background: #3a3a3a; }
:root[data-theme="dark"] .verse-cancel { background: #3b3b3b; color: #eee; }
:root[data-theme="dark"] .verse-insert { background: #ececec; color: #202020; }

@media (min-width: 1181px) { .app-shell { height: min(900px, 100dvh); margin-top: max(0px, calc((100dvh - 900px) / 2)); border: 1px solid #edede9; border-radius: 13px; } }
@media (max-width: 680px) {
  .keyboard-open .note-body .outline-toggle { display: none; }
  body { background: white; }
  .app-shell { display: block; width: 100%; height: 100dvh; min-height: 0; }
  .notes-panel, .editor-panel { width: 100%; height: 100%; }
  .notes-panel { border: 0; }
  .list-header { padding: calc(17px + env(safe-area-inset-top)) 21px 11px; }
  .list-title-row { margin: 7px 0 15px; }
  .list-title-row h1 { font-size: 35px; }
  .list-header-actions { gap: 2px; }
  .folder-tree { max-height: 150px; }
  .notes-count { margin-top: 18px; }
  .note-list { padding: 0 12px; }
  .note-card { padding: 15px 13px; }
  .note-card-title { font-size: 14px; }
  .note-card-date { font-size: 10px; }
  .note-card-preview { font-size: 11px; }
  .list-footer { padding: 13px 19px calc(13px + env(safe-area-inset-bottom)); }
  .editor-panel { display: none; }
  .app-shell.show-editor .notes-panel { display: none; }
  .app-shell.show-editor .editor-panel { display: flex; }
  .editor-toolbar { min-height: 53px; grid-template-columns: 1fr auto 1fr; padding: 0 16px; padding-top: env(safe-area-inset-top); }
  .back-button { display: flex; }
  .editor-content { padding: 34px 25px calc(18px + env(safe-area-inset-bottom)); }
  .note-meta-row { margin-bottom: 20px; }
  .date-label { margin-bottom: 0; font-size: 10px; }
  .note-title { font-size: 31px; }
  .note-body { margin-top: 11px; font-size: 16px; line-height: 1.75; }
  .note-body { padding-bottom: 50px; }
  .format-bar { position: fixed; right: 0; bottom: var(--keyboard-offset, 0px); left: 0; z-index: 10; width: 100%; min-height: 50px; margin: 0; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); }
  .link-note { margin-top: 12px; font-size: 9px; }
}
@media (max-width: 360px) { .list-footer { font-size: 8px; } .text-button { font-size: 8px; } .editor-content { padding-right: 19px; padding-left: 19px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
