/* ClipboardNote web design layer. Loaded after noteweb-craft.css; page JS, ids and shared files stay untouched.
   Every rule starts with "html body" so it beats the same selector in clipboardnote.css by order. */

/* 1. Tokens ---------------------------------------------------------------- */
:root{
  --cn-ease: cubic-bezier(.2,.8,.2,1);
  --cn-ease-out: cubic-bezier(.4,0,1,1);
  --cn-fast: 140ms; --cn-mid: 240ms; --cn-slow: 320ms;
  --cn-vh: 100dvh;
  --cn-kb: 0px;
}
html body.theme-light{
  --nw-bg:#fff; --nw-sidebar:#f2f4f6; --nw-surface-2:#f2f4f6; --nw-line:#e5e8eb; --nw-line-strong:#d1d6db;
  --nw-text:#191f28; --nw-text-2:#4e5968; --nw-text-3:#6b7684; --nw-placeholder:#7c8694;
  --nw-danger:#d92c3b; --nw-danger-soft:#fdecee; --nw-success:#007f5f; --nw-success-soft:#e5f5f0;
  --nw-scrim:rgba(0,23,51,.4);
  --nw-shadow-pop:0 2px 4px rgba(2,32,71,.05),0 12px 32px rgba(2,32,71,.12);
  --nw-shadow-sheet:0 -8px 32px rgba(2,32,71,.12);
  --cn-page:#f2f4f6; --cn-card:#fff; --cn-field:#f2f4f6; --cn-field-focus:#fff; --cn-slide:#fff;
  --cn-tint-0:rgba(2,32,71,0); --cn-tint-1:rgba(2,32,71,.05); --cn-tint-2:rgba(2,32,71,.09);
  --cn-halo:0 6px 20px rgba(2,32,71,.14);
  --cn-slide-shadow:0 1px 3px rgba(2,32,71,.1);
  --cn-toast:#333d4b; --cn-on-toast:#fff;
  --cn-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7684' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html body.theme-dark{
  --nw-bg:#17171c; --nw-sidebar:#1f1f25; --nw-surface-2:#26262d; --nw-line:#2c2c35; --nw-line-strong:#3c3c47;
  --nw-text:#ececf0; --nw-text-2:#c3c3c9; --nw-text-3:#9e9ea6; --nw-placeholder:#85858e;
  --nw-danger:#f4858e; --nw-danger-soft:#3a2024; --nw-success:#6cc9b4; --nw-success-soft:#18302b;
  --nw-scrim:rgba(0,0,0,.6);
  --nw-shadow-pop:0 12px 32px rgba(0,0,0,.45);
  --nw-shadow-sheet:0 -8px 32px rgba(0,0,0,.4);
  --cn-page:#101013; --cn-card:#1f1f25; --cn-field:#2c2c35; --cn-field-focus:#17171c; --cn-slide:#3c3c47;
  --cn-tint-0:rgba(255,255,255,0); --cn-tint-1:rgba(255,255,255,.06); --cn-tint-2:rgba(255,255,255,.11);
  --cn-halo:0 6px 20px rgba(0,0,0,.5);
  --cn-slide-shadow:none;
  --cn-toast:#3c3c47; --cn-on-toast:#ececf0;
  --cn-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239e9ea6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html body.theme-light,html body.theme-dark{
  --nw-r-sm:6px; --nw-r-md:10px; --nw-r-lg:14px; --nw-r-xl:24px;
  --border-radius-small:10px; --border-radius-medium:14px; --border-radius-large:24px;
  --radius-sm:10px; --radius-md:14px; --radius-lg:24px;
}
html body{ -webkit-tap-highlight-color:transparent; }
html body :is(button,a,summary,label,[role=option],[role=tab],[role=menuitem],.note-item,.folder-content){ touch-action:manipulation; -webkit-touch-callout:none; }
html body :is(button,summary){ -webkit-user-select:none; user-select:none; }

/* 2. Press and bubble --------------------------------------------------------
   Same color fades in with its own alpha, so a press never passes through a darker frame.
   .is-pressed comes from cn-ui.js and holds a quick tap long enough to be seen, .is-held is a long press. */
html body :is(.icon-button,.formatting-action,.resource-toggle,.resource-add,.panel-inline-toggle.compact,.chip-button,.nw-panel__close,.nw-graph__center,.detail-color-clear,.preview-close,.preview-download,.preview-external,.trash-close,.toast-dismiss-button,.toolbar-customizer-move,.cn-grip){
  background-color:var(--cn-tint-0);
  border-color:transparent;
  border-radius:50%;
  box-shadow:0 0 0 0 var(--cn-tint-0);
  transition:background-color var(--cn-fast) var(--cn-ease),color var(--cn-fast) var(--cn-ease),box-shadow var(--cn-mid) var(--cn-ease),transform var(--cn-fast) var(--cn-ease),opacity var(--cn-fast) var(--cn-ease);
}
html body .resource-add{ border-radius:999px; }
html body .chip-button{ border-radius:50%; }
@media (hover:hover) and (pointer:fine){
  html body :is(.icon-button,.formatting-action,.resource-toggle,.resource-add,.panel-inline-toggle.compact,.chip-button,.nw-panel__close,.detail-color-clear,.preview-close,.preview-download,.preview-external,.trash-close,.toast-dismiss-button):hover:not(:disabled){ background-color:var(--cn-tint-1); color:var(--nw-text); }
  html body .icon-button.danger:hover:not(:disabled){ background-color:var(--nw-danger-soft); color:var(--nw-danger); }
}
html body :is(.icon-button,.formatting-action,.resource-toggle,.resource-add,.panel-inline-toggle.compact,.chip-button,.nw-panel__close,.detail-color-clear,.preview-close,.preview-download,.preview-external,.trash-close,.toast-dismiss-button,.cn-grip):is(:active,.is-pressed):not(:disabled){
  background-color:var(--cn-tint-2);
  box-shadow:0 0 0 4px var(--cn-tint-1);
  transform:scale(.92);
}
html body :is(.icon-button,.formatting-action,.resource-toggle,.resource-add,.panel-inline-toggle.compact,.chip-button,.nw-panel__close,.cn-grip).is-held:not(:disabled){
  box-shadow:0 0 0 8px var(--cn-tint-1),var(--cn-halo);
}
html body .icon-button[aria-pressed=true]{ background-color:var(--primary-soft); color:var(--primary-color); }

/* rows */
html body :is(.start-source-button,.nw-sample-entry,.start-settings-link,.sidebar-views .note-filter-chip,.workspace-nav-item,.folder-content,.sidebar-utility,.sidebar-file-button,.sidebar-backup-button,.sidebar-shortcuts,.trash-entry,.resource-file-row,.resource-linked-note,.link-note-option,.dropdown-content>*,.web-settings-links>button,.web-toolbar-customizer>summary,.nw-tray__item,.nw-graph__list button,.sync-toggle-row,.sync-action-button,.sync-overview-card){
  transition:background-color var(--cn-fast) var(--cn-ease),color var(--cn-fast) var(--cn-ease),box-shadow var(--cn-mid) var(--cn-ease),transform var(--cn-fast) var(--cn-ease);
}
html body :is(.start-source-button,.nw-sample-entry,.sidebar-views .note-filter-chip,.workspace-nav-item,.folder-content,.sidebar-utility,.sidebar-file-button,.sidebar-backup-button,.sidebar-shortcuts,.trash-entry,.resource-file-row,.resource-linked-note,.link-note-option,.dropdown-content>*,.web-settings-links>button,.web-toolbar-customizer>summary,.nw-graph__list button,.sync-action-button,.note-item){
  background-color:var(--cn-tint-0);
}
@media (hover:hover) and (pointer:fine){
  html body :is(.start-source-button,.nw-sample-entry,.sidebar-views .note-filter-chip,.workspace-nav-item,.folder-content,.sidebar-utility,.sidebar-file-button,.sidebar-backup-button,.sidebar-shortcuts,.trash-entry,.resource-file-row,.resource-linked-note,.link-note-option,.dropdown-content>*,.web-settings-links>button,.web-toolbar-customizer>summary,.nw-tray__item,.nw-graph__list button,.sync-action-button):hover{ background-color:var(--cn-tint-1); color:inherit; box-shadow:none; }
  html body #note-list .note-item:hover{ background-color:var(--cn-tint-1); }
}
html body :is(.start-source-button,.nw-sample-entry,.sidebar-views .note-filter-chip,.workspace-nav-item,.folder-content,.sidebar-utility,.sidebar-file-button,.sidebar-backup-button,.sidebar-shortcuts,.trash-entry,.resource-file-row,.resource-linked-note,.link-note-option,.dropdown-content>*,.web-settings-links>button,.web-toolbar-customizer>summary,.nw-tray__item,.nw-graph__list button,.sync-action-button):is(:active,.is-pressed),
html body #note-list .note-item:is(:active,.is-pressed){
  background-color:var(--cn-tint-2);
  transform:scale(.985);
}
html body :is(.start-source-button,.nw-sample-entry,.sidebar-views .note-filter-chip,.folder-content,.nw-tray__item,.sync-action-button).is-held,
html body #note-list .note-item.is-held{ box-shadow:0 0 0 4px var(--cn-tint-1),var(--cn-halo); }

/* filled and soft buttons */
html body :is(.dialog-button,.start-new,.start-resume,.start-discard,.primary-button,.button-primary,.secondary-button,.sidebar-new-note,.compose-button,.sync-auth-button,.sync-alert-button,.attachment-recovery-button,.nw-tray__actions button,.nw-seg button,.nw-panel__foot button,.nw-graph__card button,.note-tool-chip,.note-tag-filter-chip,.editor-lock-action,.detail-toggle-button,.toolbar-customizer-reset){
  transition:background-color var(--cn-fast) var(--cn-ease),color var(--cn-fast) var(--cn-ease),border-color var(--cn-fast) var(--cn-ease),box-shadow var(--cn-mid) var(--cn-ease),transform var(--cn-fast) var(--cn-ease);
}
html body :is(.dialog-button,.start-new,.start-resume,.primary-button,.button-primary,.secondary-button,.sidebar-new-note,.compose-button,.sync-auth-button,.sync-alert-button,.attachment-recovery-button,.nw-tray__actions button,.nw-panel__foot button,.nw-graph__card button,.note-tool-chip,.note-tag-filter-chip,.editor-lock-action,.detail-toggle-button,.toolbar-customizer-reset):is(:active,.is-pressed):not(:disabled){ transform:scale(.97); }
html body :is(.dialog-button,.start-new,.start-resume,.primary-button,.button-primary,.sidebar-new-note,.compose-button).is-held:not(:disabled){ box-shadow:0 0 0 4px var(--cn-tint-1),var(--cn-halo); }
html body :is(.dialog-button.primary,.start-new,.start-resume,.primary-button,.button-primary,.sidebar-new-note,.compose-button):is(:active,.is-pressed):not(:disabled){ background:var(--primary-strong); border-color:var(--primary-strong); }

/* 3. Landing --------------------------------------------------------------- */
html body #landing-page.start-screen{ background:var(--cn-page); height:var(--cn-vh); overflow:auto; overscroll-behavior:contain; }
html[data-nw-sample] body #landing-page.start-screen{ height:calc(var(--cn-vh) - var(--nw-sample-bar)); }
html body .landing-header{ height:64px; min-height:64px; }
html body .brand-mark{ border-radius:10px; background:var(--primary-color); color:var(--on-primary); box-shadow:none; }
html body .brand-mark .material-symbols-outlined{ width:20px; height:20px; }
html body .start-screen .landing-wrap .start-main{ width:min(440px,100%); margin:clamp(24px,8vh,88px) auto 40px; }
html body .start-screen .start-intro #welcome-title{ font:700 28px/1.3 var(--nw-font); letter-spacing:-.02em; margin:0 0 8px; }
html body .start-description{ font-size:15px; line-height:1.55; color:var(--nw-text-2); }
html body .start-workspace{ margin-top:24px; display:flex; flex-direction:column; gap:12px; }
html body .start-screen .start-new,
html body .start-workspace:has(.nw-sample-entry) .start-new,
html body .start-workspace:has(.start-recovery:not(.hidden)) .start-new,
html body .start-workspace:has(.nw-sample-entry):has(.start-recovery:not(.hidden)) .start-new{
  display:flex; justify-content:center; gap:8px; min-height:56px; padding:0 20px;
  border:0; border-radius:16px; background:var(--primary-color); color:var(--on-primary);
  font:600 16px/1 var(--nw-font); text-align:center;
}
@media (hover:hover) and (pointer:fine){
  html body .start-screen .start-new:hover,
  html body .start-workspace:has(.nw-sample-entry):has(.start-recovery:not(.hidden)) .start-new:hover,
  html body .start-workspace:has(.start-recovery:not(.hidden)) .start-new:hover{ background:var(--primary-strong); color:var(--on-primary); }
}
html body .start-screen .start-new .material-symbols-outlined{ color:inherit; }
html body .nw-sample-entry{ min-height:64px; padding:12px 16px; border:0; border-radius:16px; background-color:var(--cn-card); }
html body .nw-sample-entry::before{ background:var(--primary-color); }
html body .nw-sample-note,html body #landing-nas-helper,html body .start-connection-help p{ display:none; }
html body .start-local-notice{ margin:0; padding:0 4px; font-size:13px; color:var(--nw-text-3); }
html body .start-recovery{ padding:16px; border:0; border-radius:16px; background:var(--cn-card); }
html body .start-recovery .recovery-description,html body .start-recovery .recovery-warning,html body .start-recovery-actions{ margin-inline-start:26px; }
html body .start-resume{ min-height:44px; border-radius:12px; }
html body .start-discard{ min-height:44px; text-decoration:none; }
html body .start-backups{ margin-top:32px; }
html body .start-backups h2{ margin:0 0 12px 4px; font:600 14px/1.4 var(--nw-font); color:var(--nw-text-3); }
html body .start-source-grid{ border:0; border-radius:20px; background:var(--cn-card); padding:8px; gap:0; overflow:visible; }
html body .start-source-button{ min-height:64px; padding:10px 8px; grid-template-columns:40px minmax(0,1fr) 18px; border-radius:14px; background-color:var(--cn-tint-0); }
html body .start-source-button + .start-source-button{ border-top:0; }
html body .start-source-button .start-source-icon{ width:40px; height:40px; padding:10px; border-radius:50%; background:var(--primary-soft); color:var(--primary-color); }
html body .start-source-copy strong{ font:600 15px/1.4 var(--nw-font); }
html body .start-source-button .start-source-arrow{ transition:transform var(--cn-fast) var(--cn-ease); }
@media (hover:hover) and (pointer:fine){ html body .start-source-button:hover .start-source-arrow{ transform:translateX(2px); color:var(--nw-text-3); } }
html body .start-connection-help{ margin-top:8px; padding-inline:4px; }
html body .start-settings-link{ border-radius:10px; padding:0 8px; margin-inline-start:-8px; background-color:var(--cn-tint-0); }
html body .start-settings-link:hover{ text-decoration:none; background-color:var(--cn-tint-1); }
html body .start-drop-hint{ padding-inline:4px; }
@media (hover:none){ html body .start-drop-hint{ display:none; } }
html body .language-pill{ border:0; border-radius:999px; background-color:var(--cn-tint-1); transition:background-color var(--cn-fast) var(--cn-ease),transform var(--cn-fast) var(--cn-ease); }
html body .language-pill:is(:active,.is-pressed){ background-color:var(--cn-tint-2); transform:scale(.97); }
html body .landing-footer{ border-top:0; }
html body .ys-web,html body .ys-studio{ border-top:0; }
html body .start-new:active{ animation:none; }

/* 4. Shell --------------------------------------------------------------------
   The shell follows the visual viewport, so the keyboard shrinks it and never pushes the header. */
html body{ height:var(--cn-vh); }
html body #app-container{ height:var(--cn-vh); }
html[data-nw-sample] body #app-container{ height:calc(var(--cn-vh) - var(--nw-sample-bar)); }
html body .app-header{ flex:0 0 var(--nw-header-h); box-sizing:border-box; max-height:var(--nw-header-h); overflow:visible; }
html body .workspace-connection{ border:0; border-radius:999px; background-color:var(--cn-tint-1); }
html body .sync-status{ border-radius:999px; }
html body #left-panel{ border-right:0; background:var(--nw-sidebar); }
html body #note-browser-panel{ border-right:1px solid var(--nw-line); }
html body :is(.sidebar-new-note,.compose-button){ min-height:44px; border-radius:12px; }
html body :is(.workspace-nav-item,.sidebar-views .note-filter-chip,.folder-content){ border-radius:10px; }
html body .sidebar-utility{ border-radius:10px; }
html body .sidebar-workspace .workspace-avatar{ border:0; background:var(--primary-soft); color:var(--primary-color); border-radius:50%; }
/* one selection surface slides between items (cn-ui.js adds .cn-has-slide when it takes over) */
html body .cn-has-slide{ position:relative; }
html body .cn-slide{ position:absolute; left:0; top:0; z-index:0; pointer-events:none; border-radius:10px; background:var(--cn-slide); box-shadow:var(--cn-slide-shadow); opacity:0; will-change:transform; }
html body .cn-slide.is-on{ opacity:1; }
html body .cn-slide.is-moving{ transition:transform var(--cn-mid) var(--cn-ease),width var(--cn-mid) var(--cn-ease),height var(--cn-mid) var(--cn-ease),opacity var(--cn-fast) var(--cn-ease); }
html body .cn-has-slide>*:not(.cn-slide){ position:relative; z-index:1; }
html body .cn-has-slide :is(.note-filter-chip.active,.markdown-view-button.active,.markdown-view-button[aria-pressed=true],.resource-tab[aria-selected=true],.mobile-tab-button.active){ background-color:var(--cn-tint-0); box-shadow:none; }
html body #folder-list.cn-has-slide .folder-item.selected>.folder-content{ background-color:var(--cn-tint-0); box-shadow:none; }
html body #folder-list-container.cn-has-slide>.cn-slide{ border-radius:10px; }
html body .folder-item.selected>.folder-content{ border-radius:10px; }
html body :is(.note-filter-chip,.markdown-view-button,.resource-tab,.mobile-tab-button,.folder-content) .material-symbols-outlined{ transition:color var(--cn-fast) var(--cn-ease); }

/* note list */
html body .note-search-shell{ min-height:44px; border:0; border-radius:12px; background:var(--cn-field); transition:background-color var(--cn-fast) var(--cn-ease),box-shadow var(--cn-fast) var(--cn-ease); }
html body .note-search-shell:focus-within{ border:0; background:var(--cn-field-focus); box-shadow:inset 0 0 0 2px var(--primary-color); }
html body #note-list:not([data-view-type=GRID]):not([data-view-type=LARGE_GRID]){ padding:0 8px; }
html body #note-list:not([data-view-type=GRID]):not([data-view-type=LARGE_GRID]) .note-item{ padding:12px; border:0; border-radius:14px !important; background-color:var(--cn-tint-0); transition:background-color var(--cn-fast) var(--cn-ease),transform var(--cn-fast) var(--cn-ease),box-shadow var(--cn-mid) var(--cn-ease); }
html body #note-list:not([data-view-type=GRID]):not([data-view-type=LARGE_GRID]) .note-item::after,
html[data-ys-motion=on] body #note-list:not([data-view-type=GRID]):not([data-view-type=LARGE_GRID]) .note-item::before{ content:none; }
html body #note-list:not([data-view-type=GRID]):not([data-view-type=LARGE_GRID]) .note-item.selected{ background-color:var(--primary-soft) !important; border:0; }
html body #note-list:is([data-view-type=GRID],[data-view-type=LARGE_GRID]) .note-item{ border:1px solid var(--nw-line); border-radius:16px !important; }
html body #note-list:is([data-view-type=GRID],[data-view-type=LARGE_GRID]) .note-item.selected{ background:var(--primary-soft) !important; border-color:var(--primary-soft); }
html body .note-item-title{ font:600 15px/1.45 var(--nw-font); }
html body .note-item-snippet{ color:var(--nw-text-3); }
html body .note-tools-panel{ border:0; border-radius:16px; background:var(--nw-bg); box-shadow:var(--nw-shadow-pop); }
html body :is(.note-tool-chip,.note-tag-filter-chip){ min-height:36px; padding:0 12px; border:0; border-radius:999px; background:var(--cn-field); color:var(--nw-text-2); font:500 13px/1 var(--nw-font); }
html body :is(.note-tool-chip,.note-tag-filter-chip):is(.active,[aria-pressed=true]){ background:var(--primary-soft); color:var(--primary-color); font-weight:600; }
html body .cn-ghost-row{ position:absolute; margin:0; pointer-events:none; z-index:2; }
html body #note-sort-select,html body .note-sort-shell select{ border-radius:8px; }

/* 5. Editor -------------------------------------------------------------------- */
html body .markdown-view-switch{ position:relative; border:0; border-radius:12px; background:var(--cn-field); padding:4px; gap:0; }
html body .markdown-view-button{ min-height:32px; padding:0 12px; border-radius:9px; background-color:var(--cn-tint-0); color:var(--nw-text-3); transition:color var(--cn-fast) var(--cn-ease); }
html body :is(.markdown-view-button.active,.markdown-view-button[aria-pressed=true]){ background-color:var(--cn-slide); color:var(--nw-text); font-weight:600; box-shadow:var(--cn-slide-shadow); }
html body .markdown-view-switch .cn-slide{ border-radius:9px; }
html body .formatting-toolbar{ border:0; border-radius:14px; background:var(--cn-field); padding:4px; box-shadow:none; }
html body .formatting-action{ border-radius:10px; }
html body :is(.formatting-action):is(:active,.is-pressed):not(:disabled){ background-color:var(--cn-tint-2); box-shadow:none; transform:scale(.92); }
html body .save-note-button{ border-radius:999px; transition:background-color var(--cn-fast) var(--cn-ease),color var(--cn-fast) var(--cn-ease); }
html body .save-note-button .material-symbols-outlined{ transition:color var(--cn-fast) var(--cn-ease); }
html body .editor-lock-banner,html body #editor-lock-banner{ border:0; border-radius:14px; background:var(--cn-field); }
html body .editor-lock-action{ border-radius:10px; }
html body .resource-tabs{ position:relative; gap:0; }
html body .resource-tabs .cn-slide{ background:var(--cn-field); box-shadow:none; }
html body :is(.resource-tab,.resource-add,.resource-toggle){ background-color:var(--cn-tint-0); }
html body .resource-tab{ border-radius:10px; transition:color var(--cn-fast) var(--cn-ease); }
html body .resource-tab[aria-selected=true]{ background-color:var(--cn-field); }
html body .resource-count{ transition:background-color var(--cn-fast) var(--cn-ease); }
html body .resource-file-row,html body .resource-linked-note{ border-radius:12px; }
html body .resource-type-tile{ border:0; border-radius:10px; background:var(--cn-field); }
html body :is(.editor-footer,.editor-statusbar){ background:var(--nw-bg); }
html body .nw-sample-bar{ border-bottom:0; }

html body .is-closing{ pointer-events:none; }
/* 6. Dialogs, sheets, menus ------------------------------------------------------
   cn-ui.js keeps a closing overlay displayed for the exit, and clones native dialogs for theirs. */
html body .dialog-overlay{ top:0; bottom:auto; height:var(--cn-vh); box-sizing:border-box; transition:opacity var(--cn-mid) var(--cn-ease); }

html body .dialog-overlay.is-opening{ opacity:0; transition:none; }
html body .dialog-content{ border:0; border-radius:24px; padding:24px; box-shadow:var(--nw-shadow-pop); max-height:calc(var(--cn-vh) - 48px); animation:none !important; transition:transform var(--cn-slow) var(--cn-ease),opacity var(--cn-mid) var(--cn-ease); }
html body .dialog-overlay.is-opening .dialog-content{ transform:translateY(12px) scale(.98); opacity:0; transition:none; }
html body .drawer-overlay.is-opening .drawer-content{ transform:translateX(32px); }
html body .drawer-content{ height:var(--cn-vh); max-height:none; border-radius:24px 0 0 24px; }
html body .dialog-symbol,html body .dialog-emblem{ width:48px; height:48px; border-radius:50%; }
html body .dialog-content h2,html body .dialog-content h3{ font:700 20px/1.4 var(--nw-font); letter-spacing:-.01em; }
html body .dialog-button{ min-height:52px; min-width:88px; padding:0 20px; border-radius:14px; font:600 15px/1 var(--nw-font); }
html body .dialog-button.secondary{ border:0; background:var(--cn-field); color:var(--nw-text); }
html body .dialog-button.secondary:hover{ background:var(--cn-field); }
html body .dialog-buttons{ gap:8px; }
html body :is(.secondary-button,.sync-auth-button,.attachment-recovery-button,.toolbar-customizer-reset){ border:0; border-radius:12px; background:var(--cn-field); color:var(--nw-text); }
html body :is(.dialog-input,.dialog-select,.dialog-content input:not([type=checkbox]):not([type=color]):not([type=radio]),.detail-input,.dialog-content select,dialog input:not([type=checkbox]):not([type=color]):not([type=radio]),dialog select,dialog textarea,.dialog-content textarea,.nas-field input,.nas-field select,.link-editor-field input,.link-editor-field textarea){
  min-height:48px; box-sizing:border-box; padding-inline:14px; border:0; border-radius:12px; background-color:var(--cn-field); color:var(--nw-text); font-size:16px;
  box-shadow:inset 0 0 0 0 var(--primary-color);
  transition:background-color var(--cn-fast) var(--cn-ease),box-shadow var(--cn-fast) var(--cn-ease);
}
html body :is(.dialog-input,.dialog-select,.dialog-content input,.detail-input,.dialog-content select,dialog input,dialog select,dialog textarea,.dialog-content textarea,.nas-field input,.nas-field select,.link-editor-field input,.link-editor-field textarea):focus-visible{ background-color:var(--cn-field-focus); border:0; outline:none; box-shadow:inset 0 0 0 2px var(--primary-color); }
html body :is(.dialog-content select,dialog select,.detail-input:is(select),.dialog-select){ appearance:none; -webkit-appearance:none; padding-inline-end:36px; background-image:var(--cn-chevron); background-repeat:no-repeat; background-position:right 12px center; background-size:18px; }
html[dir=rtl] body :is(.dialog-content select,dialog select,.detail-input:is(select),.dialog-select){ background-position:left 12px center; }
html body :is(.field-label,.detail-label){ color:var(--nw-text-3); font:500 13px/1.5 var(--nw-font); }
html body :is(.detail-toggle-button){ min-height:48px; border:0; border-radius:12px; background:var(--cn-field); }
html body .detail-toggle-button[aria-pressed=true]{ background:var(--primary-soft); color:var(--primary-color); }
html body .detail-sidecard,html body .drawer-local-card,html body .sync-overview-card,html body .sync-alert-card{ border:0; border-radius:16px; background:var(--cn-field); box-shadow:none; }
html body .web-settings-section{ border:0; border-radius:0; background:transparent; padding:0; box-shadow:none; }
html body .web-settings-section h3{ font:600 14px/1.4 var(--nw-font); color:var(--nw-text-3); margin-bottom:8px; }
html body .web-settings-grid{ gap:24px; }
html body .web-setting-row small{ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
html body .web-setting-row{ min-height:56px; align-items:center; border:0; padding:4px 0; }
html body .web-setting-row strong{ font:500 15px/1.4 var(--nw-font); color:var(--nw-text); }
html body .web-setting-row :is(select,input[type=number]){ min-width:128px; }
html body .web-settings-links>button{ min-height:52px; border:0; border-radius:12px; color:var(--nw-text); }
html body .web-toolbar-customizer{ border:0; border-radius:14px; background:var(--cn-field); }
html body .web-toolbar-customizer>summary{ min-height:52px; border-radius:14px; }
/* switches */
html body :is(.switch-input,.switch-setting input[type=checkbox],.sync-toggle-row input[type=checkbox]){
  appearance:none; -webkit-appearance:none; flex:0 0 auto; width:48px; height:28px; margin:0; border:0; border-radius:14px; background:var(--nw-line-strong); position:relative; cursor:pointer;
  transition:background-color var(--cn-mid) var(--cn-ease);
}
html body :is(.switch-input,.switch-setting input[type=checkbox],.sync-toggle-row input[type=checkbox])::after{ content:""; position:absolute; top:2px; left:2px; width:24px; height:24px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(2,32,71,.2); transition:transform var(--cn-mid) var(--cn-ease); }
html body :is(.switch-input,.switch-setting input[type=checkbox],.sync-toggle-row input[type=checkbox]):checked{ background:var(--primary-color); }
html body :is(.switch-input,.switch-setting input[type=checkbox],.sync-toggle-row input[type=checkbox]):checked::after{ transform:translateX(20px); }
/* accent swatches */
html body .calm-swatch{ transition:box-shadow var(--cn-fast) var(--cn-ease),transform var(--cn-fast) var(--cn-ease); }
/* language menu and popovers */
html body .dropdown-content{ border:0; border-radius:16px; padding:8px; background:var(--nw-bg); box-shadow:var(--nw-shadow-pop); transform-origin:top right; transition:opacity var(--cn-fast) var(--cn-ease),transform var(--cn-mid) var(--cn-ease); }
html body .dropdown-content.is-opening{ opacity:0; transform:translateY(-6px) scale(.97); transition:none; }

html body .dropdown-content>*{ min-height:44px; border-radius:10px; }
html body .note-tools-panel.is-opening{ opacity:0; transform:translateY(-6px); transition:none; }
html body .note-tools-panel{ transition:opacity var(--cn-fast) var(--cn-ease),transform var(--cn-mid) var(--cn-ease); }

/* native dialogs */
html body :is(dialog.attachment-dialog,dialog.link-editor-dialog,dialog.attachment-preview-dialog,dialog.backup-progress-dialog,dialog.trash-dialog,dialog.resource-sheet,dialog.shortcuts-dialog,dialog.cn-dialog){ border:0; border-radius:24px; box-shadow:var(--nw-shadow-pop); }
html body dialog[open]{ animation:cn-dialog-in var(--cn-slow) var(--cn-ease) both !important; }
html body dialog[open]::backdrop{ animation:cn-fade-in var(--cn-mid) var(--cn-ease) both; }
html body dialog.trash-dialog[open]{ animation-name:cn-fade-in !important; }
html body .cn-ghost-dialog{ animation:cn-dialog-out var(--cn-mid) var(--cn-ease-out) both !important; pointer-events:none; z-index:2147483000; }
html body .cn-ghost-scrim{ position:fixed; inset:0; background:var(--nw-scrim); pointer-events:none; z-index:2147482999; animation:cn-fade-out var(--cn-mid) var(--cn-ease-out) both; }
@keyframes cn-dialog-in{ from{ opacity:0; translate:0 12px; scale:.98; } to{ opacity:1; translate:0 0; scale:1; } }
@keyframes cn-dialog-out{ from{ opacity:1; translate:0 0; scale:1; } to{ opacity:0; translate:0 8px; scale:.98; } }
@keyframes cn-fade-in{ from{ opacity:0; } to{ opacity:1; } }
@keyframes cn-fade-out{ from{ opacity:1; } to{ opacity:0; } }
/* toast */
html body .toast-card{ border-radius:16px; background:var(--cn-toast); color:var(--cn-on-toast); padding:12px 12px 12px 16px; }
html body .toast-message,html body .toast-card .material-symbols-outlined,html body .toast-card[data-tone] #toast-icon,html body #toast-dismiss-button,html body .toast-action{ color:var(--cn-on-toast); }
html body .toast-card{ transition:opacity var(--cn-mid) var(--cn-ease),transform var(--cn-mid) var(--cn-ease); }
html body .toast-card.is-opening{ opacity:0; transform:translateY(12px); transition:none; }


/* tray panel */
html body .nw-panel{ border:0; box-shadow:var(--nw-shadow-pop); }
html body .nw-panel button{ border:0; border-radius:10px; background-color:var(--cn-field); }
html body .nw-panel button:hover{ background-color:var(--cn-field); }
html body .nw-panel .nw-panel__close{ background-color:var(--cn-tint-0); border-radius:50%; }
html body .nw-tray__search{ border:0; border-radius:12px; background:var(--cn-field); min-height:44px; padding:8px 14px; transition:background-color var(--cn-fast) var(--cn-ease),box-shadow var(--cn-fast) var(--cn-ease); }
html body .nw-tray__search:focus{ outline:none; background:var(--cn-field-focus); box-shadow:inset 0 0 0 2px var(--primary-color); }
html body .nw-tray__item{ margin:0 8px; padding:12px; border:0; border-radius:14px; }
html body .nw-tray__item.nw-active{ background:var(--primary-soft); box-shadow:none; }
html body .nw-tray__actions button{ min-height:36px; }

/* drag handles and grips: same round press as every icon button */
html body .toolbar-customizer-handle,html body [class*=drag-handle],html body [class*=reorder-handle]{ border-radius:50%; background-color:var(--cn-tint-0); transition:background-color var(--cn-fast) var(--cn-ease),box-shadow var(--cn-mid) var(--cn-ease),transform var(--cn-fast) var(--cn-ease); }
html body :is(.toolbar-customizer-handle,[class*=drag-handle],[class*=reorder-handle]):is(:active,.is-pressed){ background-color:var(--cn-tint-2); box-shadow:0 0 0 4px var(--cn-tint-1); transform:scale(.92); }

/* height changes: cn-ui.js animates these from a measured height */
html body .cn-height{ overflow:hidden; }

/* theme change crossfades instead of cutting */
html.cn-theme-anim body,html.cn-theme-anim body *{ transition:background-color var(--cn-mid) linear,color var(--cn-mid) linear,border-color var(--cn-mid) linear !important; }

/* 7. Phone --------------------------------------------------------------------- */
@media (max-width:760px){
  html body .app-header .app-brand .brand-wordmark{ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  html body .app-header .web-badge{ display:none; }
  html body .app-header .header-right{ gap:0; }
  html body :is(.app-header .header-left,.app-header .header-right,.app-header .dropdown) .icon-button{ width:40px; height:40px; min-width:40px; }
  html body #note-title-input{ font-size:22px; }
  html body .editor-utility-bar{ min-height:48px; }
  html body .markdown-view-switch{ width:calc(100% - 32px); max-width:none; margin:4px 16px 8px; box-sizing:border-box; display:flex; }
  html body .markdown-view-button{ flex:1 1 0; justify-content:center; min-height:36px; }
  html body .start-screen .start-intro #welcome-title{ font-size:26px; }
  html body .start-screen .landing-wrap .start-main{ margin-top:16px; }
  /* bottom sheets */
  html body .dialog-overlay{ align-items:flex-end; padding:0; }
  html body .dialog-content{ width:100%; border-radius:24px 24px 0 0; padding:24px 20px calc(16px + env(safe-area-inset-bottom,0px)); max-height:calc(var(--cn-vh) - 32px); box-shadow:var(--nw-shadow-sheet); }
  html body .dropdown-content,html body #landing-language-menu{ animation:none; }
  html body .dialog-overlay.is-opening .dialog-content{ transform:translateY(40px); opacity:1; }
  html body .drawer-content{ border-radius:24px 24px 0 0; }
  html body .drawer-content{ height:calc(var(--cn-vh) - 32px); }
  html body .dialog-buttons{ margin-top:20px; }
  html body .web-settings-dialog{ border-radius:24px 24px 0 0 !important; }
  html body .mobile-tab-bar{ position:relative; }
  html body .mobile-tab-bar.cn-has-slide>.cn-slide{ background:var(--primary-soft); box-shadow:none; border-radius:16px; }
  html body .mobile-tab-bar.cn-has-slide .mobile-tab-button.active .material-symbols-outlined{ background:transparent; }
  html body .mobile-tab-button{ transition:color var(--cn-fast) var(--cn-ease),transform var(--cn-fast) var(--cn-ease); }
  html body .mobile-tab-button:is(:active,.is-pressed){ transform:scale(.94); }
  html body .mobile-tab-button .material-symbols-outlined{ background:transparent; transition:color var(--cn-fast) var(--cn-ease); }
  html body .nw-panel{ border-radius:24px 24px 0 0; border:0; }
  html body .note-tools-panel{ inset-inline:12px; max-height:calc(var(--cn-vh) - 200px); }
  html body #note-search-input,html body #note-sort-select{ font-size:16px; }
  html body #note-sort-select,html body .note-sort-shell select{ min-height:36px; }
  /* with the keyboard up the writing area takes every free pixel */
  html[data-cn-kb] body :is(.mobile-tab-bar,.resource-dock,.editor-statusbar,.editor-footer){ display:none !important; }
  html[data-cn-kb] body .toast-region{ bottom:12px; }
  html[data-cn-kb] body #editor-content .editor-note-meta{ display:none; }
  html[data-cn-kb] body :is(#note-content-textarea,.markdown-workspace,.markdown-editor-pane){ min-height:96px; }
  html[data-cn-kb] body .editor-heading{ padding-block:4px; min-height:0; }
  html[data-cn-kb] body #note-title-input{ font-size:18px; min-height:32px; }
  html[data-cn-kb] body .markdown-view-switch{ margin-block:2px 4px; }
  html[data-cn-kb] body .markdown-view-button{ min-height:30px; }
  /* the sheet's actions stay on screen above the keyboard */
  html[data-cn-kb] body .dialog-content>.dialog-buttons{ position:sticky; bottom:-16px; z-index:2; margin:12px -20px -16px; padding:12px 20px; background:var(--nw-bg); }
}
@media (min-width:761px){
  html body .dialog-overlay{ align-items:center; }
  html body .markdown-view-switch{ margin-top:8px; }
}

/* 8. Reduced motion ----------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  html body *,html body *::before,html body *::after{ transition:none !important; animation:none !important; }
}

/* 9. Fixes for rules that carry ids or higher specificity in the bundle ---------- */
html body #landing-page .nw-sample-entry{ background-color:var(--cn-card); }
@media (hover:hover) and (pointer:fine){ html body #landing-page .nw-sample-entry:hover{ background-color:var(--cn-card); box-shadow:inset 0 0 0 100px var(--cn-tint-1); } }
html body #landing-page .nw-sample-entry:is(:active,.is-pressed){ background-color:var(--cn-card); box-shadow:inset 0 0 0 100px var(--cn-tint-2); }
html body #new-note-modal #new-note-template-select{ min-height:48px; border:0; border-radius:12px; background-color:var(--cn-field); }
html body #new-note-modal #new-note-template-select:focus-visible{ background-color:var(--cn-field-focus); box-shadow:inset 0 0 0 2px var(--primary-color); }
html body .dropdown-action{ width:100%; padding:0 12px; border:0; color:var(--nw-text); font:500 14px/1.3 var(--nw-font); text-align:start; }
html body .dropdown-action.active{ color:var(--primary-color); font-weight:600; background-color:var(--primary-soft); }
html body .web-setting-row{ flex-direction:row; justify-content:space-between; align-items:center; gap:12px; }
html body .web-setting-row>span{ flex:1 1 auto; min-width:0; text-align:start; }
html body .web-setting-row :is(select,input[type=number]){ flex:0 0 auto; width:auto; max-width:56%; min-width:112px; }
html body .web-accent-label,html body .calm-field-label{ font:500 15px/1.4 var(--nw-font); color:var(--nw-text); margin:8px 0; }
html body .calm-swatches{ gap:8px; }
html body .calm-swatches>button{ min-height:48px; border:0; border-radius:12px; background-color:var(--cn-field); color:var(--nw-text-2); box-shadow:inset 0 0 0 0 var(--primary-color); transition:background-color var(--cn-fast) var(--cn-ease),box-shadow var(--cn-fast) var(--cn-ease),color var(--cn-fast) var(--cn-ease),transform var(--cn-fast) var(--cn-ease); }
html body .calm-swatches>button[aria-pressed=true]{ background-color:var(--primary-soft); color:var(--primary-color); font-weight:600; box-shadow:inset 0 0 0 2px var(--primary-color); }
html body .calm-swatches>button:is(:active,.is-pressed){ transform:scale(.97); }
html body .web-settings-footer{ border-top:0; gap:8px; }
html body .detail-dialog-header,html body .web-settings-header,html body .drawer-header{ border-bottom:0; }
html body .nas-editor-header,html body .nas-settings-form footer{ border:0; }
html body .nas-section,html body .nas-remember,html body .nas-panel .nas-remember{ border:0; border-radius:14px; }
html body .nas-remember{ background:var(--cn-field); }
html body .markdown-view-switch,html body #editor-toolbar,html body .editor-heading,html body .editor-note-meta,html body .formatting-toolbar{ flex-shrink:0; }

/* 10. Backup center, link editor, attachments ------------------------------------ */
html body .bc-provider-grid>.bc-provider,html body .bc-provider{ border:0; border-radius:20px; background:var(--cn-field); box-shadow:none; }
html body .bc-provider-grid>.bc-zip{ background:var(--cn-field); }
html body .bc-provider-icon{ border:0; border-radius:50%; background:var(--primary-soft); color:var(--primary-color); }
html body .bc-action{ min-height:48px; border:0; border-radius:12px; background:var(--nw-bg); color:var(--nw-text); transition:background-color var(--cn-fast) var(--cn-ease),transform var(--cn-fast) var(--cn-ease); }
html body .bc-action.export{ background:var(--primary-color); color:var(--on-primary); border:0; }
html body .bc-action:is(:active,.is-pressed):not(:disabled){ transform:scale(.97); }
html body .bc-settings-link{ border-radius:10px; }
html body .bc-auto,html body .bc-compat,html body .bc-recovery{ border:0; border-radius:16px; }
html body .link-editor-dialog,html body #link-editor-modal .dialog-content{ border:0; border-radius:24px; }
html body [data-link-tab]{ border:0; border-radius:9px; background-color:var(--cn-tint-0); transition:color var(--cn-fast) var(--cn-ease); }
html body .cn-has-slide>[data-link-tab].active{ background-color:var(--cn-tint-0); box-shadow:none; }
html body .link-note-option{ border:0; border-radius:12px; }
html body .resource-file-menu{ border:0; border-radius:16px; padding:8px; background:var(--nw-bg); box-shadow:var(--nw-shadow-pop); }
html body .resource-file-menu button{ border-radius:10px; background-color:var(--cn-tint-0); transition:background-color var(--cn-fast) var(--cn-ease); }
html body .resource-file-menu button:is(:active,.is-pressed){ background-color:var(--cn-tint-2); }
html body .resource-sheet{ border-radius:24px 24px 0 0; }
html body .sheet-grip{ border-radius:2px; background:var(--nw-line-strong); }
html body .shortcut-list>*{ border-color:var(--nw-line); }
html body .empty-list-state :is(.material-symbols-outlined,svg){ border-radius:50%; }
@media (max-width:760px){
  html body .formatting-toolbar .formatting-action{ width:44px; height:44px; min-width:44px; }
  html body #editor-toolbar .icon-button{ width:40px; height:40px; min-width:40px; padding:10px; }
}
@media (min-width:761px){ html body .toolbar-customizer-drag-handle{ width:32px; min-width:32px; height:32px; } }
@media (max-width:760px){
  /* the bundle's 260px floor pushed the dock under the tab bar on phones under 700px tall */
  html body #markdown-workspace,html body #note-content-textarea,html body .markdown-editor-pane{ min-height:96px; }
  html body #editor-content{ min-height:0; overflow-y:auto; overscroll-behavior:contain; }
}

/* 11. Second pass fixes */
html body .web-toolbar-customizer>summary{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 16px; list-style:none; }
html body .web-toolbar-customizer>summary::-webkit-details-marker{ display:none; }
html body .web-toolbar-customizer>:not(summary){ margin-inline:12px; }
html body .web-toolbar-customizer>p{ margin-block:0 8px; }
html body .web-toolbar-customizer>button{ margin-block:8px 12px; }
/* round when square, a pill when a label makes it wider: never an ellipse */
html body :is(.icon-button,.formatting-action,.resource-toggle,.resource-add,.panel-inline-toggle.compact,.chip-button,.nw-panel__close,.detail-color-clear,.preview-close,.preview-download,.preview-external,.trash-close,.toast-dismiss-button,.toolbar-customizer-drag-handle){ border-radius:999px; box-sizing:border-box; }
html body .formatting-action{ border-radius:10px; }
html body .icon-button:not(:has(>:not(.material-symbols-outlined):not(svg))){ aspect-ratio:1; min-height:0; padding:0; flex:0 0 auto; }
html body .icon-button:not(:has(>:not(.material-symbols-outlined):not(svg))) .material-symbols-outlined{ margin:0; }
html body .nas-close{ border:0; border-radius:999px; background-color:var(--cn-tint-0); }
html body :is(.nas-settings-form,.dialog-content) summary{ min-height:44px; display:flex; align-items:center; gap:8px; }
html body #new-folder-button,html body #delete-folder-button,html body #quick-new-note-button{ width:36px; height:36px; min-width:36px; }
@media (max-width:760px){
  html body :is(.app-header,#editor-toolbar,.panel-header,.detail-dialog-header,.web-settings-header,.drawer-header,.nw-panel__head,.trash-header) :is(.icon-button,.nw-panel__close){ width:40px; height:40px; min-width:40px; min-height:40px; }
  html body :is(#resources-toggle-button,#editor-add-attachment-button,.resource-tab){ min-height:40px; height:40px; }
  html body :is(#resources-toggle-button,#editor-add-attachment-button){ width:40px; min-width:40px; padding:0; justify-content:center; border-radius:999px; }
  html body #note-tools-toggle-button{ width:40px; height:40px; min-width:40px; }
  html body :is(.note-tag-chip,.note-tag-filter-chip){ min-height:36px; }
  html body .toolbar-customizer-control{ width:40px; height:40px; min-width:40px; border-radius:999px; }
  html body .sidebar-shortcuts,html body #web-toolbar-customizer-reset,html body #google-auth-button,html body #nas-settings-button{ min-height:44px; }
  html body .nw-sample-bar #nw-sample-export{ width:32px; height:32px; }
}

/* 12. Full review pass. :not(#_) only lifts specificity over bundle rules that carry ids. */
html body.theme-light{ --cn-sheet:#fff; }
html body.theme-dark{ --cn-sheet:#1f1f25; --cn-field:#2c2c35; --cn-field-focus:#17171c; }
html body{ --cn-pad:24px; }
@media (max-width:760px){ html body{ --cn-pad:20px; } }

/* selects, inputs, checkboxes: one control */
html body select:not(#note-sort-select):not(#_):not(#_){ appearance:none; -webkit-appearance:none; padding-inline:14px 36px; background-image:var(--cn-chevron); background-repeat:no-repeat; background-position:right 10px center; background-size:18px; }
html[dir=rtl] body select:not(#note-sort-select):not(#_):not(#_){ background-position:left 10px center; }
html body :is(.detail-input,.dialog-input,.dialog-content select,.dialog-content input:not([type=checkbox]):not([type=color]):not([type=radio]),dialog input:not([type=checkbox]):not([type=color]):not([type=radio]),dialog select,.nas-field input,.nas-field select):not(#_){ font:500 15px/1.3 var(--nw-font); color:var(--nw-text); }
@media (max-width:760px){ html body :is(.detail-input,.dialog-input,.dialog-content select,.dialog-content input:not([type=checkbox]):not([type=color]):not([type=radio]),dialog input:not([type=checkbox]):not([type=color]):not([type=radio]),dialog select,.nas-field input,.nas-field select):not(#_){ font-size:16px; } }
html body input::-webkit-calendar-picker-indicator{ opacity:.55; }
html body.theme-dark input::-webkit-calendar-picker-indicator{ filter:invert(1); }
html body :is(.dialog-content,.nas-settings-form) input:is([type=date],[type=time]){ min-width:0; width:100%; }
html body input[type=checkbox]:not(.switch-input):not(.switch-setting input):not(.sync-toggle-row input){ appearance:none; -webkit-appearance:none; flex:0 0 auto; width:22px; height:22px; margin:0; border:0; border-radius:7px; background:var(--cn-field); box-shadow:inset 0 0 0 1.5px var(--nw-line-strong); position:relative; cursor:pointer; transition:background-color var(--cn-fast) var(--cn-ease),box-shadow var(--cn-fast) var(--cn-ease); }
html body input[type=checkbox]:not(.switch-input):not(.switch-setting input):not(.sync-toggle-row input):checked{ background:var(--primary-color); box-shadow:none; }
html body input[type=checkbox]:not(.switch-input):not(.switch-setting input):not(.sync-toggle-row input)::after{ content:""; position:absolute; inset:3px; background:var(--on-primary); opacity:0; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center/contain no-repeat; transition:opacity var(--cn-fast) var(--cn-ease); }
html body input[type=checkbox]:not(.switch-input):not(.switch-setting input):not(.sync-toggle-row input):checked::after{ opacity:1; }
/* note colour: one round chip */
html body .detail-color-row{ display:flex; align-items:center; gap:8px; min-height:48px; padding:0 12px; border-radius:12px; background:var(--cn-field); }
html body .detail-color-row>.detail-color-input:not(#_){ appearance:none; -webkit-appearance:none; flex:0 0 auto; width:28px; min-width:28px; height:28px; min-height:28px; padding:0; border:0; border-radius:50%; background:none; box-shadow:none; overflow:hidden; }
html body .detail-color-input::-webkit-color-swatch-wrapper{ padding:0; }
html body .detail-color-input::-webkit-color-swatch{ border:0; border-radius:50%; }
html body .detail-color-input::-moz-color-swatch{ border:0; border-radius:50%; }
html body .detail-color-clear{ border:0; padding:0 8px; min-height:32px; border-radius:999px; background-color:var(--cn-tint-1); color:var(--nw-text-2); font:500 13px/1 var(--nw-font); }
/* disclosure rows use the same chevron */
html body details>summary{ list-style:none; cursor:pointer; }
html body details>summary::-webkit-details-marker{ display:none; }
html body :is(.nas-advanced,.nas-settings-form details)>summary{ display:flex; align-items:center; justify-content:space-between; min-height:44px; color:var(--nw-text-2); font:500 14px/1.3 var(--nw-font); border-radius:10px; }
html body :is(.nas-advanced,.nas-settings-form details)>summary::after{ content:""; flex:0 0 18px; height:18px; background:var(--cn-chevron) center/contain no-repeat; transition:transform var(--cn-mid) var(--cn-ease); }
html body :is(.nas-advanced,.nas-settings-form details)[open]>summary::after{ transform:rotate(180deg); }

/* every sheet: same head, same foot, nothing shows behind them */
html body .dialog-content,html body dialog.attachment-dialog,html body dialog.trash-dialog,html body dialog.resource-sheet{ background:var(--cn-sheet); }
html body .nw-sample-bar{ z-index:60; }
html body .dialog-content:is(.detail-dialog-content,.web-settings-dialog,.drawer-content):not(#_){ padding-block:0; padding-inline:var(--cn-pad); max-height:calc(var(--cn-vh) - 48px); }
html body :is(.detail-dialog-header,.web-settings-header,.drawer-header):not(#_){ position:sticky; top:0; z-index:3; display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 calc(var(--cn-pad) * -1) 8px; padding:20px var(--cn-pad) 12px; min-height:0; background:var(--cn-sheet); border:0; }
html body :is(.detail-dialog-header,.web-settings-header,.drawer-header) :is(h2,h3){ margin:0; font:700 20px/1.4 var(--nw-font); }
html body .web-settings-footer:not(#_){ position:sticky; bottom:0; z-index:3; display:flex; gap:8px; margin:24px calc(var(--cn-pad) * -1) 0; padding:12px var(--cn-pad) calc(16px + env(safe-area-inset-bottom,0px)); background:var(--cn-sheet); border:0; }
html body .web-settings-footer .dialog-button{ flex:1 1 0; }
html body .detail-dialog-content>:last-child{ padding-bottom:calc(20px + env(safe-area-inset-bottom,0px)); }
html body .nas-editor-header:not(#_){ align-items:center; gap:12px; border:0; }
html body .nas-editor-header h2{ margin:0; }
html body .bc-kicker,html body .nas-editor-header .bc-kicker{ display:none; }
html body :is(.nas-close,.trash-close,.preview-close,#close-note-details-button,[data-close-web-settings].icon-button,.link-editor-close,.shortcuts-dialog .icon-button):not(#_){ flex:0 0 auto; width:40px; height:40px; min-width:40px; padding:0; display:inline-flex; align-items:center; justify-content:center; border:0; border-radius:999px; background-color:var(--cn-tint-0); color:var(--nw-text-3); font-size:24px; line-height:1; box-shadow:0 0 0 0 var(--cn-tint-0); transition:background-color var(--cn-fast) var(--cn-ease),box-shadow var(--cn-mid) var(--cn-ease),transform var(--cn-fast) var(--cn-ease); }
html body :is(.nas-close,.trash-close,.preview-close,#close-note-details-button,[data-close-web-settings].icon-button,.link-editor-close,.shortcuts-dialog .icon-button):not(#_):is(:active,.is-pressed){ background-color:var(--cn-tint-2); box-shadow:0 0 0 4px var(--cn-tint-1); transform:scale(.92); }
html body :is(.nas-close,.trash-close,.preview-close,#close-note-details-button,[data-close-web-settings].icon-button,.shortcuts-dialog .icon-button):not(#_):focus-visible{ outline:2px solid var(--primary-color); outline-offset:0; }
html body .dialog-buttons:not(#_){ display:flex; align-items:stretch; gap:8px; }
html body .dialog-buttons .dialog-button:not(#_){ flex:1 1 0; height:52px; min-height:52px; margin:0; border:0; }
@media (min-width:761px){
  html body .dialog-buttons .dialog-button:not(#_),html body .web-settings-footer .dialog-button:not(#_){ flex:0 0 auto; height:44px; min-height:44px; min-width:88px; }
  html body .dialog-buttons:not(#_),html body .web-settings-footer:not(#_){ justify-content:flex-end; }
  html body .dialog-overlay:not(#_){ padding:24px; }
  html body .dialog-content:not(.drawer-content):not(#_){ max-height:calc(var(--cn-vh) - 48px); }
}
html body :is(.dialog-symbol,.dialog-emblem){ width:44px; height:44px; margin-bottom:12px; }
/* details grid: two even columns, no orphan */
html body .detail-grid:not(#_){ display:grid; grid-template-columns:1fr 1fr; gap:16px 12px; }
html body .detail-grid>*:not(#_){ grid-column:auto; min-width:0; }
html body .detail-grid>:is(:has(#editor-folder-select),.detail-field-wide):not(#_){ grid-column:1/-1; }
html body .detail-sidecard:not(#_){ padding:16px 0 0; border:0; border-radius:0; background:transparent; }
html body .detail-sidecars{ margin-top:16px; }
html body .detail-toggle-button:not(#_){ justify-content:flex-start; padding:0 14px; gap:8px; font:500 15px/1 var(--nw-font); color:var(--nw-text); }
html body .detail-dialog-content{ width:min(100%,560px); }

/* needless text stays for screen readers only */
html body :is(.nas-editor-body>p.nas-help:first-child,#new-folder-modal .dialog-intro,#new-folder-modal .dialog-content>p,#shortcuts-modal .dialog-content>p,#sync-center-modal .dialog-intro,.drawer-footnote,#web-history-scope-hint,.web-toolbar-customizer>p,.resource-section-label):not(#_){ position:absolute; width:1px; height:1px; margin:0; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (hover:none){ html body .nw-tray__keys{ display:none; } }

/* one gutter on the phone: text on 16px, fills inset on 8px */
@media (max-width:760px){
  html body #note-browser-panel:not(#_){ border-right:0; }
  html body .note-panel-section .panel-header:not(#_){ padding-inline:16px; }
  html body .note-search-shell:not(#_){ margin-inline:16px; }
  html body .note-summary-row:not(#_){ padding-inline:16px; }
  html body #note-list:not([data-view-type=GRID]):not([data-view-type=LARGE_GRID]) .note-item:not(#_){ padding-inline:8px; }
  html body .editor-heading:not(#_),html body .editor-note-meta:not(#_){ margin-inline:16px; padding-inline:0; }
  html body .editor-heading:not(#_){ padding-block:12px 4px; min-height:0; }
  html body #note-content-textarea:not(#_),html body .markdown-preview:not(#_){ padding-inline:16px; }
  html body .formatting-toolbar:not(#_){ margin-inline:16px; }
  html body .resource-header:not(#_){ padding-inline:8px; }
  html body .editor-statusbar:not(#_){ padding-inline:16px; }
  html body .app-header:not(#_){ padding-inline:8px; }
  html body .app-brand:not(#_){ margin-inline-start:8px; }
  html body dialog:is(.trash-dialog,.attachment-dialog):not(#_){ inset:auto 0 var(--cn-bottom,0px) 0; transform:none; margin:0; width:100%; max-width:none; max-height:calc(var(--cn-vh) - 32px); border-radius:24px 24px 0 0; }
}
/* writing surfaces show the caret, not a ring */
html body :is(#note-content-textarea,#note-title-input):focus-visible{ outline:none; box-shadow:none; }
html body #note-content-textarea{ word-break:keep-all; overflow-wrap:anywhere; }
html body #note-search-input:focus-visible{ outline:none; box-shadow:none; }
html body .note-search-shell:focus-within:not(#_){ box-shadow:inset 0 0 0 1.5px var(--primary-color); outline:none; }

/* editor head */
html body .editor-note-meta:not(#_){ display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; padding-block:0; min-height:24px; }
html body .editor-chip:not(#_)::before,html body .editor-chip:not(#_)::after{ content:none; }
html body #pin-note-button:not(#_)::after,html body #pin-note-button:not(#_)::before{ content:none; }
html body #pin-note-button:not(#_){ width:38px; min-width:38px; padding:0; }
html body .save-note-button:not(#_){ min-height:38px; }
/* tags: one chip everywhere */
html body .note-tag:not(#_){ padding:1px 6px; border:0; border-radius:6px; background:var(--cn-field); color:var(--nw-text-2); font-size:12px; line-height:1.5; white-space:nowrap; }
html body .note-item.selected .note-tag:not(#_){ background:var(--cn-sheet); color:var(--primary-color); }
html body :is(.note-tag-chip):not(#_){ display:inline-flex; align-items:center; gap:4px; min-height:36px; padding:0 12px; border:0; border-radius:999px; background:var(--cn-field); color:var(--nw-text-2); font:500 13px/1 var(--nw-font); transition:background-color var(--cn-fast) var(--cn-ease),color var(--cn-fast) var(--cn-ease),transform var(--cn-fast) var(--cn-ease); }
html body .note-tag-chip[aria-pressed=true]:not(#_){ background:var(--primary-soft); color:var(--primary-color); font-weight:600; }
html body .note-tag-chip:is(:active,.is-pressed){ transform:scale(.97); }
html body .note-tools-panel:not(#_){ inset-inline:16px; padding:16px; }
/* single-choice file filter is a segment */
html body #attachment-filter-group:not(#_){ position:relative; display:flex; gap:0; padding:4px; border-radius:12px; background:var(--cn-field); }
html body #attachment-filter-group .cn-slide{ border-radius:9px; }
html body #attachment-filter-group .note-tool-chip:not(#_){ flex:1 1 0; justify-content:center; min-height:32px; border-radius:9px; background:transparent; color:var(--nw-text-3); transition:color var(--cn-fast) var(--cn-ease),transform var(--cn-fast) var(--cn-ease); }
html body #attachment-filter-group .note-tool-chip.active:not(#_){ color:var(--nw-text); font-weight:600; }
/* sidebar */
html body #folder-list-container.cn-has-slide .folder-item.selected>.folder-content:not(#_){ background-color:var(--cn-tint-0); box-shadow:none; border-color:transparent; }
html body .folder-content:not(#_){ box-shadow:none; }
html body .trash-entry:not(#_){ margin-top:4px; padding:0 12px; gap:10px; min-height:40px; border-radius:10px; font:500 14px/1.4 var(--nw-font); color:var(--nw-text-2); }
html body .trash-entry svg{ width:18px; height:18px; color:var(--nw-text-3); }
html body .trash-entry[aria-expanded=true]:not(#_){ background-color:var(--cn-tint-1); color:var(--nw-text); }
html body .sidebar-backup-button:not(#_){ min-height:44px; border:0; border-radius:12px; background-color:var(--cn-tint-1); color:var(--nw-text); }
html body .sidebar-file-actions{ display:flex; gap:8px; }
html body .sidebar-file-button:not(#_){ flex:1 1 0; justify-content:center; min-height:40px; border:0; border-radius:10px; color:var(--nw-text-2); font:500 13px/1 var(--nw-font); }
@media (min-width:761px){ html body #left-panel :is(.note-filter-chip,.folder-content,.trash-entry):not(#_){ min-height:36px; } }
/* settings: value controls line up, rows are rows */
html body .web-setting-row :is(select,input[type=number]):not(#_){ flex:0 0 136px; width:136px; min-width:136px; max-width:136px; min-height:44px; }
html body .web-setting-row input[type=number]:not(#_){ padding-inline:14px; }
html body .web-setting-row:not(#_){ min-height:60px; padding:8px 0; border:0; }
html body .web-settings-grid:not(#_){ display:flex; flex-direction:column; gap:24px; }
html body .web-settings-section:not(#_){ display:block; }
html body .web-settings-section>h3:not(#_){ margin:0 0 4px; }
html body .calm-swatches:not(#_){ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:4px; margin-bottom:8px; }
html body .calm-swatches>button:not(#_){ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:72px; padding:8px 0; border:0; border-radius:14px; background-color:var(--cn-tint-0); color:var(--nw-text-3); font:500 12px/1.2 var(--nw-font); box-shadow:none; }
html body .calm-swatches>button[aria-pressed=true]:not(#_){ background-color:var(--cn-tint-0); color:var(--nw-text); font-weight:600; box-shadow:none; }
html body .calm-swatches>button:is(:active,.is-pressed):not(#_){ background-color:var(--cn-tint-1); }
html body .calm-swatch:not(#_){ width:28px; height:28px; border-radius:50%; box-shadow:0 0 0 0 var(--cn-sheet),0 0 0 0 var(--nw-text-3); transition:box-shadow var(--cn-mid) var(--cn-ease); }
html body .calm-swatches>button[aria-pressed=true] .calm-swatch:not(#_){ box-shadow:0 0 0 2px var(--cn-sheet),0 0 0 4px var(--nw-text); }
html body .web-settings-links:not(#_){ display:block; }
html body .web-settings-links>button:not(#_){ display:flex; align-items:center; justify-content:flex-start; gap:12px; width:calc(100% + 16px); min-height:52px; margin-inline:-8px; padding:0 8px; border:0; border-radius:12px; color:var(--nw-text); font:500 15px/1.3 var(--nw-font); text-align:start; }
html body .web-settings-links>button:not(#_)::after{ content:""; margin-inline-start:auto; flex:0 0 18px; height:18px; background:var(--cn-chevron) center/contain no-repeat; transform:rotate(-90deg); }
html[dir=rtl] body .web-settings-links>button:not(#_)::after{ transform:rotate(90deg); }
html body .web-settings-links>button .material-symbols-outlined{ color:var(--nw-text-3); }
html body .web-toolbar-customizer:not(#_){ margin-top:8px; border:0; border-radius:0; background:transparent; }
html body .web-toolbar-customizer>summary:not(#_){ min-height:60px; padding:0; border-radius:10px; color:var(--nw-text); font:500 15px/1.4 var(--nw-font); }
html body .web-toolbar-customizer>:not(summary):not(#_){ margin-inline:0; }
html body .toolbar-customizer-row:not(#_){ min-height:48px; padding:0; border:0; border-radius:10px; background:transparent; }
html body .toolbar-customizer-list:not(#_){ gap:0; }
html body .toolbar-customizer-label:not(#_){ font:500 14px/1.3 var(--nw-font); color:var(--nw-text); }
html body .toolbar-customizer-control:not(#_){ border:0; border-radius:999px; background-color:var(--cn-tint-0); transition:background-color var(--cn-fast) var(--cn-ease),transform var(--cn-fast) var(--cn-ease); }
html body .toolbar-customizer-control:disabled:not(#_){ opacity:.4; }
html body .toolbar-customizer-control[aria-pressed=true]:not(#_){ background-color:var(--primary-soft); color:var(--primary-color); }
html body .toolbar-customizer-control:is(:active,.is-pressed):not(:disabled):not(#_){ background-color:var(--cn-tint-2); transform:scale(.92); }
html body .toolbar-customizer-drag-handle .material-symbols-outlined:not(#_){ opacity:1; color:var(--nw-text-3); }
html body .toolbar-customizer-reset:not(#_){ min-height:44px; margin-block:12px 0; }
/* NAS sheet */
html body .nas-section:not(#_){ margin:0 0 20px; padding:0; border:0; }
html body .nas-section legend:not(#_){ padding:0; margin-bottom:12px; font:600 14px/1.4 var(--nw-font); color:var(--nw-text-3); }
html body .nas-field>span:not(#_){ font:500 13px/1.5 var(--nw-font); color:var(--nw-text-3); }
html body .nas-privacy:not(#_){ display:block; margin:8px 0 0; padding:14px; border:0; border-radius:14px; background:var(--cn-field); color:var(--nw-text-3); font-size:13px; line-height:1.55; }
html body .nas-remember:not(#_){ display:flex; align-items:center; gap:12px; min-height:44px; padding:0; border:0; background:transparent; color:var(--nw-text); font:500 14px/1.4 var(--nw-font); }
html body .nas-privacy>*:not(#_){ white-space:normal; writing-mode:horizontal-tb; }
html body .nas-url-preview:not(#_),html body .nas-settings-form blockquote:not(#_){ border:0; padding:0; }
html body .nas-remember>span:not(#_){ background:transparent; }
html body .nas-editor-footer:not(#_){ margin:0; border:0; background:var(--cn-sheet); }
html body .nas-settings-form:not(#_){ background:var(--cn-sheet); border:0; }
html body .nas-editor-body:not(#_){ background:transparent; }
/* landing and bars */
html body .landing-header-right .language-pill:not(#_){ height:36px; padding:0 14px; }
html body .landing-header-right .icon-button:not(#_){ width:40px; height:40px; min-width:40px; }
html body .web-badge:not(#_){ border:0; padding:3px 7px; border-radius:6px; background:var(--cn-tint-1); }
html body .landing-footer:not(#_){ display:flex; flex-wrap:wrap; align-items:center; gap:0 16px; margin-top:24px; }
html body .landing-footer .text-button,html body .landing-footer .nw-about-link{ min-height:40px; font:500 13px/1.4 var(--nw-font); }
html body .ys-web__in:not(#_),html body .ys-studio__in:not(#_){ gap:0 16px; padding:0; }
html body .ys-web :is(a,[aria-current=page]):not(#_),html body .ys-studio a:not(#_){ min-height:36px; }
html body .nw-sample-bar__exit:not(#_){ text-decoration:none; }
/* primaries always read */
html body :is(.compose-button,.sidebar-new-note,.dialog-button.primary,#empty-create-note-button,#nas-settings-save-button,.bc-action.export):not(:disabled):not(#_){ color:var(--on-primary); }
html body :is(.compose-button,.sidebar-new-note) kbd:not(#_){ color:inherit; background:transparent; border-color:currentColor; opacity:.7; }
/* language menu: current choice carries a check */
html body .dropdown-action:not(#_){ display:flex; align-items:center; justify-content:space-between; gap:8px; }
html body .dropdown-action.active:not(#_)::after{ content:""; flex:0 0 18px; height:18px; background:currentColor; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 13 4 4L19 7'/%3E%3C/svg%3E") center/contain no-repeat; }
html body :is(#language-dropdown,#landing-language-menu):not(#_){ margin-top:8px; max-height:min(420px,calc(var(--cn-vh) - 120px)); overflow-y:auto; overscroll-behavior:contain; }
/* quick copy tray */
html body .nw-panel__head:not(#_){ padding:12px 16px; gap:8px; }
html body .nw-tray__item:not(#_){ align-items:center; margin:0 8px; padding:12px 8px; }
html body .nw-tray__actions:not(#_){ flex:0 0 72px; gap:4px; }
html body .nw-panel .nw-tray__actions button:not(#_){ min-height:36px; padding:0 4px; font:500 13px/1 var(--nw-font); background-color:var(--cn-field); color:var(--nw-text); }
html body .nw-panel .nw-tray__item.nw-active .nw-tray__actions button:not(#_){ background-color:var(--cn-sheet); }
html body .nw-panel__foot:not(#_){ padding:8px 16px; border:0; }
html body .nw-tray__keys:not(#_){ padding:0 16px; }
html body .nw-tray__copy strong:not(#_){ font:600 15px/1.45 var(--nw-font); }
html body .nw-panel:not(#_){ background:var(--cn-sheet); }

/* sort: a quiet label over the real select, which keeps 16px so iOS does not zoom */
html body .note-sort-shell:not(#_){ position:relative; display:inline-flex; align-items:center; gap:6px; min-height:36px; margin-inline-start:auto; padding:0 8px; border-radius:10px; color:var(--nw-text-3); transition:background-color var(--cn-fast) var(--cn-ease); }
html body .note-sort-shell:is(:active,:focus-within){ background-color:var(--cn-tint-1); }
html body .cn-sort-label{ font:500 13px/1 var(--nw-font); white-space:nowrap; }
html body .note-sort-shell::after{ content:""; flex:0 0 14px; height:14px; background:var(--cn-chevron) center/contain no-repeat; }
html body .note-sort-shell.is-ready select:not(#_){ position:absolute; inset:0; width:100%; height:100%; opacity:0; font-size:16px; cursor:pointer; }
html body [data-link-text=eyebrow]:not(#_){ display:none; }
html body .note-summary-row:not(#_){ display:flex; align-items:center; justify-content:space-between; }
/* hover fills never touch text */
html body .web-toolbar-customizer>summary:not(#_){ margin-inline:-8px; padding-inline:8px; }
html body :is(.nas-advanced,.nas-settings-form details)>summary:not(#_){ margin-inline:-8px; padding-inline:8px; }
html body .nas-settings-form [id*=preview]:not(#_),html body .nas-settings-form [class*=preview]:not(#_){ border:0; padding-inline:0; }
html body .sidebar-file-button:not(#_){ white-space:nowrap; gap:6px; padding-inline:8px; font-size:12px; }
html body .empty-list-state :is(p,span):not(.material-symbols-outlined):not(#_){ font-size:14px; }
html body #pin-note-button:not(#_){ height:38px; min-height:38px; }
@media (max-width:760px){ html body #pin-note-button:not(#_){ width:40px; min-width:40px; height:40px; min-height:40px; } }
@media (min-width:761px){ html body #resources-toggle-button:not(#_){ width:36px; min-width:36px; height:36px; min-height:36px; padding:0; justify-content:center; } }

/* 13. Third review pass */
html body.theme-dark{ color-scheme:dark; }
html body.theme-light{ color-scheme:light; }
html body.theme-dark input::-webkit-calendar-picker-indicator{ filter:none; opacity:.8; }
/* scrollbars no longer reserve room, so inset fills stay symmetric */
html body :is(#note-list-container,#left-panel,#folder-list-container,.nw-tray__list):not(#_){ scrollbar-gutter:auto; scrollbar-width:thin; }
/* one sheet shape on the phone */
@media (max-width:760px){
  html body :is(#nas-settings-modal,#link-editor-modal,#sync-center-modal,#shortcuts-modal):not(#_){ align-items:flex-end; padding:0; }
  html body :is(.nas-settings-form,.link-editor-dialog,.shortcuts-dialog):not(#_){ width:100%; max-width:none; margin:0; border-radius:24px 24px 0 0; max-height:calc(var(--cn-vh) - 32px); }
  html body .drawer-content:not(#_){ max-height:calc(var(--cn-vh) - 32px); height:calc(var(--cn-vh) - 32px); border-radius:24px 24px 0 0; }
  html body .nw-panel.nw-tray:not(#_){ inset-block:auto 0; height:min(72dvh,560px); padding-bottom:env(safe-area-inset-bottom,0px); z-index:95; border-radius:24px 24px 0 0; }
  html body .cn-tray-scrim{ position:fixed; inset:0; z-index:94; background:var(--nw-scrim); opacity:0; pointer-events:none; transition:opacity var(--cn-mid) var(--cn-ease); }
  html body .cn-tray-scrim.is-on{ opacity:1; pointer-events:auto; }
  html[data-nw-sample] body .nw-sample-bar:not(#_){ z-index:60; }
}
@media (min-width:761px){ html body .cn-tray-scrim{ display:none; } }
/* grips here are not draggable, so they go */
html body .sheet-grip:not(#_){ display:none; }
html body .nw-panel:not(#_)::before{ content:none; }
/* same side padding from header to footer in every form sheet */
html body :is(.nas-editor-header,.nas-editor-body,.nas-editor-footer):not(#_){ padding-inline:var(--cn-pad); }
html body .nas-editor-header:not(#_){ padding-block:20px 12px; }
html body .nas-editor-body:not(#_){ padding-block:4px 16px; }
html body .nas-editor-footer:not(#_){ padding-block:12px calc(16px + env(safe-area-inset-bottom,0px)); justify-content:stretch; box-shadow:0 -1px 0 var(--nw-line); }
html body .nas-privacy .nas-help:not(#_){ margin:8px 0 0; padding:0; font-size:13px; line-height:1.55; }
html body #nas-url-preview:not(#_){ margin:12px 0; padding:0; border:0; font-size:13px; }
html body details.nas-help:not(#_){ margin:0; padding:0; border:0; }
/* one head: tile beside the title */
html body .dialog-content:has(>.dialog-emblem,>.dialog-symbol):not(#_){ display:block; }
html body .dialog-content>:is(.dialog-emblem,.dialog-symbol):not(#_){ float:left; width:40px; height:40px; margin:0 12px 12px 0; display:inline-flex; align-items:center; justify-content:center; }
html body .dialog-content>:is(.dialog-emblem,.dialog-symbol)+:is(h2,h3):not(#_){ margin:0 0 16px; line-height:40px; }
html body .dialog-content:has(>.dialog-emblem,>.dialog-symbol)>:not(:is(.dialog-emblem,.dialog-symbol)):not(:is(.dialog-emblem,.dialog-symbol)+*):not(#_){ clear:both; }
html body .trash-heading>svg:not(#_){ box-sizing:content-box; width:20px; height:20px; padding:10px; border-radius:50%; background:var(--cn-field); color:var(--nw-text-2); }
html body .trash-header:not(#_){ padding:16px var(--cn-pad) 8px; }
html body .trash-scroll:not(#_){ padding-inline:var(--cn-pad); margin:0; }
html body .trash-footer:not(#_){ display:none; }
html body .trash-empty:not(#_){ border:0; }
html body .link-editor-header:not(#_){ align-items:center; }
html body .link-editor-header h2:not(#_){ margin:0; }
html body .link-editor-header .icon-button:not(#_){ width:40px; height:40px; min-width:40px; border-radius:999px; }
html body .link-editor-empty:not(#_){ margin:0; padding:24px 0; border:0; background:transparent; color:var(--nw-text-3); font-size:14px; }
html body .link-editor-panel:not(#_){ min-height:0; }
html body .link-editor-footer:not(#_){ border:0; padding-top:12px; }
html body .link-editor-footer .dialog-button:not(#_){ height:52px; min-height:52px; border:0; flex:1 1 0; min-width:0; }
html body .link-editor-footer-spacer:not(#_){ display:none; }
@media (min-width:761px){ html body .link-editor-footer .dialog-button:not(#_){ height:44px; min-height:44px; flex:0 0 auto; min-width:88px; } html body .link-editor-footer:not(#_){ justify-content:flex-end; } }
html body .dialog-buttons:not(#_){ border:0; padding-top:0; }
html body :is(.dialog-buttons,.web-settings-footer,.link-editor-footer) .dialog-button:not(#_){ min-width:0; font:600 15px/1 var(--nw-font); }
@media (min-width:761px){ html body :is(.dialog-buttons,.web-settings-footer,.link-editor-footer) .dialog-button:not(#_){ min-width:88px; } }
html body .web-settings-footer:not(#_){ box-shadow:0 -1px 0 var(--nw-line); }
/* backup center */
html body .bc-body:not(#_){ padding:0; margin:0; }
html body .bc-provider-grid:not(#_){ display:grid; gap:12px; margin:0; padding:0; width:100%; }
html body .bc-provider-title h3:not(#_){ font:600 16px/1.4 var(--nw-font); margin:0; }
html body .bc-provider-caption:not(#_){ margin:0; text-transform:none; letter-spacing:0; font-size:13px; }
html body :is(.bc-provider-note,.bc-compat):not(#_){ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
html body .bc-provider-description:not(#_){ margin:8px 0 12px; font-size:13px; line-height:1.5; }
html body .bc-action:not(#_){ font:600 14px/1 var(--nw-font); }
html[lang^=en] body .bc-provider-caption:not(#_){ text-transform:none; }
/* secondary search fields carry the same icon */
html body{ --cn-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7684' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.8-3.8'/%3E%3C/svg%3E"); }
html body :is(.nw-tray__search,#link-note-search):not(#_){ background-image:var(--cn-search); background-repeat:no-repeat; background-position:left 14px center; background-size:18px; padding-inline-start:42px; }
html[dir=rtl] body :is(.nw-tray__search,#link-note-search):not(#_){ background-position:right 14px center; padding-inline:14px 42px; }
/* editor: one left edge */
@media (min-width:761px){
  html body :is(.editor-utility-bar,.resource-header,.editor-statusbar):not(#_){ padding-inline:max(32px,calc((100% - 720px)/2)); }
  html body .formatting-toolbar:not(#_){ margin-inline:max(32px,calc((100% - 720px)/2)); width:auto; }
}
html body .formatting-toolbar:not(#_){ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
html body .formatting-toolbar::-webkit-scrollbar{ display:none; }
html body .formatting-action:not(#_){ flex:0 0 auto; }
html body .formatting-separator:not(#_){ flex:0 0 1px; background:var(--nw-line-strong); }
@media (max-width:760px){
  html body .formatting-toolbar:not(#_){ width:auto; }
  html body .save-note-button:not(#_){ width:40px; height:40px; min-width:40px; min-height:40px; padding:0; justify-content:center; border-radius:999px; }
  html body .editor-utility-bar>*:not(.editor-path):not(#_){ gap:0; }
  html body .resource-header:not(#_){ min-height:52px; padding-block:6px; border-top:1px solid var(--nw-line); }
  html body .editor-statusbar:not(#_){ min-height:28px; border-top:0; }
  html body .note-panel-section .panel-header:not(#_){ padding-block:12px 8px; min-height:0; }
  html body .note-summary-row:not(#_){ padding-block:4px; min-height:0; border-bottom:0; }
}
html body #markdown-workspace #note-content-textarea:not(#_),html body #markdown-workspace .markdown-preview:not(#_){ padding-block:12px 24px; }
/* landing: one edge */
html body .start-backups h2:not(#_),html body .start-local-notice:not(#_),html body .start-connection-help:not(#_),html body .start-drop-hint:not(#_){ margin-inline:0; padding-inline:0; }
html body .start-settings-link:not(#_){ margin-inline-start:-8px; }
html body .language-pill[aria-expanded=true]:not(#_){ background-color:var(--cn-tint-2); }
/* sidebar: one row inset, one count edge */
html body :is(.note-filter-chip,.folder-content,.trash-entry,.workspace-nav-item):not(#_){ padding-inline:12px; }
html body .sidebar-backup-button:not(#_){ padding:0 12px; gap:10px; background-color:var(--cn-tint-0); color:var(--nw-text-2); font:500 14px/1.4 var(--nw-font); min-height:40px; }
html body .sidebar-file-button:not(#_){ background-color:var(--cn-tint-1); }
/* counts */
html body .browser-count:not(#_){ min-width:20px; padding:0 6px; border:0; border-radius:999px; background:var(--cn-field); text-align:center; line-height:20px; }
html body .resource-count:not(#_){ background:var(--nw-line-strong); }
html body.theme-light .resource-count:not(#_){ background:var(--nw-line); }
html body .resource-tab[aria-selected=true] .resource-count:not(#_){ background:var(--cn-sheet); }
/* resource rows: one layout */
html body .resource-linked-note:not(#_){ margin:0; padding:8px; border:0; border-radius:12px; background-color:var(--cn-tint-0); color:var(--nw-text); }
html body .resource-sheet .resource-header:not(#_){ border-top:0; }
html body #note-font-size-input::placeholder{ color:var(--nw-text); opacity:1; }
html body .note-tools-panel:not(#_){ background:var(--cn-sheet); inset-inline:auto; }
/* copy */
html body :is(.editor-status-tip,#web-history-scope-hint):not(#_){ position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
html body #note-details-panel>.detail-sidecard:not(#_){ color:var(--nw-text-3); font-size:13px; line-height:1.55; }
/* accent chips: compact, left aligned, dot under the label's edge */
html body .calm-swatches:not(#_){ grid-template-columns:repeat(5,60px); justify-content:start; margin-inline-start:-16px; }
html body #link-note-list:empty:not(#_){ display:none; }
html body .link-editor-empty:not(#_){ text-align:center; }
html body dialog.resource-sheet:not(#_){ overflow:hidden; border-radius:24px 24px 0 0; }
html body dialog.resource-sheet .resource-surface:not(#_){ border-radius:24px 24px 0 0; }
@media (min-width:761px){ html body dialog.resource-sheet:not(#_){ border-radius:24px; } }
html body .formatting-toolbar:not(#_){ justify-content:flex-start; }
/* the toolbar takes the column width and scrolls inside it; it must never size to its content */
html body .formatting-toolbar:not(#_):not(#_){ align-self:stretch; box-sizing:border-box; min-width:0; max-width:none; width:auto; }
/* counts sit at the row's end in either direction */
html body :is(.nav-count,.filter-chip-count,.folder-count):not(#_){ margin-left:0; margin-right:0; margin-inline-start:auto; }
/* NAS footer follows every other dialog */
html body .nas-editor-footer:not(#_):not(#_){ align-items:stretch; justify-content:flex-end; padding-block:16px calc(16px + env(safe-area-inset-bottom,0px)); }
html body .nas-settings-status:not(#_){ margin-inline-end:auto; align-self:center; }
/* the editor column always fits: the bundle's fixed floor is gone at every width */
html body #markdown-workspace,html body #note-content-textarea,html body .markdown-editor-pane{ min-height:96px; }
html body #editor-content:not(#_){ min-height:0; }
html body :is(.resource-dock,.editor-statusbar,.editor-footer):not(#_){ flex-shrink:0; }
@media (max-height:640px){
  html body #editor-content:has(.formatting-toolbar:not(.hidden)) :is(.editor-statusbar,.editor-footer):not(#_){ display:none; }
}
/* page footer: everything starts on one edge */
html body .ys-studio__in:not(#_){ justify-content:flex-start; }
html body .ys-studio__mark:not(#_){ margin-inline-end:0; margin-right:0; }
html body .ys-studio__copy:not(#_){ margin-inline-start:auto; margin-left:auto; }
@media (max-width:599px){ html body .ys-studio__copy:not(#_){ margin-inline-start:0; margin-left:0; } }
/* start point for a selection cross-fade after a list rebuild */
html body #note-list .note-item.selected.cn-fade-from:not(#_):not(#_):not(#_){ background-color:color-mix(in srgb,var(--primary-soft) 0%,transparent) !important; transition:none !important; }
html body #note-list .note-item.selected:not(#_){ transition:background-color 200ms var(--cn-ease),transform var(--cn-fast) var(--cn-ease),box-shadow var(--cn-mid) var(--cn-ease); }

/* 14. One highlight in the sidebar, warnings when they apply */
html body #left-panel[data-cn-hide-folder] .folder-item[data-folder-id=default]>.folder-content:not(#_):not(#_){ font-weight:500; color:var(--nw-text-2); }
html body #left-panel[data-cn-hide-folder] .folder-item[data-folder-id=default]>.folder-content .material-symbols-outlined:not(#_){ color:var(--nw-text-3); }
html body #left-panel[data-cn-hide-filter] .note-filter-chip[data-note-filter=all]:not(#_):not(#_){ font-weight:500; color:var(--nw-text-2); }
html body #left-panel[data-cn-hide-filter] .note-filter-chip[data-note-filter=all] .material-symbols-outlined:not(#_){ color:var(--nw-text-3); }
html body .nas-privacy:not(:has(#nas-remember-password:checked)) .nas-help:not(#_):not(#_){ position:absolute; width:1px; height:1px; margin:0; overflow:hidden; clip-path:inset(50%); }
html body .nas-privacy:not(:has(#nas-remember-password:checked)):not(#_):not(#_){ padding-block:0; padding-inline:14px; }
html body #note-details-panel:not(:has(:is(#lock-note-button,#note-dday-button,#note-habit-button)[aria-pressed=true]))>.detail-sidecard:not(#_){ position:absolute; width:1px; height:1px; margin:0; padding:0; overflow:hidden; clip-path:inset(50%); }
html body #note-details-panel:has(:is(#lock-note-button,#note-dday-button,#note-habit-button)[aria-pressed=true])>.detail-sidecard:not(#_){ animation:cn-fade-in var(--cn-mid) var(--cn-ease) both; }

/* formatting toolbar: wide pointers see every tool, touch scrolls with a fade cue */
@media (hover:hover) and (pointer:fine) and (min-width:761px){ html body #formatting-toolbar:not(#_):not(#_){ flex-wrap:wrap; overflow:visible; row-gap:2px; } }
html body #formatting-toolbar.has-more:not(#_):not(#_){ -webkit-mask:linear-gradient(to right,#000 calc(100% - 28px),transparent); mask:linear-gradient(to right,#000 calc(100% - 28px),transparent); }
html[dir=rtl] body #formatting-toolbar.has-more:not(#_):not(#_){ -webkit-mask:linear-gradient(to left,#000 calc(100% - 28px),transparent); mask:linear-gradient(to left,#000 calc(100% - 28px),transparent); }
/* long translated labels wrap inside the button */
html body .web-settings-footer .dialog-button:not(#_):not(#_){ white-space:normal; line-height:1.2; padding-inline:12px; min-width:0; }
