@charset "UTF-8";
:root {
  color-scheme:light;
  --paper:#faf8f3;
  --workspace:#f3f0e9;
  --card:#fffdf8;
  --ink:#2c322e;
  --muted:#747a70;
  --subtle:#93978e;
  --line:#e5e3d9;
  --accent:#ae5536;
  --accent-hover:#94472f;
  --accent-soft:#f3e2d6;
  --sage:#e4e9dc;
  --sage-ink:#52634b;
  --shadow:0 9px 28px #3e352008;
  --dialog-shadow:0 28px 100px #25271f24;
  --danger:#a53931;
  --focus:#a65335;
  --radius:14px;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  font-synthesis:none
}
:root[data-theme="dark"] {
  color-scheme:dark;
  --paper:#202622;
  --workspace:#181e1b;
  --card:#262e28;
  --ink:#f0eee5;
  --muted:#b2b8ac;
  --subtle:#9ca596;
  --line:#3c453d;
  --accent:#edaa83;
  --accent-hover:#f3bd9d;
  --accent-soft:#49392e;
  --sage:#354632;
  --sage-ink:#c6d5b9;
  --shadow:0 9px 28px #0000000d;
  --dialog-shadow:0 28px 100px #00000060;
  --danger:#f09c91;
  --focus:#edaa83
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  color:var(--ink);
  background:var(--workspace);
  font-size:14px;
  line-height:1.65;
  -webkit-font-smoothing:antialiased
}
button,input,select,textarea {
  font:inherit
}
button,a,input,textarea,select {
  -webkit-tap-highlight-color:transparent
}
button {
  cursor:pointer;
  color:inherit
}
button {
  border:0
}
a {
  color:inherit;
  text-decoration:none
}
button:disabled {
  cursor:wait;
  opacity:.55
}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:2px solid var(--focus);
  outline-offset:4px
}
input,select,textarea {
  color:var(--ink)
}
[hidden] {
  display:none!important
}
button,input,select,textarea {
  min-width:0
}
button {
  touch-action:manipulation
}
.app-shell {
  display:flex;
  min-height:100vh
}
.sidebar {
  width:244px;
  flex:0 0 244px;
  background:var(--paper);
  border-right:1px solid var(--line);
  padding:38px 22px 24px;
  display:flex;
  flex-direction:column;
  position:fixed;
  inset:0 auto 0 0;
  overflow-y:auto;
  z-index:20
}
.brand-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 12px 34px
}
.brand {
  display:flex;
  gap:13px;
  align-items:center
}
.brand-mark {
  font-family:Georgia,"Songti SC","SimSun",serif;
  display:grid;
  place-items:center;
  background:var(--accent);
  color:var(--paper);
  width:42px;
  height:45px;
  font-size:25px;
  border-radius:12px 4px 12px 4px;
  transform:rotate(-4deg)
}
.brand strong {
  font-size:25px;
  letter-spacing:5px;
  font-weight:600;
  line-height:1.2;
  display:block
}
.brand small {
  font-size:9px;
  letter-spacing:4.3px;
  display:block;
  margin-top:6px;
  color:var(--muted)
}
.new-note-button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  border-radius:9px;
  min-height:44px;
  background:var(--accent);
  color:var(--paper);
  font-weight:600;
  margin-bottom:29px;
  box-shadow:0 3px 6px #773e2520
}
.new-note-button:hover {
  background:var(--accent-hover)
}
.new-note-button>span {
  font-size:23px;
  font-weight:400;
  line-height:1
}
.new-note-button kbd {
  margin-left:auto;
  font-family:inherit;
  font-weight:400;
  font-size:11px;
  opacity:.75
}
.new-note-button {
  padding:8px 13px
}
.primary-nav {
  display:grid;
  gap:5px
}
.nav-item {
  display:flex;
  align-items:center;
  text-align:left;
  gap:12px;
  width:100%;
  padding:10px 14px;
  background:none;
  border-radius:8px;
  color:var(--muted);
  transition:background .15s,color .15s;
  min-height:43px
}
.nav-icon {
  font-size:20px;
  line-height:1;
  width:20px;
  text-align:center;
  font-weight:400
}
.nav-item:hover {
  background:var(--workspace);
  color:var(--ink)
}
.nav-item.is-active {
  background:var(--accent-soft);
  color:var(--accent);
  font-weight:600
}
.nav-count {
  margin-left:auto;
  font-size:11px;
  min-width:22px;
  text-align:right;
  font-variant-numeric:tabular-nums
}
.sidebar-section {
  margin-top:34px
}
.section-heading {
  padding:0 14px;
  margin-bottom:12px;
  font-size:11px;
  letter-spacing:2px;
  color:var(--muted);
  display:flex;
  justify-content:space-between
}
.section-hint {
  letter-spacing:0
}
.tag-list {
  display:grid;
  gap:2px
}
.tag-item {
  display:flex;
  align-items:center;
  gap:11px;
  background:none;
  padding:6px 14px;
  text-align:left;
  border-radius:7px;
  min-height:34px;
  color:var(--muted);
  font-size:12px
}
.tag-item:hover,.tag-item.is-active {
  background:var(--workspace);
  color:var(--accent)
}
.tag-item.is-active {
  font-weight:600
}
.tag-dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#aab39b;
  flex:none
}
.tag-item:nth-child(3n+2) .tag-dot {
  background:#d4a27d
}
.tag-item:nth-child(3n) .tag-dot {
  background:#b4adbf
}
.tag-name {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.tag-item .tag-number {
  margin-left:auto;
  font-size:10px;
  color:var(--subtle)
}
.muted-note {
  font-size:12px;
  color:var(--muted);
  padding:0 14px
}
.sidebar-footer {
  margin-top:auto;
  padding-top:32px
}
.sidebar-link {
  display:flex;
  align-items:center;
  gap:12px;
  background:none;
  font-size:12px;
  color:var(--muted);
  min-height:34px;
  padding:3px 14px;
  width:100%;
  text-align:left;
  border-radius:7px
}
.sidebar-link:hover {
  background:var(--workspace);
  color:var(--accent)
}
.sidebar-link>span {
  font-size:18px
}
.privacy-note {
  display:flex;
  align-items:center;
  gap:7px;
  font-size:10px;
  color:var(--muted);
  margin:20px 14px 0;
  letter-spacing:.3px
}
.privacy-dot {
  width:5px;
  height:5px;
  background:var(--sage-ink);
  border-radius:50%
}
.main-area {
  margin-left:244px;
  min-width:0;
  width:calc(100% - 244px)
}
.topbar {
  height:90px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 44px;
  gap:30px;
  background:var(--paper)
}
.search-wrap {
  display:flex;
  align-items:center;
  gap:10px;
  max-width:450px;
  flex:1;
  position:relative
}
.search-icon {
  font-size:25px;
  color:var(--muted);
  line-height:1;
  transform:rotate(-15deg)
}
.search-input {
  width:100%;
  border:0;
  background:none;
  font-size:12px;
  outline:none;
  padding:12px 3px;
  min-height:44px
}
.search-input::-webkit-search-cancel-button {
  display:none
}
.search-input::placeholder {
  color:var(--muted)
}
.search-shortcut {
  font-family:inherit;
  font-size:10px;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:4px;
  padding:1px 6px;
  white-space:nowrap
}
.clear-search {
  font-size:22px;
  background:none;
  color:var(--muted);
  padding:0 5px
}
.top-actions {
  display:flex;
  align-items:center;
  gap:23px
}
.connection-status {
  display:flex;
  gap:7px;
  align-items:center;
  font-size:10px;
  color:var(--muted);
  white-space:nowrap
}
.connection-status i {
  width:5px;
  height:5px;
  background:#879776;
  border-radius:50%
}
.connection-status.is-error i {
  background:var(--danger)
}
.icon-button {
  background:none;
  border-radius:7px;
  min-width:36px;
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:21px;
  color:var(--muted)
}
.icon-button:hover {
  background:var(--workspace);
  color:var(--ink)
}
.avatar-badge {
  display:inline-grid;
  place-items:center;
  background:var(--sage);
  color:var(--sage-ink);
  width:33px;
  height:33px;
  border-radius:50%;
  font-size:13px;
  cursor:default
}
.workspace {
  max-width:1450px;
  margin:0 auto;
  padding:43px 44px 56px
}
.workspace-heading {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:20px
}
.eyebrow {
  font-size:10px;
  letter-spacing:2px;
  color:var(--muted);
  margin:0 0 9px
}
.workspace h1 {
  font-size:31px;
  line-height:1.25;
  margin:0;
  font-weight:600;
  letter-spacing:2px
}
.page-subtitle {
  font-size:12px;
  color:var(--muted);
  margin:15px 0 0;
  letter-spacing:.3px
}
.workspace-tools {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:2px
}
.sort-control {
  font-size:10px;
  color:var(--muted);
  display:flex;
  gap:9px;
  align-items:center;
  white-space:nowrap
}
.sort-control select {
  appearance:none;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:7px;
  font-size:11px;
  padding:8px 29px 8px 11px;
  min-height:35px;
  cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='6' viewBox='0 0 9 6'%3E%3Cpath d='m1 1 3.5 3.5L8 1' fill='none' stroke='%23747a70' stroke-width='1.3'/%3E%3C/svg%3E");
  background-position:right 10px center;
  background-repeat:no-repeat
}
.filter-button {
  width:35px;
  height:35px;
  border:1px solid var(--line);
  background:var(--paper);
  border-radius:7px;
  font-size:19px;
  color:var(--muted)
}
.filter-button:hover {
  border-color:var(--accent);
  color:var(--accent)
}
.summary-strip {
  display:flex;
  gap:11px;
  align-items:center;
  font-size:10px;
  color:var(--muted);
  margin:27px 0 19px;
  letter-spacing:.2px
}
.summary-strip strong {
  font-weight:500;
  color:var(--ink)
}
.summary-separator {
  color:var(--subtle)
}
.notes-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:21px;
  align-items:stretch
}
.note-card {
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  min-height:277px;
  padding:22px 22px 16px;
  position:relative;
  display:flex;
  flex-direction:column;
  box-shadow:var(--shadow);
  transition:transform .2s,box-shadow .2s,border-color .2s;
  animation:enter .35s both
}
.note-card:hover {
  transform:translateY(-3px);
  box-shadow:0 10px 28px #3e352010;
  border-color:#cecebe
}
.note-card.is-pinned {
  background:var(--card);
  border-top:3px solid #bd8462;
  padding-top:20px
}
.card-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:15px;
  min-height:24px
}
.card-label {
  display:inline-flex;
  align-items:center;
  max-width:calc(100% - 30px);
  padding:3px 8px;
  background:var(--sage);
  color:var(--sage-ink);
  border-radius:4px;
  font-size:9px;
  letter-spacing:.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.note-card:nth-child(3n+2) .card-label {
  background:var(--accent-soft);
  color:var(--accent)
}
.note-card:nth-child(3n) .card-label {
  background:#e8e4ed;
  color:#6e617f
}
:root[data-theme="dark"] .note-card:nth-child(3n) .card-label {
  background:#3a3443;
  color:#d7c6eb
}
.card-pin {
  background:none;
  color:var(--subtle);
  width:28px;
  height:28px;
  border-radius:5px;
  padding:5px;
  display:grid;
  place-items:center
}
.card-pin.is-pinned {
  color:var(--accent)
}
.card-pin:hover {
  background:var(--accent-soft);
  color:var(--accent)
}
.card-pin svg {
  width:15px;
  height:15px
}
.card-title {
  margin:0 0 11px;
  font-size:17px;
  font-weight:600;
  line-height:1.6;
  letter-spacing:.1px;
  overflow-wrap:anywhere
}
.card-title-button {
  display:block;
  padding:0;
  text-align:left;
  background:none;
  font:inherit;
  line-height:inherit;
  color:inherit;
  width:100%
}
.card-title-button:hover {
  color:var(--accent)
}
.card-excerpt {
  font-size:11px;
  line-height:1.95;
  color:var(--muted);
  margin:0 0 19px;
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
  overflow-wrap:anywhere;
  white-space:pre-line
}
.card-tags {
  display:flex;
  flex-wrap:wrap;
  gap:5px 10px;
  margin-top:auto;
  padding-top:4px;
  margin-bottom:17px
}
.card-tag {
  font-size:9px;
  line-height:1.6;
  color:var(--muted);
  background:none;
  padding:0;
  text-align:left;
  max-width:100%;
  overflow-wrap:anywhere
}
.card-tag:hover {
  color:var(--accent)
}
.card-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-top:1px solid var(--line);
  padding-top:12px;
  gap:8px;
  font-size:9px;
  color:var(--muted);
  margin-top:auto
}
.card-meta {
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  flex-wrap:wrap
}
.card-archive-label {
  font-size:9px;
  background:var(--workspace);
  padding:1px 6px;
  border-radius:3px;
  white-space:nowrap
}
.card-source {
  display:inline-flex;
  align-items:center;
  color:var(--muted);
  max-width:110px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.card-source:hover {
  color:var(--accent)
}
.card-more {
  background:none;
  color:var(--muted);
  width:28px;
  height:25px;
  border-radius:5px;
  letter-spacing:1px;
  line-height:1;
  font-size:17px
}
.card-more:hover {
  background:var(--workspace);
  color:var(--ink)
}
.card-menu {
  position:absolute;
  right:15px;
  bottom:45px;
  min-width:144px;
  background:var(--paper);
  border:1px solid var(--line);
  box-shadow:0 7px 24px #23271e15;
  border-radius:9px;
  padding:5px;
  z-index:5
}
.card-menu button {
  display:flex;
  gap:10px;
  align-items:center;
  font-size:11px;
  padding:9px 10px;
  min-height:35px;
  border-radius:5px;
  background:none;
  width:100%;
  text-align:left
}
.card-menu button:hover {
  background:var(--workspace)
}
.card-menu button.danger {
  color:var(--danger)
}
.card-menu button:last-child {
  border-top:1px solid var(--line);
  border-radius:0;
  margin-top:3px;
  padding-top:11px
}
.card-menu svg {
  width:14px;
  height:14px;
  flex:none
}
.loading-state {
  padding:24px;
  text-align:center;
  font-size:12px;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px
}
.loader {
  border:2px solid var(--line);
  border-top-color:var(--accent);
  width:16px;
  height:16px;
  border-radius:50%;
  animation:spin .7s linear infinite
}
.notes-grid.is-loading {
  opacity:.45;
  pointer-events:none
}
.active-filters {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:23px
}
.filter-chip {
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
  font-size:11px;
  padding:4px 8px;
  color:var(--accent);
  max-width:100%;
  overflow-wrap:anywhere
}
.filter-chip button {
  background:none;
  font-size:15px;
  padding:0 2px
}
.empty-state {
  text-align:center;
  padding:70px 15px 90px
}
.empty-illustration {
  width:112px;
  height:118px;
  border:1px solid var(--line);
  border-radius:7px 20px 7px 7px;
  background:var(--paper);
  margin:0 auto 25px;
  transform:rotate(-7deg);
  position:relative;
  display:grid;
  place-items:center;
  color:var(--accent);
  font-size:34px;
  box-shadow:6px 7px 0 var(--accent-soft)
}
.empty-illustration span:nth-child(2) {
  position:absolute;
  right:20px;
  top:15px;
  font-size:23px
}
.empty-illustration span:last-child {
  position:absolute;
  left:22px;
  bottom:20px;
  font-size:15px
}
.empty-state h2 {
  font-size:20px;
  letter-spacing:1px;
  font-weight:500;
  margin:0 0 10px
}
.empty-state p {
  font-size:12px;
  color:var(--muted);
  margin:0 0 24px
}
.primary-button,.secondary-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:15px;
  min-height:40px;
  border-radius:7px;
  font-size:12px;
  padding:9px 17px;
  white-space:nowrap
}
.primary-button {
  background:var(--accent);
  color:var(--paper);
  border:1px solid var(--accent)
}
.primary-button:hover {
  background:var(--accent-hover);
  border-color:var(--accent-hover)
}
.secondary-button {
  background:var(--paper);
  border:1px solid var(--line);
  color:var(--muted)
}
.secondary-button:hover {
  color:var(--ink);
  border-color:var(--muted)
}
.primary-button.danger {
  background:var(--danger);
  border-color:var(--danger);
  color:var(--paper)
}
.modal-backdrop {
  position:fixed;
  inset:0;
  z-index:50;
  background:#24292070;
  backdrop-filter:blur(5px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  animation:fade .15s
}
.editor-panel {
  width:820px;
  max-width:100%;
  height:min(810px,calc(100dvh - 56px));
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:17px;
  box-shadow:var(--dialog-shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  animation:enter .2s
}
.editor-header {
  padding:25px 32px 21px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px
}
.editor-header .eyebrow {
  margin-bottom:5px
}
.editor-header h2 {
  font-size:21px;
  margin:0;
  font-weight:500;
  letter-spacing:1px
}
.close-button {
  font-size:28px;
  font-weight:300
}
.editor-panel form {
  display:flex;
  flex-direction:column;
  min-height:0;
  flex:1
}
.editor-scroll {
  overflow-y:auto;
  padding:25px 32px 21px;
  flex:1
}
.field-label {
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-bottom:9px
}
.required {
  color:var(--accent);
  margin-left:2px
}
.title-input {
  display:block;
  width:100%;
  border:0;
  border-bottom:1px solid var(--line);
  padding:7px 0 15px;
  background:none;
  font-size:22px;
  line-height:1.5;
  outline:none;
  border-radius:0;
  margin-bottom:25px
}
.title-input::placeholder {
  color:var(--subtle);
  font-weight:400
}
.field-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;
  margin-bottom:24px
}
.text-input {
  border:1px solid var(--line);
  border-radius:7px;
  background:var(--card);
  padding:9px 11px;
  font-size:11px;
  width:100%;
  height:39px
}
.text-input::placeholder {
  color:var(--subtle)
}
.content-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:9px
}
.content-heading .field-label {
  margin:0
}
.preview-toggle {
  font-size:10px;
  padding:4px 10px;
  border:1px solid var(--line);
  background:var(--card);
  border-radius:5px;
  color:var(--accent);
  min-height:30px
}
.preview-toggle:hover {
  border-color:var(--accent)
}
.content-input {
  resize:vertical;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--card);
  display:block;
  width:100%;
  min-height:280px;
  line-height:1.9;
  padding:17px 18px;
  font-size:13px;
  tab-size:2
}
.editor-hint {
  font-size:10px;
  color:var(--muted);
  line-height:1.7;
  margin:10px 0 0
}
.editor-footer {
  padding:17px 24px 17px 32px;
  border-top:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background:var(--paper);
  flex:none
}
.editor-footer-actions {
  display:flex;
  gap:10px
}
.editor-footer-left {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px
}
.save-status {
  font-size:10px;
  color:var(--muted)
}
.danger-link {
  background:none;
  color:var(--danger);
  font-size:11px;
  padding:7px 0
}
.danger-link:hover {
  text-decoration:underline
}
.markdown-preview {
  background:var(--card);
  border:1px solid var(--line);
  border-radius:8px;
  padding:19px 22px;
  min-height:280px;
  font-size:13px;
  line-height:1.95;
  overflow-wrap:anywhere
}
.markdown-preview>*:first-child {
  margin-top:0
}
.markdown-preview>*:last-child {
  margin-bottom:0
}
.markdown-preview h1,.markdown-preview h2,.markdown-preview h3,.markdown-preview h4,.markdown-preview h5,.markdown-preview h6 {
  font-weight:600;
  line-height:1.5;
  letter-spacing:.5px;
  margin:1.3em 0 .65em
}
.markdown-preview h1 {
  font-size:25px
}
.markdown-preview h2 {
  font-size:21px
}
.markdown-preview h3 {
  font-size:18px
}
.markdown-preview p {
  margin:.6em 0 1em
}
.markdown-preview ul,.markdown-preview ol {
  padding-left:23px;
  margin:.6em 0 1em
}
.markdown-preview blockquote {
  margin:1em 0;
  padding:6px 17px;
  border-left:3px solid var(--accent);
  background:var(--workspace);
  color:var(--muted)
}
.markdown-preview blockquote p {
  margin:.35em 0
}
.markdown-preview pre {
  background:var(--workspace);
  border:1px solid var(--line);
  padding:14px 17px;
  border-radius:7px;
  overflow:auto;
  font-size:11px;
  line-height:1.8;
  white-space:pre
}
.markdown-preview code {
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:.9em;
  padding:2px 4px;
  background:var(--workspace);
  border-radius:3px
}
.markdown-preview pre code {
  padding:0;
  background:none
}
.markdown-preview a {
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:3px
}
.markdown-preview hr {
  border:0;
  border-top:1px solid var(--line);
  margin:24px 0
}
.preview-empty {
  color:var(--muted);
  font-style:italic
}
.storage-warning {
  padding:12px 16px;
  border:1px solid var(--accent);
  border-radius:8px;
  color:var(--accent);
  background:var(--accent-soft);
  font-size:13px
}
.backup-panel {
  width:760px;
  max-height:90vh;
  display:flex;
  flex-direction:column
}
.backup-content {
  min-height:0;
  overflow:auto;
  padding:0 26px 22px
}
.backup-text {
  width:100%;
  height:42vh;
  min-height:180px;
  resize:vertical;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:12px
}
.backup-actions {
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px
}
.confirm-backdrop {
  z-index:70;
  background:#24292060
}
.confirm-panel {
  width:390px;
  max-width:100%;
  background:var(--paper);
  border:1px solid var(--line);
  padding:29px;
  border-radius:15px;
  box-shadow:var(--dialog-shadow);
  animation:enter .15s
}
.confirm-icon {
  display:grid;
  place-items:center;
  width:35px;
  height:35px;
  border-radius:50%;
  background:var(--accent-soft);
  color:var(--accent);
  font-family:Georgia,serif;
  font-size:23px;
  margin-bottom:18px
}
.confirm-panel h2 {
  font-size:20px;
  font-weight:500;
  margin:0 0 12px
}
.confirm-panel p {
  color:var(--muted);
  font-size:12px;
  line-height:1.9;
  margin:0 0 25px;
  overflow-wrap:anywhere;
  white-space:pre-line
}
.confirm-actions {
  display:flex;
  gap:10px;
  justify-content:flex-end
}
.toast-region {
  position:fixed;
  bottom:26px;
  left:calc(50% + 122px);
  transform:translateX(-50%);
  width:max-content;
  max-width:calc(100vw - 40px);
  z-index:100;
  display:grid;
  gap:9px;
  pointer-events:none
}
.toast {
  display:flex;
  align-items:center;
  gap:12px;
  background:var(--ink);
  color:var(--paper);
  border:1px solid var(--ink);
  border-radius:8px;
  padding:11px 15px;
  box-shadow:0 8px 35px #00000016;
  font-size:12px;
  max-width:520px;
  pointer-events:auto;
  animation:enter .2s
}
.toast.is-error {
  background:var(--paper);
  color:var(--danger);
  border-color:var(--danger)
}
.toast-close {
  background:none;
  color:inherit;
  font-size:20px;
  line-height:1;
  padding:0 2px;
  opacity:.7
}
.toast-message {
  overflow-wrap:anywhere
}
.mobile-brand-row,.mobile-menu-button {
  display:none
}
.sidebar-backdrop {
  position:fixed;
  inset:0;
  background:#23291f65;
  z-index:19;
  backdrop-filter:blur(2px)
}
body.modal-open {
  overflow:hidden
}
.form-error {
  color:var(--danger)
}
.note-card.is-busy {
  opacity:.6;
  pointer-events:none
}
.note-card button:focus-visible {
  outline-offset:2px
}
button svg {
  pointer-events:none
}
.section-placeholder {
  color:var(--muted);
  font-size:12px;
  grid-column:1/-1;
  text-align:center;
  padding:24px
}
.error-retry {
  padding:5px 8px;
  border:1px solid var(--line);
  background:var(--paper);
  color:var(--accent);
  margin-left:8px;
  border-radius:5px
}
.summary-strip.is-error {
  color:var(--danger)
}
@keyframes spin {
  to {
    transform:rotate(360deg)
  }
}
@keyframes enter {
  from {
    opacity:0;
    transform:translateY(8px)
  }
  to {
    opacity:1;
    transform:translateY(0)
  }
}
@keyframes fade {
  from {
    opacity:0
  }
  to {
    opacity:1
  }
}
@media(min-width:1600px) {
  .workspace {
    padding-top:55px
  }
  .notes-grid {
    gap:25px
  }
  .note-card {
    min-height:300px;
    padding:25px 25px 18px
  }
  .note-card.is-pinned {
    padding-top:23px
  }
  .card-title {
    font-size:18px
  }
  .card-excerpt {
    font-size:12px
  }
}
@media(max-width:1250px) {
  .notes-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .workspace {
    padding:35px 32px 45px
  }
  .topbar {
    padding:0 32px
  }
  .connection-status {
    display:none
  }
  .top-actions {
    gap:14px
  }
  .sidebar {
    width:220px;
    flex-basis:220px;
    padding-left:17px;
    padding-right:17px
  }
  .main-area {
    margin-left:220px;
    width:calc(100% - 220px)
  }
  .toast-region {
    left:calc(50% + 110px)
  }
}
@media(max-width:850px) {
  .sidebar {
    width:195px;
    flex-basis:195px;
    padding:29px 13px 22px
  }
  .brand-row {
    margin-left:10px;
    margin-right:10px
  }
  .brand {
    gap:10px
  }
  .brand strong {
    font-size:22px
  }
  .brand-mark {
    width:37px;
    height:40px;
    font-size:23px
  }
  .new-note-button kbd {
    display:none
  }
  .new-note-button {
    font-size:13px
  }
  .nav-item {
    padding:9px 11px;
    font-size:12px
  }
  .main-area {
    margin-left:195px;
    width:calc(100% - 195px)
  }
  .topbar {
    height:77px;
    padding:0 25px;
    gap:15px
  }
  .workspace {
    padding:31px 25px 40px
  }
  .workspace-heading {
    align-items:flex-start
  }
  .workspace h1 {
    font-size:27px
  }
  .workspace-tools {
    margin-top:27px
  }
  .sort-control {
    font-size:0;
    gap:0
  }
  .notes-grid {
    gap:15px
  }
  .note-card {
    padding:18px 18px 14px;
    min-height:273px
  }
  .note-card.is-pinned {
    padding-top:16px
  }
  .card-title {
    font-size:15px
  }
  .card-excerpt {
    -webkit-line-clamp:4;
    font-size:11px
  }
  .top-actions {
    gap:9px
  }
  .avatar-badge {
    display:none
  }
  .toast-region {
    left:calc(50% + 97px)
  }
}
@media(max-width:650px) {
  .app-shell {
    display:block
  }
  .sidebar {
    transform:translateX(-100%);
    transition:transform .2s;
    width:246px;
    padding:29px 20px 24px
  }
  .sidebar.is-open {
    transform:translateX(0)
  }
  .sidebar.is-open .mobile-menu-button {
    display:flex
  }
  .mobile-brand-row {
    display:flex;
    align-items:center;
    gap:5px
  }
  .mobile-brand {
    font-size:17px;
    letter-spacing:2px;
    font-weight:600;
    white-space:nowrap
  }
  .main-area {
    margin:0;
    width:100%
  }
  .topbar {
    height:73px;
    padding:0 15px;
    gap:15px
  }
  .search-wrap {
    max-width:none
  }
  .search-input {
    font-size:11px
  }
  .search-shortcut {
    display:none
  }
  .search-icon {
    font-size:22px
  }
  .top-actions {
    gap:0
  }
  .theme-button {
    font-size:20px;
    min-width:32px
  }
  .workspace {
    padding:30px 21px 40px
  }
  .workspace h1 {
    font-size:28px
  }
  .workspace-heading {
    gap:12px
  }
  .eyebrow {
    font-size:9px;
    letter-spacing:1.6px
  }
  .page-subtitle {
    font-size:11px;
    line-height:1.8;
    max-width:210px;
    margin-top:12px
  }
  .workspace-tools {
    margin-top:30px;
    gap:7px
  }
  .sort-control select {
    font-size:10px;
    padding-left:9px;
    padding-right:25px;
    min-height:33px
  }
  .filter-button {
    width:33px;
    height:33px
  }
  .summary-strip {
    margin-top:25px;
    margin-bottom:16px
  }
  .notes-grid {
    gap:16px
  }
  .note-card {
    min-height:264px;
    padding:19px 18px 15px
  }
  .note-card.is-pinned {
    padding-top:17px
  }
  .card-title {
    font-size:15px
  }
  .card-excerpt {
    font-size:11px
  }
  .toast-region {
    left:50%;
    bottom:20px
  }
  .modal-backdrop {
    padding:12px
  }
  .editor-panel {
    height:calc(100dvh - 24px);
    border-radius:12px
  }
  .editor-header {
    padding:19px 20px 17px
  }
  .editor-header h2 {
    font-size:19px
  }
  .editor-scroll {
    padding:20px
  }
  .field-row {
    grid-template-columns:1fr;
    gap:17px
  }
  .title-input {
    font-size:19px;
    margin-bottom:22px
  }
  .content-input {
    min-height:250px;
    font-size:13px
  }
  .editor-footer {
    padding:14px 16px;
    gap:8px
  }
  .editor-footer-actions {
    gap:7px
  }
  .editor-footer .primary-button,.editor-footer .secondary-button {
    padding:8px 12px;
    font-size:11px;
    min-height:38px
  }
  .editor-footer-left {
    gap:3px
  }
  .save-status {
    font-size:9px
  }
  .editor-hint {
    font-size:9px
  }
  .markdown-preview {
    padding:17px
  }
  .confirm-panel {
    padding:25px
  }
  .new-note-button {
    font-size:13px
  }
  .new-note-button kbd {
    display:inline
  }
  .sidebar .nav-item {
    font-size:13px;
    padding:10px 14px
  }
  .sidebar .brand-mark {
    width:42px;
    height:45px
  }
  .sidebar .brand strong {
    font-size:25px
  }
  .sidebar .brand-row {
    margin-bottom:30px
  }
}
@media(max-width:440px) {
  .notes-grid {
    grid-template-columns:1fr
  }
  .note-card {
    min-height:247px;
    padding:21px
  }
  .note-card.is-pinned {
    padding-top:19px
  }
  .card-title {
    font-size:17px;
    line-height:1.65
  }
  .card-excerpt {
    -webkit-line-clamp:3;
    font-size:12px;
    line-height:1.9
  }
  .card-label {
    font-size:10px
  }
  .card-tag {
    font-size:10px
  }
  .card-footer {
    font-size:10px
  }
  .card-source {
    max-width:150px
  }
  .workspace-heading {
    gap:8px
  }
  .page-subtitle {
    max-width:190px
  }
  .workspace {
    padding-left:20px;
    padding-right:20px
  }
  .workspace-tools {
    gap:5px
  }
  .sort-control select {
    font-size:10px;
    padding-right:23px
  }
  .filter-button {
    display:none
  }
  .topbar {
    gap:10px
  }
  .topbar .mobile-brand-row .icon-button {
    min-width:26px
  }
  .search-wrap {
    gap:5px
  }
  .search-input {
    font-size:10px
  }
  .search-icon {
    font-size:21px
  }
  .editor-footer .save-status {
    max-width:115px;
    line-height:1.5
  }
  .editor-footer-left {
    display:block
  }
  .editor-footer .primary-button {
    gap:7px
  }
  .editor-footer .primary-button span {
    display:none
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important
  }
  .note-card:hover {
    transform:none
  }
}
