/* The reference keeps every action in the original note editor's bottom edge. */
html { --app-pane-duration:240ms; --app-feedback-duration:140ms; }
html[data-motion-quality="smooth"] { --app-pane-duration:280ms; --app-feedback-duration:170ms; }
.app-pane-motion { transition-duration:var(--app-pane-duration); transition-timing-function:cubic-bezier(.2,.05,.2,1); }
html[data-app-resizing=true] .app-pane-motion { transition:none !important; }
.animate-in, [data-settings-panel-shell], [data-version-log-shell] { animation:app-surface-enter var(--app-feedback-duration) cubic-bezier(.2,.05,.2,1) both; }
.animate-in.slide-in-from-top-4 { animation-name:app-notice-enter; }
@keyframes app-surface-enter { from { opacity:0; scale:.985; } to { opacity:1; scale:1; } }
@keyframes app-notice-enter { from { opacity:0; translate:0 -5px; } to { opacity:1; translate:0 0; } }
@media (prefers-reduced-motion:reduce) {
  .app-pane-motion { transition-duration:0ms !important; }
  .animate-in, [data-settings-panel-shell], [data-version-log-shell] { animation:none; }
}
[data-ui-notes-reference] { --ref-note-tool-size:36px; --ref-note-tool-width:var(--ref-note-tool-size); }
[data-ui-notes-reference] .ref-note-editor { padding-bottom:0; min-height:0; }
[data-ui-notes-reference] .ref-note-body { margin-bottom:calc(var(--ref-note-tool-size) + 1px); padding-bottom:0; min-height:0; }
[data-ui-notes-reference][data-toolbar-expanded=true] .ref-note-body { margin-bottom:calc(var(--ref-note-tool-size) * 2 + 2px); }
[data-ui-notes-reference] .ref-notes-sidebar { padding-bottom:0; }
[data-ui-notes-reference] .ref-notes-tools {
  position:absolute;
  left:var(--ref-sidebar-width, 0px);
  right:0;
  bottom:0;
  z-index:20;
  padding:0 6px 0;
  color:#64748b;
  isolation:isolate;
}
[data-ui-notes-reference] .ref-notes-tools-backdrop { position:absolute; inset:0; z-index:-1; pointer-events:none; border-top:1px solid rgba(100,116,139,.45); background:#fff; transform-origin:right bottom; }
[data-ui-notes-reference] .ref-notes-tools[data-motion-active=true] .ref-notes-tools-row { overflow:visible; }
[data-ui-notes-reference][data-sidebar-hidden=true] .ref-notes-tools { left:0; }
[data-ui-notes-reference] .ref-notes-tools-row { display:flex; align-items:center; gap:1px; height:var(--ref-note-tool-size); background:transparent; border:0; border-radius:0; box-shadow:none; position:relative; overflow:hidden; }
[data-ui-notes-reference] .ref-notes-tools-core { justify-content:space-between; }
[data-ui-notes-reference] .ref-notes-tools-all,
[data-ui-notes-reference] .ref-notes-tools-secondary { justify-content:flex-end; }
[data-ui-notes-reference] .ref-notes-tools-secondary { display:flex; align-items:center; gap:1px; height:0; opacity:0; overflow:hidden; pointer-events:none; }
[data-ui-notes-reference] .ref-notes-tools-secondary[data-open=true] { height:var(--ref-note-tool-size); opacity:1; pointer-events:auto; }
[data-ui-notes-reference] .ref-notes-tools-grid { display:grid; grid-template-columns:repeat(var(--ref-toolbar-columns),var(--ref-note-tool-width)); justify-content:space-between; column-gap:1px; }
[data-ui-notes-reference] .ref-notes-tools-secondary.ref-notes-tools-grid > button:first-of-type { grid-column-start:var(--ref-secondary-start); }
[data-ui-notes-reference] .ref-notes-tools button { display:flex; align-items:center; justify-content:center; flex:0 0 var(--ref-note-tool-width); width:var(--ref-note-tool-width); min-width:var(--ref-note-tool-width); height:var(--ref-note-tool-size); padding:0; border:0; border-radius:7px; background:transparent; box-shadow:none; color:inherit; cursor:pointer; }
[data-ui-notes-reference] .ref-notes-tools button > svg { flex-shrink:0; }
[data-ui-notes-reference] .ref-note-tool-motion-layer { position:absolute; inset:0; z-index:2; overflow:visible; pointer-events:none; }
[data-ui-notes-reference] .ref-note-tool-exit { position:absolute; top:0; width:var(--ref-note-tool-width); height:var(--ref-note-tool-size); display:flex; align-items:center; justify-content:center; pointer-events:none; }
[data-ui-notes-reference] .ref-notes-sidebar { position:absolute; left:0; top:0; bottom:0; width:var(--ref-sidebar-width); min-width:0; max-width:none; overflow:hidden; transform:translateX(0); }
[data-ui-notes-reference] .ref-notes-sidebar[aria-hidden=true] { transform:translateX(-100%); }
[data-ui-notes-reference] .ref-notes-detail { margin-left:var(--ref-sidebar-width); overflow:hidden; }
[data-ui-notes-reference][data-sidebar-hidden=true] .ref-notes-detail { margin-left:0; }
@media (hover:hover) and (pointer:fine) {
  [data-ui-notes-reference] .ref-notes-tools button:not([data-note-tool="markdown"]):hover:not(:disabled) { color:#3b82f6; background:rgba(148,163,184,.12); }
  [data-ui-notes-reference] .ref-notes-tools button.ref-delete:hover { color:#ef4444; }
  [data-ui-notes-reference] .ref-notes-tools button.ref-markdown-active:hover { color:#2563eb; background:transparent; }
  .dark [data-ui-notes-reference] .ref-notes-tools button.ref-markdown-active:hover { color:#7dd3fc; background:transparent; }
}
[data-ui-notes-reference] .ref-notes-tools button:focus-visible { outline:1px solid #60a5fa; outline-offset:-2px; }
[data-ui-notes-reference] .ref-notes-tools button:disabled { opacity:.28; cursor:default; }
[data-ui-notes-reference] .ref-notes-tools button.ref-markdown-active { color:#2563eb; background:transparent; }
[data-ui-notes-reference] .ref-sync-button { transition:background-color .15s ease; }
[data-ui-notes-reference] .ref-sync-button[data-sync-status="success"] { color:#28a85a !important; }
[data-ui-notes-reference] .ref-sync-button[data-sync-status="syncing"] { color:#c58a00 !important; }
[data-ui-notes-reference] .ref-sync-button[data-sync-status="error"] { color:#e05252 !important; }
[data-ui-notes-reference] .ref-sync-button[data-sync-status="success"]:hover:not(:disabled) { color:#238e4d !important; }
[data-ui-notes-reference] .ref-sync-button[data-sync-status="syncing"]:hover:not(:disabled) { color:#a97000 !important; }
[data-ui-notes-reference] .ref-sync-button[data-sync-status="error"]:hover:not(:disabled) { color:#c63f3f !important; }
[data-ui-notes-reference] .ref-sync-button:disabled { opacity:.95; cursor:wait; }
[data-ui-notes-reference] .ref-tools-message { position:absolute; right:8px; bottom:100%; font-size:11px; padding:3px 7px; color:#475569; background:#f1f5f9; border-radius:4px; pointer-events:none; }
[data-ui-notes-reference] .ref-refresh-spin { animation:ref-refresh-turn .7s linear infinite; }
@keyframes ref-refresh-turn { to { transform:rotate(360deg); } }
.dark [data-ui-notes-reference] .ref-notes-tools { color:#cbd5e1; }
.dark [data-ui-notes-reference] .ref-notes-tools-backdrop { border-top-color:rgba(148,163,184,.5); background:#0f172a; }
.dark [data-ui-notes-reference] .ref-notes-tools button.ref-markdown-active { color:#7dd3fc; background:transparent; }
.dark [data-ui-notes-reference] .ref-tools-message { background:#334155; color:#e2e8f0; }
[data-ui-notes-reference][data-reference-mobile=true] { --ref-note-tool-size:42px; }
[data-ui-notes-reference][data-reference-mobile=true] .ref-notes-tools { padding:0 4px 0; }
[data-ui-notes-reference][data-reference-mobile=true] .ref-notes-tools-row button { border-radius:9px; }
@media (prefers-reduced-motion:reduce) {
  [data-ui-notes-reference] .ref-notes-sidebar { transition-duration:0s; }
  [data-ui-notes-reference] .ref-note-body,
  [data-ui-notes-reference] .ref-notes-tools,
  [data-ui-notes-reference] .ref-notes-tools-secondary { transition-duration:0s; }
}
.ref-share-workspace-page { position:fixed; inset:0; z-index:20000; display:flex; flex-direction:column; overflow:hidden; background:#f7f9fc; color:#334155; font-family:ui-sans-serif,system-ui,-apple-system,sans-serif; animation:ref-share-page-enter var(--app-pane-duration) cubic-bezier(.2,.05,.2,1) both; }
@keyframes ref-share-page-enter { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media (prefers-reduced-motion:reduce) { .ref-share-workspace-page { animation:none; } }
.ref-share-workspace-header { flex:0 0 auto; min-height:56px; display:flex; align-items:center; gap:10px; padding:8px 16px; border-bottom:1px solid #e2e8f0; background:#fff; }
.ref-share-workspace-icon { width:32px; height:32px; flex:0 0 32px; display:flex; align-items:center; justify-content:center; border-radius:9px; color:#2563eb; background:#eaf3ff; }
.ref-share-workspace-heading { min-width:0; flex:1; display:flex; align-items:baseline; gap:9px; }
.ref-share-workspace-heading strong { flex:0 0 auto; font-size:15px; }
.ref-share-workspace-heading span { min-width:0; overflow:hidden; color:#94a3b8; font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.ref-share-workspace-settings,
.ref-share-workspace-close { width:34px; height:34px; flex:0 0 34px; align-items:center; justify-content:center; border:0; border-radius:8px; background:transparent; color:#94a3b8; cursor:pointer; }
.ref-share-workspace-settings { display:none; }
.ref-share-workspace-close { display:flex; font-size:24px; font-weight:400; line-height:1; }
.ref-share-workspace-settings:hover,
.ref-share-workspace-settings[aria-pressed=true],
.ref-share-workspace-close:hover { color:#2563eb; background:#eff6ff; }
.ref-share-workspace-settings:focus-visible,
.ref-share-workspace-close:focus-visible { outline:2px solid #60a5fa; outline-offset:1px; }
.ref-share-workspace-scroll { min-height:0; flex:1; overflow:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#cbd5e1 transparent; }
.ref-share-workspace-scroll::-webkit-scrollbar { width:7px; }
.ref-share-workspace-scroll::-webkit-scrollbar-track { background:transparent; }
.ref-share-workspace-scroll::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:999px; background:#cbd5e1; background-clip:padding-box; }
.ref-share-workspace-content { width:100%; height:100%; box-sizing:border-box; margin:0 auto; padding:14px 18px 18px; }
.ref-share-layout { min-height:100%; display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
.ref-share-controls { min-width:0; }
.ref-share-controls-heading { min-height:34px; display:flex; align-items:baseline; gap:8px; padding:0 2px 8px; }
.ref-share-controls-heading strong { color:#334155; font-size:14px; }
.ref-share-controls-heading span { color:#94a3b8; font-size:11px; }
.ref-share-preview { --ref-share-preview-fade-inline:22px; --ref-share-preview-fade-bottom:20px; position:relative; min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; padding:20px 22px; border:1px solid #e2e8f0; border-radius:12px; background:#fff; }
.ref-share-preview > h2 { margin:0 0 12px; overflow:hidden; color:#334155; font-size:21px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.ref-share-preview-viewport { position:relative; min-height:0; flex:1; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; border-top:1px solid #edf1f5; scrollbar-width:thin; scrollbar-color:#cbd5e1 transparent; }
.ref-share-preview-viewport::-webkit-scrollbar { width:6px; }
.ref-share-preview-viewport::-webkit-scrollbar-track { background:transparent; }
.ref-share-preview-viewport::-webkit-scrollbar-thumb { border:2px solid transparent; border-radius:999px; background:#cbd5e1; background-clip:padding-box; }
.ref-share-preview .ref-share-preview-body { position:relative; inset:auto; min-height:92px; overflow:visible; padding:15px 3px 12px; color:#475569; font-size:15.5px; line-height:1.68; pointer-events:none; user-select:none; }
.ref-share-preview-plain { white-space:pre-wrap; overflow-wrap:anywhere; }
.ref-share-preview-body button[data-note-markdown-copy] { display:none !important; }
.ref-share-preview-body h1 { font-size:20px; }
.ref-share-preview-body h2 { font-size:17px; }
.ref-share-preview-faded::before,
.ref-share-preview-faded::after { content:''; position:absolute; left:var(--ref-share-preview-fade-inline); right:var(--ref-share-preview-fade-inline); bottom:var(--ref-share-preview-fade-bottom); height:112px; pointer-events:none; }
.ref-share-preview-faded::before { z-index:2; background:rgba(255,255,255,.06); -webkit-backdrop-filter:blur(7px); backdrop-filter:blur(7px); -webkit-mask-image:linear-gradient(to bottom,transparent 0%,rgba(0,0,0,.08) 18%,rgba(0,0,0,.42) 56%,#000 100%); mask-image:linear-gradient(to bottom,transparent 0%,rgba(0,0,0,.08) 18%,rgba(0,0,0,.42) 56%,#000 100%); }
.ref-share-preview-faded::after { z-index:3; background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,.06) 20%,rgba(255,255,255,.38) 58%,rgba(255,255,255,.88) 86%,#fff 100%); }
.ref-share-config-card,
.ref-share-created-card,
.ref-share-existing { border:1px solid #dfe6ee; border-radius:10px; background:#fff; }
.ref-share-config-card { padding:13px; }
.ref-share-field { display:flex; flex-direction:column; align-items:stretch; gap:7px; margin:0; color:#475569; font-size:12px; font-weight:800; }
.ref-share-expiry { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; }
.ref-share-expiry button { min-width:0; height:32px; display:flex; align-items:center; justify-content:center; padding:2px 4px; border:1px solid #dbe3ec; border-radius:7px; background:#fff; color:#64748b; font-size:11px; font-weight:750; cursor:pointer; }
.ref-share-expiry button:hover { border-color:#93c5fd; color:#2563eb; }
.ref-share-expiry button.active { border-color:#60a5fa; background:#eff6ff; color:#1d4ed8; }
.ref-share-expiry button:focus-visible,
.ref-share-switch:focus-visible,
.ref-share-save-default:focus-visible,
.ref-share-created-link button:focus-visible,
.ref-share-created-link a:focus-visible,
.ref-share-existing-actions button:focus-visible,
.ref-share-existing-actions a:focus-visible,
.ref-share-desktop-create:focus-visible,
.ref-share-workspace-footer button:focus-visible { outline:2px solid #60a5fa; outline-offset:1px; }
.ref-share-permissions { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin:10px 0 0; }
.ref-share-switch { width:100%; min-width:0; height:36px; display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0; padding:3px 8px 3px 10px; border:1px solid #e2e8f0; border-radius:8px; background:#fff; color:#475569; font-size:11.5px; line-height:1.2; font-weight:700; text-align:left; white-space:nowrap; cursor:pointer; }
.ref-share-switch:hover { border-color:#bfdbfe; }
.ref-share-switch i { flex:0 0 30px; width:30px; height:17px; display:block; padding:2px; border-radius:999px; background:#cbd5e1; transition:background-color .16s ease; }
.ref-share-switch i b { display:block; width:13px; height:13px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(15,23,42,.22); transform:translateX(0); transition:transform .16s ease; }
.ref-share-switch[aria-checked=true] i { background:#3b82f6; }
.ref-share-switch[aria-checked=true] i b { transform:translateX(13px); }
.ref-share-hint { margin:8px 2px 0; color:#b45309; font-size:10.5px; line-height:1.5; }
.ref-share-save-default { width:100%; height:32px; margin-top:10px; border:1px solid #dbe3ec; border-radius:7px; color:#475569; background:#f8fafc; font-size:11px; font-weight:750; cursor:pointer; }
.ref-share-save-default:hover { border-color:#93c5fd; color:#2563eb; background:#f3f8ff; }
.ref-share-created-card { margin:0 0 10px; padding:10px 11px; border-color:#c9e7d4; }
.ref-share-created-heading { display:flex; align-items:center; gap:8px; }
.ref-share-created-heading > span { width:21px; height:21px; flex:0 0 21px; display:flex; align-items:center; justify-content:center; border-radius:50%; color:#fff; background:#22a35a; font-size:12px; font-weight:900; }
.ref-share-created-heading > div { min-width:0; flex:1; display:flex; align-items:baseline; gap:7px; }
.ref-share-created-heading strong { font-size:12px; color:#237a49; }
.ref-share-created-heading small { color:#64856f; font-size:10px; }
.ref-share-created-link { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:5px; margin-top:7px; }
.ref-share-created-link code { min-width:0; height:28px; display:flex; align-items:center; overflow:hidden; padding:0 8px; border:1px solid #d6eadc; border-radius:6px; background:#fbfefc; color:#52715c; font:10.5px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; text-overflow:ellipsis; white-space:nowrap; }
.ref-share-created-link button,
.ref-share-created-link a,
.ref-share-existing-actions button,
.ref-share-existing-actions a { min-width:38px; height:28px; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; border:1px solid transparent; border-radius:6px; padding:3px 6px; background:transparent; color:#2563eb; font-size:10.5px; font-weight:800; line-height:1; text-decoration:none; cursor:pointer; }
.ref-share-created-link button:hover,
.ref-share-created-link a:hover,
.ref-share-existing-actions button:hover,
.ref-share-existing-actions a:hover { background:#eff6ff; }
.ref-share-existing { max-height:250px; overflow:auto; margin-top:10px; padding:4px 11px; scrollbar-width:thin; }
.ref-share-existing-heading { min-height:34px; display:flex; align-items:center; gap:8px; border-bottom:1px solid #edf1f5; }
.ref-share-existing-heading strong { flex:1; min-width:0; font-size:11.5px; color:#475569; }
.ref-share-existing-heading span { color:#94a3b8; font-size:10.5px; }
.ref-share-existing > p { margin:11px 0; font-size:11px; color:#94a3b8; }
.ref-share-existing-row { min-height:52px; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:9px; padding:6px 0; }
.ref-share-existing-row + .ref-share-existing-row { border-top:1px solid #edf1f5; }
.ref-share-existing-info { min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
.ref-share-existing-info strong { color:#475569; font-size:11px; }
.ref-share-existing-info small { min-width:0; display:flex; align-items:center; gap:5px; overflow:hidden; color:#94a3b8; font-size:9.5px; }
.ref-share-existing-info small span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ref-share-existing-info small span + span::before { content:'·'; margin-right:5px; }
.ref-share-existing-actions { display:flex; gap:1px; }
.ref-share-existing-actions button.danger { color:#dc5555; }
.ref-share-desktop-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
.ref-share-desktop-create { width:100%; height:42px; display:flex; align-items:center; justify-content:center; gap:8px; border:1px solid transparent; border-radius:9px; color:#fff; background:#3b82f6; font-size:12px; font-weight:800; cursor:pointer; }
.ref-share-desktop-create:hover { background:#2563eb; }
.ref-share-desktop-image { border-color:#b9d7f7; color:#397fbd; background:#f6faff; }
.ref-share-desktop-image:hover { border-color:#8cbcec; color:#2563eb; background:#edf6ff; }
.ref-share-desktop-create:disabled { opacity:.5; cursor:default; }
.ref-share-notice { position:fixed; left:50%; bottom:18px; z-index:20003; width:max-content; margin:0; padding:8px 13px; max-width:calc(100% - 28px); overflow:hidden; border:1px solid #e2e8f0; border-radius:9px; color:#334155; background:#fff; box-shadow:0 8px 24px rgba(15,23,42,.16); font-size:11px; font-weight:750; line-height:1.25; white-space:nowrap; text-overflow:ellipsis; animation:ref-share-notice-in .16s ease-out both; }
@keyframes ref-share-notice-in { from { opacity:0; transform:translate(-50%,3px); } to { opacity:1; transform:translate(-50%,0); } }
.ref-share-workspace-footer { display:none; }
.ref-share-image-render-root { position:fixed; left:-10000px; top:0; z-index:-1; width:576px; min-height:420px; box-sizing:border-box; display:flex; flex-direction:column; padding:20px 20px 19px; overflow:visible; color:#334155; background:#fbfbf9; font-family:ui-sans-serif,system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; }
.ref-share-image-frame { position:relative; min-height:330px; box-sizing:border-box; padding:36px 40px 32px; background:transparent; }
.ref-share-image-render-root[data-note-share-image-style="double"] .ref-share-image-frame { border:1px solid #8fbee9; box-shadow:none; }
.ref-share-image-render-root[data-note-share-image-style="double"] .ref-share-image-frame::after { inset:4px; display:block; width:auto; height:auto; border:1px solid #a9cff2; }
.ref-share-image-frame::before,.ref-share-image-frame::after { content:""; position:absolute; display:none; width:25px; height:25px; box-sizing:border-box; pointer-events:none; }
.ref-share-image-render-root[data-note-share-image-style="corner"] .ref-share-image-frame { border:1px solid #d3e2f0; box-shadow:none; }
.ref-share-image-render-root[data-note-share-image-style="corner"] .ref-share-image-frame::before,.ref-share-image-render-root[data-note-share-image-style="corner"] .ref-share-image-frame::after { display:block; }
.ref-share-image-render-root[data-note-share-image-style="corner"] .ref-share-image-frame::before { left:-1px; top:-1px; border-left:3px solid #78aee7; border-top:3px solid #78aee7; }
.ref-share-image-render-root[data-note-share-image-style="corner"] .ref-share-image-frame::after { right:-1px; bottom:-1px; border-right:3px solid #78aee7; border-bottom:3px solid #78aee7; }
.ref-share-image-frame > header h1 { margin:0; color:#172033; font-size:34px; font-weight:800; line-height:1.35; overflow-wrap:anywhere; }
.ref-share-image-rule { height:1px; flex:0 0 1px; margin:18px 0 21px; background:#d9e5f1; }
.ref-share-image-body { position:relative; inset:auto; min-height:230px; overflow:visible; padding:0; color:#334155; font-size:20px; line-height:1.75; overflow-wrap:anywhere; }
.ref-share-image-plain { white-space:pre-wrap; word-break:break-word; }
.ref-share-image-render-root > footer { min-height:30px; display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:18px; margin-top:7px; padding:0 8px; color:#8aa0b8; font-size:13px; line-height:1.4; }
.ref-share-image-render-root > footer.without-username { grid-template-columns:minmax(0,1fr) auto; }
.ref-share-image-render-root > footer.without-username > time { justify-self:start; text-align:left; }
.ref-share-image-render-root > footer > span { min-width:0; height:30px; overflow:hidden; color:#6f879f; font-weight:600; line-height:30px; text-overflow:ellipsis; white-space:nowrap; }
.ref-share-image-render-root > footer > time { color:#8aa0b8; text-align:center; white-space:nowrap; }
.ref-share-image-render-root > footer small { font-size:13px; letter-spacing:.06em; }
.ref-share-image-render-root > footer small { justify-self:end; color:#6f91b4; font-weight:700; white-space:nowrap; }
.ref-share-image-render-root .note-markdown-view { position:relative; inset:auto; min-height:230px; overflow:visible; padding:0; color:#334155; font-size:20px; line-height:1.6; }
.ref-share-image-render-root .note-markdown-view h1,
.ref-share-image-render-root .note-markdown-view h2,
.ref-share-image-render-root .note-markdown-view h3,
.ref-share-image-render-root .note-markdown-view h4,
.ref-share-image-render-root .note-markdown-view h5,
.ref-share-image-render-root .note-markdown-view h6 { color:#172033; }
.ref-share-image-render-root .note-markdown-block-actions,
.ref-share-image-render-root button[data-note-markdown-copy] { display:none !important; }
.ref-share-image-render-root .note-markdown-code-block { border-color:#dbe3ec; background:#f8fafc; box-shadow:inset 0 1px 0 rgba(255,255,255,.7); }
.ref-share-image-render-root .note-markdown-code-block > pre,
.ref-share-image-render-root .note-markdown-view pre { overflow:hidden; border-color:#dbe3ec; color:#334155; background:#f8fafc; white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; }
.ref-share-image-render-root .note-markdown-view blockquote { color:#64748b; background:#eff6ff80; }
.ref-share-image-render-root .note-markdown-view code { background:#e2e8f0; }
.ref-share-image-render-root .note-markdown-view pre code { background:transparent; }
.ref-share-image-render-root .note-markdown-table-wrap { overflow:visible; }
.ref-share-image-render-root .note-markdown-table-wrap table { width:100%; min-width:0; table-layout:fixed; }
.ref-share-image-render-root .note-markdown-view th,
.ref-share-image-render-root .note-markdown-view td { border-color:#cbd5e1; white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
.ref-share-image-render-root .note-markdown-view th { background:#f1f5f9; }
.ref-share-image-render-root .note-markdown-view .note-markdown-task { margin-left:0; }
.ref-share-image-render-root .note-markdown-view .note-markdown-task label { align-items:flex-start; gap:10px; }
.ref-share-image-render-root .note-markdown-view .note-markdown-task-box { width:18px; height:18px; flex-basis:18px; margin-top:7px; }
.ref-share-image-render-root .note-markdown-math-block { overflow:hidden; }
.ref-share-image-render-root img { max-width:100%; height:auto; }
.dark .ref-share-workspace-page { color:#e2e8f0; background:#111b2b; }
.dark .ref-share-workspace-scroll { scrollbar-color:#475569 transparent; }
.dark .ref-share-workspace-scroll::-webkit-scrollbar-thumb { background:#475569; background-clip:padding-box; }
.dark .ref-share-workspace-header,
.dark .ref-share-workspace-footer { border-color:#334155; background:#172235; }
.dark .ref-share-workspace-icon { color:#93c5fd; background:#243b58; }
.dark .ref-share-workspace-settings:hover,
.dark .ref-share-workspace-settings[aria-pressed=true],
.dark .ref-share-workspace-close:hover { color:#bfdbfe; background:#27364a; }
.dark .ref-share-preview { border-color:#334155; background:#172235; }
.dark .ref-share-preview > h2,
.dark .ref-share-controls-heading strong { color:#e2e8f0; }
.dark .ref-share-preview-viewport { border-color:#334155; scrollbar-color:#475569 transparent; }
.dark .ref-share-preview-viewport::-webkit-scrollbar-thumb { background:#475569; background-clip:padding-box; }
.dark .ref-share-preview-body { color:#cbd5e1; }
.dark .ref-share-preview-faded::before { background:rgba(23,34,53,.08); }
.dark .ref-share-preview-faded::after { background:linear-gradient(to bottom,rgba(23,34,53,0) 0%,rgba(23,34,53,.08) 20%,rgba(23,34,53,.42) 58%,rgba(23,34,53,.9) 86%,#172235 100%); }
.dark .ref-share-config-card,
.dark .ref-share-existing { border-color:#334155; background:#172235; }
.dark .ref-share-expiry button,
.dark .ref-share-switch,
.dark .ref-share-save-default { border-color:#475569; background:#172235; color:#cbd5e1; }
.dark .ref-share-expiry button:hover,
.dark .ref-share-save-default:hover { border-color:#60a5fa; background:#20324a; color:#bfdbfe; }
.dark .ref-share-expiry button.active { border-color:#60a5fa; background:#1e3a5f; color:#bfdbfe; }
.dark .ref-share-created-card { border-color:#315e45; background:#172235; }
.dark .ref-share-created-heading strong { color:#86d6a8; }
.dark .ref-share-created-heading small,
.dark .ref-share-created-link code { color:#9bbba7; }
.dark .ref-share-created-link code { border-color:#315e45; background:#14291f; }
.dark .ref-share-existing-heading,
.dark .ref-share-existing-row + .ref-share-existing-row { border-color:#334155; }
.dark .ref-share-existing-heading strong,
.dark .ref-share-existing-info strong { color:#cbd5e1; }
.dark .ref-share-created-link button,
.dark .ref-share-created-link a,
.dark .ref-share-existing-actions button,
.dark .ref-share-existing-actions a { color:#bfdbfe; }
.dark .ref-share-created-link button:hover,
.dark .ref-share-created-link a:hover,
.dark .ref-share-existing-actions button:hover,
.dark .ref-share-existing-actions a:hover { background:#263e5e; }
.dark .ref-share-existing-actions button.danger { color:#fda4af; }
.dark .ref-share-notice { border-color:#475569; color:#e2e8f0; background:#253247; }
.dark .ref-share-desktop-image { border-color:#466582; color:#9ecbf2; background:#1d2d40; }
.dark .ref-share-desktop-image:hover { border-color:#6591ba; color:#bfdbfe; background:#243950; }

@media (min-width:900px) {
  .ref-share-workspace-content { max-width:1320px; }
  .ref-share-layout { height:100%; grid-template-columns:minmax(0,1.45fr) minmax(360px,.55fr); align-items:stretch; }
  .ref-share-preview { height:100%; }
  .ref-share-preview .ref-share-preview-body { padding:17px 4px 24px; }
  .ref-share-controls { max-height:100%; overflow:auto; padding-right:2px; }
}

@media (max-width:899px) {
  .ref-share-workspace-page { background:#fff; }
  .ref-share-workspace-header { min-height:54px; padding:7px 12px; }
  .ref-share-workspace-settings { display:flex; }
  .ref-share-workspace-scroll { position:relative; overflow:hidden; background:#fff; }
  .ref-share-workspace-content { padding:0; }
  .ref-share-layout { position:relative; display:block; height:100%; min-height:0; }
  .ref-share-preview { --ref-share-preview-fade-inline:20px; --ref-share-preview-fade-bottom:0px; width:100%; height:100%; box-sizing:border-box; padding:18px 20px 0; border:0; border-radius:0; background:#fff; }
  .ref-share-preview > h2 { margin-bottom:12px; font-size:20px; }
  .ref-share-preview-viewport { max-height:none; }
  .ref-share-preview .ref-share-preview-body { min-height:100%; padding:15px 2px 20px; font-size:15.5px; }
  .ref-share-controls { position:absolute; inset:0; z-index:4; display:none; overflow:auto; box-sizing:border-box; padding:16px 16px 28px; background:#f7f9fc; }
  .ref-share-workspace-page[data-settings-open=true] .ref-share-controls { display:block; animation:ref-share-settings-in .14s ease-out both; }
  .ref-share-controls-heading { padding-bottom:10px; }
  .ref-share-config-card { padding:13px; }
  .ref-share-existing { max-height:none; }
  .ref-share-desktop-actions { display:none; }
  .ref-share-workspace-footer { min-height:54px; flex:0 0 auto; display:flex; align-items:center; justify-content:center; gap:8px; padding:6px 12px calc(6px + env(safe-area-inset-bottom,0px)); border-top:1px solid #e2e8f0; background:#fff; }
  .ref-share-workspace-footer button.ref-share-create-button { width:auto; min-width:112px; height:42px; display:flex; align-items:center; justify-content:center; gap:7px; padding:0 15px; border:1px solid #b9d7f7; border-radius:11px; color:#397fbd; background:#f6faff; box-shadow:0 1px 2px rgba(37,99,235,.06); font-size:12px; font-weight:800; cursor:pointer; }
  .ref-share-workspace-footer button.ref-share-link-button { border-color:#8cbcec; color:#fff; background:#438fd0; }
  .ref-share-workspace-footer button.ref-share-create-button:hover { border-color:#8cbcec; color:#2563eb; background:#edf6ff; }
  .ref-share-workspace-footer button.ref-share-link-button:hover { border-color:#72aada; color:#fff; background:#347fbe; }
  .ref-share-workspace-footer button.ref-share-create-button:active { background:#e4f1ff; transform:translateY(1px); }
  .ref-share-workspace-footer button:disabled { opacity:.48; cursor:default; }
  .ref-share-notice { bottom:66px; }
  .dark .ref-share-workspace-page,
  .dark .ref-share-workspace-scroll,
  .dark .ref-share-preview { background:#172235; }
  .dark .ref-share-controls { background:#111b2b; }
  .dark .ref-share-workspace-footer button.ref-share-create-button { border-color:#466582; color:#9ecbf2; background:#1d2d40; box-shadow:none; }
  .dark .ref-share-workspace-footer button.ref-share-link-button { border-color:#5f8eb8; color:#e0f2fe; background:#2f628d; }
  .dark .ref-share-workspace-footer button.ref-share-create-button:hover { border-color:#6591ba; color:#bfdbfe; background:#243950; }
  @keyframes ref-share-settings-in { from { opacity:0; transform:translateX(7px); } to { opacity:1; transform:translateX(0); } }
}

.note-share-page { min-height:100dvh; overflow:auto; display:flex; align-items:center; justify-content:center; padding:24px; background:linear-gradient(145deg,#f1f5f9,#e8f1fb); color:#334155; font-family:ui-sans-serif,system-ui,-apple-system,sans-serif; }
.note-share-card { width:min(760px,100%); max-height:calc(100dvh - 48px); display:flex; flex-direction:column; overflow:hidden; border:1px solid rgba(255,255,255,.9); border-radius:24px; background:rgba(255,255,255,.94); box-shadow:0 20px 65px rgba(15,23,42,.13); }
.note-share-footer > button { flex-shrink:0; border:0; border-radius:10px; padding:9px 13px; background:#e8f1ff; color:#2563eb; font-size:13px; font-weight:800; cursor:pointer; }
.note-share-content { min-height:180px; flex:1; overflow:auto; margin:0 14px; padding:22px 10px 24px; outline:none; -webkit-overflow-scrolling:touch; touch-action:pan-y; }
.note-share-note-heading { margin:0 0 17px; padding:0 2px 14px; border-bottom:1px solid #e2e8f0; }
.note-share-note-heading h1 { margin:0; color:#334155; font-size:22px; line-height:1.35; overflow-wrap:anywhere; }
.note-share-meta { display:flex; flex-wrap:wrap; gap:5px 16px; margin-top:8px; color:#64748b; font-size:11.5px; }
.note-share-content > .note-markdown-view { position:relative; inset:auto; overflow:visible; min-height:100%; padding:0; }
.note-share-plain { white-space:pre-wrap; overflow-wrap:anywhere; font-size:15.5px; line-height:1.7; }
.note-share-copy-locked { user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.note-share-copy-locked .note-markdown-block-actions,
.note-share-copy-locked button[data-note-markdown-copy] { display:none !important; }
.note-share-footer { min-height:58px; display:flex; align-items:center; justify-content:flex-end; gap:14px; padding:10px 24px; border-top:1px solid #e2e8f0; }
.note-share-footer > span { flex:1; color:#64748b; font-size:12px; }
.note-share-footer > button { color:#fff; background:#3b82f6; }
.note-share-footer > button:disabled { opacity:.55; cursor:default; }
.note-share-state { padding:70px 24px; text-align:center; color:#64748b; }
.note-share-error { color:#b91c1c; }
.note-share-auth-backdrop { position:fixed; inset:0; z-index:20000; display:flex; align-items:center; justify-content:center; padding:16px; background:rgba(15,23,42,.38); backdrop-filter:blur(4px); }
.note-share-auth { width:360px; max-width:100%; display:flex; flex-direction:column; gap:10px; padding:18px; border-radius:20px; background:#fff; box-shadow:0 20px 65px rgba(15,23,42,.28); }
.note-share-auth-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:3px; }
.note-share-auth-tabs button { border:0; border-radius:9px; padding:9px; color:#64748b; background:#f1f5f9; font-weight:800; }
.note-share-auth-tabs button.active { color:#fff; background:#3b82f6; }
.note-share-auth > input,
.note-share-code input { min-width:0; width:100%; border:1px solid #dbe3ec; border-radius:10px; padding:11px 12px; outline:none; }
.note-share-auth > input:focus,
.note-share-code input:focus { border-color:#60a5fa; }
.note-share-code { display:flex; gap:7px; }
.note-share-code button { flex-shrink:0; border:0; border-radius:10px; padding:0 11px; color:#2563eb; background:#dbeafe; font-weight:700; }
.note-share-auth-error { color:#dc2626; font-size:12px; }
.note-share-auth-actions { display:flex; gap:8px; margin-top:4px; }
.note-share-auth-actions button { flex:1; border:0; border-radius:10px; padding:10px; color:#475569; background:#f1f5f9; font-weight:800; }
.note-share-auth-actions button:last-child { color:#fff; background:#3b82f6; }
@media (max-width:600px) {
  .ref-share-workspace-header { min-height:50px; padding:calc(7px + env(safe-area-inset-top,0px)) 10px 7px; }
  .ref-share-workspace-heading { align-items:flex-start; flex-direction:column; gap:0; }
  .ref-share-workspace-heading strong { font-size:14px; }
  .ref-share-workspace-heading span { width:100%; font-size:10.5px; }
  .ref-share-preview { --ref-share-preview-fade-inline:16px; padding:15px 16px 0; }
  .ref-share-preview > h2 { margin-bottom:9px; font-size:18px; }
  .ref-share-preview .ref-share-preview-body { padding:12px 1px 18px; font-size:15.5px; }
  .ref-share-preview-faded::before,
  .ref-share-preview-faded::after { height:104px; }
  .ref-share-controls { padding:14px 12px 24px; }
  .ref-share-config-card { padding:11px; }
  .ref-share-expiry { gap:4px; }
  .ref-share-expiry button { height:34px; padding:2px; font-size:10.5px; }
  .ref-share-permissions { grid-template-columns:1fr; gap:6px; margin-top:9px; }
  .ref-share-switch { height:38px; padding-left:11px; }
  .ref-share-created-link { grid-template-columns:1fr auto auto; }
  .ref-share-created-link code { grid-column:1 / -1; }
  .ref-share-existing { max-height:none; padding:6px 10px; }
  .ref-share-existing-row { grid-template-columns:minmax(0,1fr) auto; grid-template-rows:auto auto; align-items:center; gap:3px 8px; padding:9px 0; }
  .ref-share-existing-info { display:contents; }
  .ref-share-existing-info > strong { grid-column:1; grid-row:1; }
  .ref-share-existing-info small { grid-column:1 / -1; grid-row:2; align-items:center; flex-flow:row wrap; gap:2px 5px; line-height:1.35; }
  .ref-share-existing-info small span { max-width:100%; white-space:nowrap; }
  .ref-share-existing-info small span + span::before { display:inline; margin-right:5px; }
  .ref-share-existing-actions { grid-column:2; grid-row:1; width:auto; gap:0; overflow:hidden; border:1px solid #dbe7f5; border-radius:9px; background:#f4f8ff; }
  .ref-share-existing-actions button,
  .ref-share-existing-actions a { min-width:44px; height:32px; padding:3px 6px; border-radius:0; background:transparent; font-size:10.5px; }
  .ref-share-existing-actions > * + * { border-left:1px solid #dbe7f5; }
  .ref-share-workspace-footer { min-height:52px; padding:5px 12px calc(5px + env(safe-area-inset-bottom,0px)); }
  .ref-share-workspace-footer button.ref-share-create-button { min-width:108px; height:40px; padding:0 13px; }
  .ref-share-notice { bottom:62px; }
  .dark .ref-share-existing-actions { border-color:#3b506b; background:#22344d; }
  .dark .ref-share-existing-actions > * + * { border-left-color:#3b506b; }
  .note-share-page { height:100dvh; min-height:0; align-items:stretch; overflow:hidden; padding:0; background:#fff; }
  .note-share-card { width:100%; height:100%; max-height:none; min-height:0; border:0; border-radius:0; box-shadow:none; }
  .note-share-content { min-height:0; margin:0 8px; padding:10px 8px 18px; overflow-y:auto; }
  .note-share-note-heading { margin-bottom:14px; padding:6px 0 12px; }
  .note-share-note-heading h1 { font-size:19px; }
  .note-share-meta { gap:4px 12px; margin-top:7px; font-size:11px; }
  .note-share-footer { padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px)); }
}
/* Folder cards inherit the note card's dimensions and occupy only the existing list. */
[data-folder-reference] .ref-folder-card { background:#e9f5ff; border-color:#cce7fa; box-shadow:0 1px 2px rgba(15,23,42,.04); }
[data-folder-reference] .ref-folder-card:hover { border-color:#8fcaf0; background:#def0ff; }
[data-folder-reference] .ref-folder-card[data-selected=true] { border-color:#86c3ee; background:#def0ff; }
[data-folder-reference] .ref-folder-open { display:flex; align-items:flex-start; width:100%; padding:0 19px 0 0; text-align:left; background:none; border:0; }
[data-folder-reference] .ref-folder-glyph { color:#6c98bc; display:flex; margin-top:2px; margin-right:4px; flex-shrink:0; }
[data-folder-reference] .ref-folder-open:focus-visible { outline:2px solid #60a5fa; outline-offset:2px; border-radius:3px; }
[data-folder-reference] .ref-folder-empty-list { padding:16px 3px; text-align:center; font-size:11px; color:#94a3b8; }
[data-folder-reference] .ref-folder-empty-editor { margin:auto; padding:20px 12px; max-width:100%; text-align:center; font-size:13px; color:#94a3b8; overflow-wrap:anywhere; }
[data-folder-reference] .ref-folder-empty-editor button { margin-top:12px; padding:7px 12px; border-radius:8px; color:#4f7ea9; background:rgba(96,165,250,.09); }
[data-folder-reference] .ref-folder-feedback { position:absolute; right:10px; bottom:52px; padding:5px 8px; max-width:calc(100% - 20px); font-size:12px; color:#475569; background:#f1f5f9; border-radius:6px; z-index:300; pointer-events:none; }
.ref-folder-overlay { position:fixed; inset:0; z-index:12000; display:flex; align-items:center; justify-content:center; padding:16px; background:rgba(15,23,42,.2); font-family:ui-sans-serif,system-ui,sans-serif; color:#334155; }
.ref-folder-overlay-menu { background:transparent; }
.ref-folder-overlay-local { position:absolute; padding:12px; background:rgba(15,23,42,.3); backdrop-filter:blur(2px); border-radius:inherit; }
.ref-folder-overlay-local .ref-folder-dialog { width:288px; max-width:100%; max-height:100%; }
.ref-folder-dialog { width:320px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 32px); overflow:auto; box-sizing:border-box; background:#fff; border:1px solid #dbe3ec; border-radius:15px; box-shadow:0 12px 36px rgba(15,23,42,.16); padding:16px; outline:none; }
.ref-folder-overlay-local .ref-folder-dialog.ref-share-dialog { width:min(390px, calc(100% - 4px)); max-width:calc(100% - 4px); overflow:hidden; }
.ref-folder-popover { width:204px; padding:9px; border-radius:12px; }
.ref-folder-dialog-heading { display:flex; gap:8px; align-items:center; margin-bottom:9px; }
.ref-folder-dialog-heading strong { flex:1; min-width:0; font-size:14px; overflow-wrap:anywhere; }
.ref-folder-close { width:28px; height:28px; background:none; border:0; border-radius:7px; font-size:21px; font-weight:400; color:#94a3b8; }
.ref-folder-close:hover { background:#f1f5f9; }
.ref-folder-menu-actions > button { display:flex; gap:8px; align-items:center; width:100%; padding:9px 8px; border:0; border-radius:7px; text-align:left; font-size:12px; min-height:36px; background:none; color:inherit; }
.ref-folder-menu-actions > button > span:last-child:not(:first-child) { margin-left:auto; color:#94a3b8; }
.ref-folder-menu-actions > button:hover:not(:disabled) { background:#f1f5f9; }
.ref-folder-menu-rule { height:1px; background:#edf1f5; margin:5px -9px; }
.ref-folder-subtitle { font-size:12px; color:#94a3b8; line-height:1.6; margin:4px 0 10px; }
.ref-folder-field-label { display:block; margin:6px 0; font-size:13px; }
.ref-folder-name-input { display:block; box-sizing:border-box; width:100%; height:40px; padding:8px 10px; border:1px solid #cbd5e1; border-radius:8px; font-size:15px; background:#fff; color:inherit; outline:none; }
.ref-folder-name-input:focus { border-color:#60a5fa; box-shadow:0 0 0 2px #dbeafe; }
.ref-folder-dialog-footer { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.ref-folder-dialog-footer button { padding:9px 17px; font-size:13px; border:0; border-radius:8px; background:#f1f5f9; color:inherit; }
.ref-folder-dialog-footer .ref-folder-confirm-delete { color:#fff; background:#ef4444; }
.ref-folder-dialog-footer .ref-folder-primary { background:#3b82f6; color:white; }
.ref-folder-dialog button:disabled { opacity:.4; cursor:default; }
.ref-folder-dialog button:focus-visible { outline:2px solid #60a5fa; outline-offset:1px; }
.ref-folder-dialog .ref-folder-danger { color:#dc5555; }
.ref-folder-description { font-size:13px; line-height:1.8; color:#64748b; overflow-wrap:anywhere; }
.ref-folder-error { font-size:12px; line-height:1.6; color:#dc5555; margin-top:8px; }
.ref-folder-destinations { display:flex; flex-direction:column; gap:5px; max-height:min(320px, 50dvh); overflow-y:auto; overscroll-behavior:contain; padding-right:2px; }
.ref-folder-destinations button { display:flex; gap:9px; align-items:center; width:100%; min-height:43px; padding:8px 10px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:8px; text-align:left; color:#64748b; }
.ref-folder-destinations button > span { flex:1; color:#334155; font-size:13px; }
.ref-folder-destinations button small { color:#94a3b8; font-size:11px; }
.ref-folder-destinations button:hover:not(:disabled) { background:#eff6ff; border-color:#93c5fd; }
.dark [data-folder-reference] .ref-folder-card { background:#202d40; border-color:#3d4d64; }
.dark [data-folder-reference] .ref-folder-card:hover { background:#25354b; border-color:#6886ad; }
.dark [data-folder-reference] .ref-folder-card[data-selected=true] { background:#26394f; border-color:#7b98bd; }
.dark [data-folder-reference] .ref-folder-glyph { color:#94b2d7; }
.dark .ref-folder-dialog { background:#1e293b; border-color:#475569; color:#e2e8f0; }
.dark .ref-folder-menu-actions > button:hover:not(:disabled), .dark .ref-folder-close:hover, .dark .ref-folder-dialog-footer button { background:#334155; }
.dark .ref-folder-menu-rule { background:#334155; }
.dark .ref-folder-name-input { background:#0f172a; border-color:#475569; }
.dark .ref-folder-description { color:#cbd5e1; }
.dark .ref-folder-destinations button { background:#243247; border-color:#475569; }
.dark .ref-folder-destinations button > span { color:#e2e8f0; }
.dark .ref-folder-destinations button:hover:not(:disabled) { background:#304666; }
.dark .ref-folder-dialog-footer .ref-folder-primary { background:#3b82f6; }
@media (pointer:coarse) { .ref-folder-menu-actions > button { min-height:42px; } }

[data-folder-reference] .ref-folder-meta { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
[data-folder-reference] .ref-folder-delete { position:absolute; right:6px; top:50%; transform:translateY(-50%); display:flex; align-items:center; justify-content:center; width:26px; height:26px; padding:6px; border-radius:4px; color:#94a3b8; background:transparent; box-shadow:none; opacity:0; }
[data-folder-reference] .ref-folder-card:hover .ref-folder-delete, [data-folder-reference] .ref-folder-delete:focus-visible, [data-folder-reference] .ref-folder-delete-mobile { opacity:1; }
[data-folder-reference] .ref-folder-delete:hover { color:#ef4444; }
[data-folder-reference] .ref-folder-restore { right:30px; color:#22a55a; }
[data-folder-reference] .ref-folder-restore:hover { color:#168343; }
[data-folder-reference] .ref-folder-open-trash { padding-right:46px; }
.ref-folder-context { width:144px; padding:8px; }
.ref-folder-context .ref-folder-menu-actions { display:flex; flex-direction:column; gap:2px; }
.ref-folder-context .ref-folder-menu-actions > button { justify-content:center; font-size:12px; font-weight:700; padding:6px 4px; min-height:28px; line-height:16px; gap:6px; }
.ref-folder-context .ref-folder-pin { color:#d97706; }
.ref-folder-context .ref-folder-dissolve { color:#64748b; }
.ref-folder-context .ref-folder-recover { color:#16a34a; }
.ref-folder-color-label { font-size:12px; font-weight:700; line-height:16px; text-align:center; color:#64748b; padding:2px 0 6px; }
.ref-folder-colors { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; padding:0 4px 4px; justify-items:center; }
.ref-folder-colors button { width:18px; height:18px; padding:0; border-radius:50%; border:1px solid #0000001a; box-shadow:0 1px 2px #0000000d; }
.ref-folder-colors button:hover { transform:scale(1.15); }
.ref-folder-colors button[aria-pressed=true] { outline:1px solid #60a5fa; outline-offset:2px; }
.ref-folder-context .ref-folder-menu-rule { margin:4px -8px; }
.ref-note-context { max-height:calc(100dvh - 16px); overflow-y:auto; padding-top:6px; padding-bottom:6px; gap:2px; }
.ref-note-context > button { font-size:12px; line-height:16px; padding:6px 4px; min-height:28px; }
.ref-folder-delete-options { gap:6px; }
.ref-folder-delete-options button { flex:1; padding:9px 7px; white-space:nowrap; }
.ref-folder-dialog-footer .ref-folder-dissolve { color:#2563eb; background:#eff6ff; }
.dark [data-folder-reference] .ref-folder-delete { background:transparent; }
.dark .ref-folder-dialog-footer .ref-folder-dissolve { color:#93c5fd; background:#273b55; }
.dark .ref-folder-context .ref-folder-pin { color:#fcd34d; }
.dark .ref-folder-context .ref-folder-dissolve, .dark .ref-folder-color-label { color:#cbd5e1; }
.dark .ref-folder-dialog-footer .ref-folder-confirm-delete { background:#ef4444; color:#fff; }

.ref-double-dot-title { display:block; min-width:0; max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:clip; }
.ref-double-dot-title-input { display:block; width:100%; max-width:100%; overflow:hidden; white-space:nowrap; text-overflow:clip; }

.note-markdown-view { position:absolute; inset:0; overflow:auto; padding:1px 4px 16px 0; color:#334155; font-size:15.5px; line-height:1.6; overflow-wrap:anywhere; }
.dark .note-markdown-view { color:#cbd5e1; }
.note-markdown-view > :first-child { margin-top:0; }
.note-markdown-view h1,.note-markdown-view h2,.note-markdown-view h3,.note-markdown-view h4,.note-markdown-view h5,.note-markdown-view h6 { margin:.9em 0 .4em; color:#0f172a; font-weight:800; line-height:1.25; }
.dark .note-markdown-view h1,.dark .note-markdown-view h2,.dark .note-markdown-view h3,.dark .note-markdown-view h4,.dark .note-markdown-view h5,.dark .note-markdown-view h6 { color:#f1f5f9; }
.note-markdown-view h1 { font-size:1.65em; }.note-markdown-view h2 { font-size:1.4em; }.note-markdown-view h3 { font-size:1.2em; }.note-markdown-view h4 { font-size:1.08em; }.note-markdown-view h5 { font-size:1em; }.note-markdown-view h6 { font-size:.92em; }
.note-markdown-view p,.note-markdown-view ul,.note-markdown-view ol,.note-markdown-view blockquote,.note-markdown-view pre { margin:.55em 0; }
.note-markdown-view ul,.note-markdown-view ol { padding-left:1.5em; }.note-markdown-view ul { list-style:disc; }.note-markdown-view ol { list-style:decimal; }
.note-markdown-view blockquote { border-left:3px solid #93c5fd; padding:.34em .8em .46em; color:#64748b; background:#eff6ff80; line-height:1.5; }
.note-markdown-view blockquote > :first-child { margin-top:0; }
.note-markdown-view blockquote > :last-child { margin-bottom:0; }
.dark .note-markdown-view blockquote { color:#94a3b8; background:#17255455; }
.note-markdown-view code { border-radius:5px; background:#e2e8f0; padding:.12em .35em; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.9em; }
.dark .note-markdown-view code { background:#334155; }
.note-markdown-view pre { overflow:auto; border:1px solid #dbe3ec; border-radius:10px; background:#f8fafc; padding:9px 12px 11px; color:#334155; line-height:1.5; box-shadow:inset 0 1px 0 rgba(255,255,255,.7); }
.dark .note-markdown-view pre { border-color:#334155; background:#0f172a; color:#e2e8f0; box-shadow:none; }
.note-markdown-view pre code { background:transparent; padding:0; }
.note-markdown-copy-block { position:relative; max-width:100%; margin:.55em 0; }
.note-markdown-block-actions { display:flex; align-items:center; justify-content:flex-end; }
.note-markdown-copy-button { width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:7px; color:#64748b; background:rgba(255,255,255,.62); box-shadow:0 1px 2px rgba(15,23,42,.08); opacity:.58; cursor:pointer; transition:opacity .15s ease,color .15s ease,background-color .15s ease,transform .15s ease; }
.note-markdown-copy-button:hover,.note-markdown-copy-button:focus-visible { opacity:1; color:#2563eb; background:#fff; outline:none; transform:translateY(-1px); }
.note-markdown-copy-button svg { width:15px; height:15px; }
.note-markdown-copy-check { display:none; }
.note-markdown-copy-button[data-copy-state="copied"] { opacity:1; color:#16a34a; }
.note-markdown-copy-button[data-copy-state="copied"] .note-markdown-copy-icon { display:none; }
.note-markdown-copy-button[data-copy-state="copied"] .note-markdown-copy-check { display:block; }
.dark .note-markdown-copy-button { color:#94a3b8; background:rgba(15,23,42,.7); box-shadow:0 1px 2px rgba(0,0,0,.22); }
.dark .note-markdown-copy-button:hover,.dark .note-markdown-copy-button:focus-visible { color:#7dd3fc; background:#1e293b; }
.dark .note-markdown-copy-button[data-copy-state="copied"] { color:#4ade80; }
.note-markdown-code-block { overflow:hidden; border:1px solid #dbe3ec; border-radius:10px; background:#f8fafc; box-shadow:inset 0 1px 0 rgba(255,255,255,.7); }
.note-markdown-code-block > .note-markdown-block-actions { min-height:31px; padding:2px 5px; border-bottom:1px solid #e2e8f0; background:#f1f5f9; }
.note-markdown-view .note-markdown-code-block > pre { max-width:100%; margin:0; border:0; border-radius:0; box-shadow:none; }
.dark .note-markdown-code-block { border-color:#334155; background:#0f172a; box-shadow:none; }
.dark .note-markdown-code-block > .note-markdown-block-actions { border-bottom-color:#334155; background:#172033; }
.note-markdown-quote-block > .note-markdown-block-actions { position:absolute; top:4px; right:5px; z-index:1; }
.note-markdown-view .note-markdown-quote-block > blockquote { min-height:36px; margin:0; padding-right:42px; }
.note-markdown-view a { color:#2563eb; text-decoration:underline; text-underline-offset:2px; }.dark .note-markdown-view a { color:#7dd3fc; }
.note-markdown-view hr { margin:1em 0; border:0; border-top:1px solid #cbd5e1; }
.note-markdown-table-wrap { width:100%; max-width:100%; margin:.55em 0; overflow-x:auto; overscroll-behavior-inline:contain; touch-action:pan-x pan-y; }
.note-markdown-table-wrap table { display:table; width:100%; min-width:max(100%, calc(var(--note-markdown-columns, 1) * 76px)); border-collapse:collapse; table-layout:fixed; }
.note-markdown-view th,.note-markdown-view td { border:1px solid #cbd5e1; padding:5px 8px 7px; white-space:normal; overflow-wrap:anywhere; word-break:break-word; vertical-align:middle; text-align:left; line-height:1.45; }
.dark .note-markdown-view th,.dark .note-markdown-view td { border-color:#475569; }
.note-markdown-view th { background:#f1f5f9; font-weight:800; }.dark .note-markdown-view th { background:#1e293b; }
.note-markdown-view .note-markdown-task { list-style:none; margin-left:-1.25em; }
.note-markdown-view .note-markdown-task label { position:relative; display:flex; align-items:flex-start; gap:8px; cursor:pointer; }
.note-markdown-view .note-markdown-task input { position:absolute; width:1px; height:1px; margin:0; opacity:0; }
.note-markdown-task-box { width:16px; height:16px; flex:0 0 16px; display:grid; place-items:center; margin-top:5px; border:1.5px solid #94a3b8; border-radius:4px; color:#2563eb; background:transparent; }
.note-markdown-task-box svg { width:12px; height:12px; opacity:0; }
.note-markdown-view .note-markdown-task input:checked + .note-markdown-task-box { border-color:#6fa9e5; background:#eef6ff; }
.note-markdown-view .note-markdown-task input:checked + .note-markdown-task-box svg { opacity:1; }
.note-markdown-view .note-markdown-task input:focus-visible + .note-markdown-task-box { outline:2px solid #60a5fa; outline-offset:2px; }
.dark .note-markdown-task-box { border-color:#64748b; color:#93c5fd; }
.dark .note-markdown-view .note-markdown-task input:checked + .note-markdown-task-box { border-color:#60a5fa; background:#1e3a5f; }
.note-markdown-math-block { max-width:100%; overflow-x:auto; padding:.25em 0 .48em; line-height:1.45; }
.note-markdown-view .katex { vertical-align:.07em; }
.note-markdown-color-red { color:#dc2626; }.dark .note-markdown-color-red { color:#f87171; }
.note-markdown-color-orange { color:#c2410c; }.dark .note-markdown-color-orange { color:#fb923c; }
.note-markdown-color-yellow { color:#a16207; }.dark .note-markdown-color-yellow { color:#facc15; }
.note-markdown-color-green { color:#15803d; }.dark .note-markdown-color-green { color:#4ade80; }
.note-markdown-color-blue { color:#2563eb; }.dark .note-markdown-color-blue { color:#60a5fa; }
.note-markdown-color-purple { color:#7c3aed; }.dark .note-markdown-color-purple { color:#c084fc; }
.note-markdown-color-pink { color:#db2777; }.dark .note-markdown-color-pink { color:#f472b6; }
.note-markdown-color-gray { color:#64748b; }.dark .note-markdown-color-gray { color:#cbd5e1; }
.note-markdown-color-custom { color:var(--note-markdown-custom-color); }

@media (hover:none), (pointer:coarse) {
  .note-markdown-copy-button { width:32px; height:32px; opacity:.78; }
  .note-markdown-quote-block > .note-markdown-block-actions { top:3px; right:4px; }
  .note-markdown-view .note-markdown-quote-block > blockquote { padding-right:44px; }
}

@media (max-width:520px) {
  .desktop-single-pane-tab { min-width:30px; padding-left:0; padding-right:0; }
  .desktop-single-pane-tab:not([data-active="true"]) .desktop-single-pane-tab-label { display:none; }
  .desktop-single-pane-tab[data-active="true"] { flex-grow:1.35; }
}
