@charset "UTF-8";
:root {
  color-scheme: dark;
  --bg: #121517;
  --panel: #191d20;
  --line: #2a3034;
  --text: #e1e5e5;
  --muted: #8f9b9f;
  --accent: #95d8bb;
  --accent-bg: #243d34;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  background: none;
  border: 0;
  min-height: 44px;
}
button:hover {
  background: #ffffff08;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
input:focus,
textarea:focus {
  outline: 0;
}
input,
textarea {
  color: var(--text);
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
#app {
  min-height: 100dvh;
  display: flex;
}
.sidebar {
  width: 242px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  padding: 34px 20px 22px;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  background: #16191c;
}
.brand {
  display: flex;
  gap: 13px;
  text-decoration: none;
  font-size: 23px;
  font-weight: 650;
  align-items: center;
  padding: 0 10px 48px;
}
.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #739586;
  background: #25352e;
  border-radius: 12px;
  color: var(--accent);
  font-family: serif;
  font-size: 25px;
}
.brand small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
  letter-spacing: 1px;
}
.side-label {
  font-size: 12px;
  letter-spacing: 2px;
  color: #78858a;
  margin: 0 12px 12px;
}
.vault-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #20262a;
  border: 1px solid #343c40;
  border-radius: 9px;
  width: 100%;
  padding: 12px;
  font-size: 15px;
  text-align: left;
}
.vault-icon {
  color: var(--accent);
  font-size: 23px;
}
.vault-button #vaultName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chevron {
  margin-left: auto;
  color: var(--muted);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-radius: 7px;
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}
.nav-item > span {
  font-size: 24px;
  width: 22px;
}
.nav-item.active {
  background: #26382f;
  color: #a4dbbe;
}
kbd {
  font: 11px inherit;
  border: 1px solid #496052;
  border-radius: 4px;
  padding: 3px;
  margin-left: auto;
  color: #8aa797;
}
.side-bottom {
  margin-top: auto;
}
.local-card {
  padding: 18px 12px;
  border-bottom: 1px solid var(--line);
}
.local-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
}
.local-card strong {
  font-size: 13px;
  font-weight: 500;
  color: #bac5c4;
}
.local-card p {
  font-size: 12px;
  line-height: 1.9;
  color: #78858a;
  margin: 10px 0;
}
.version {
  display: block;
  font-size: 12px;
  color: #667378;
  margin: 18px 12px 0;
}
main {
  margin-left: 242px;
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  padding: 0 46px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.breadcrumb {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb span:last-child {
  color: #d1d8d6;
}
.connection {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 20px;
}
.mobile-vault,
.mobile-only {
  display: none;
}
.search-view {
  max-width: 1010px;
  margin: auto;
  padding: 20px 48px 24px;
}
.primary {
  background: var(--accent);
  color: #142a20;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
}
.primary:hover {
  background: #b1e7cf;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 1px solid #526c60;
  border-radius: 12px;
  background: #1b2321;
  box-shadow: 0 0 0 4px #95d8bb05;
}
.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #95d8bb10;
}
.search-symbol {
  font-size: 32px;
  color: var(--accent);
}
.search-box input {
  min-width: 0;
  flex: 1;
  background: none;
  border: 0;
  font-size: 16px;
  height: 38px;
}
.search-box input::placeholder {
  color: #7d9189;
}
.search-box button {
  min-height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  padding: 0 6px;
  font-size: 14px;
  border: 1px solid #3c4e45;
  border-radius: 5px;
  color: #97b3a5;
}
.search-options {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 12px 0 16px;
}
.filter-group {
  display: flex;
  gap: 3px;
}
.filter-group button {
  padding: 5px 14px;
  min-height: 36px;
  font-size: 14px;
  border-radius: 6px;
  color: var(--muted);
}
.filter-group button.selected {
  background: var(--accent-bg);
  color: var(--accent);
}
.filter-divider {
  height: 18px;
  width: 1px;
  background: var(--line);
}
.search-hint {
  margin-left: auto;
  font-size: 12px;
  color: #6f7e83;
}
.results-heading {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.note-row {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 22px 4px;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.note-symbol {
  width: 40px;
  height: 45px;
  border-radius: 7px;
  background: #20272a;
  color: #8cab9e;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.note-summary {
  flex: 1;
  min-width: 0;
}
.note-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  line-height: 1.6;
  font-size: 16px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.key-star {
  color: var(--accent);
  font-size: 17px;
}
.note-preview {
  font-size: 13px;
  color: #8a9699;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 5px;
  line-height: 1.6;
}
.note-time {
  font-size: 12px;
  color: #7f8d92;
  white-space: nowrap;
}
.note-arrow {
  color: #677a74;
  font-size: 18px;
}
mark {
  background: #315943;
  color: #c5f3dc;
  border-radius: 2px;
}
.search-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #657379;
  margin-top: 36px;
  gap: 16px;
}
.empty {
  padding: 68px 20px;
  text-align: center;
  color: var(--muted);
}
.empty .empty-icon {
  font-size: 40px;
  color: #6c9582;
  margin-bottom: 16px;
}
.empty h2 {
  font-weight: 500;
  font-size: 18px;
  color: #c5cecc;
}
.empty p {
  font-size: 14px;
  line-height: 1.9;
}
.enter-action {
  width: 100%;
  text-align: left;
  color: var(--accent);
  border: 1px dashed #3b5347;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 20px;
  overflow-wrap: anywhere;
}
.editor-view {
  max-width: 1010px;
  margin: auto;
  padding: 28px 48px 0;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 78px);
}
.editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.text-button {
  font-size: 14px;
  color: var(--muted);
  padding: 8px;
}
.editor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
#saveState {
  font-size: 12px;
  color: var(--muted);
}
#keyButton[aria-pressed="true"] {
  color: var(--accent);
}
.icon-button {
  width: 44px;
  border-radius: 6px;
}
.note-title {
  width: 100%;
  margin-top: 25px;
  background: none;
  border: 0;
  font-size: 30px;
  font-weight: 550;
  padding: 12px 0;
  flex-shrink: 0;
}
.editor-meta {
  display: flex;
  gap: 16px;
  color: #6f8084;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--line);
}
.writing-area {
  position: relative;
  flex: 1;
  min-height: 130px;
  display: flex;
}
textarea {
  resize: none;
  background: none;
  border: 0;
  width: 100%;
  padding: 24px 0;
  line-height: 1.95;
  font-size: 16px;
  font-family: inherit;
  tab-size: 2;
}
textarea::placeholder {
  color: #607077;
}
.editor-toolbar {
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--bg);
  gap: 12px;
  padding: 8px 0 max(12px, env(safe-area-inset-bottom));
  flex-shrink: 0;
}
.editor-toolbar button {
  min-width: 56px;
  padding: 6px 10px;
  color: #b8c8c2;
  border-radius: 7px;
}
.editor-toolbar button span {
  font-size: 23px;
  display: block;
  height: 30px;
}
.editor-toolbar button small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}
.toolbar-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
  margin: 0 8px;
}
.toolbar-note {
  margin-left: auto;
  font-size: 12px;
  color: #69797d;
}
.completions {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #465c51;
  background: #212a26;
  border-radius: 10px;
  box-shadow: 0 8px 28px #0005;
  z-index: 3;
}
.completions button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.completions .completion-label {
  padding: 12px 16px 5px;
  color: var(--muted);
  font-size: 12px;
}
.completions button:hover,
.completions button:focus {
  background: #354b3f;
}
dialog {
  background: #1b2023;
  color: var(--text);
  border: 1px solid #3c474b;
  border-radius: 16px;
  width: min(480px, calc(100% - 32px));
  max-height: 85dvh;
  padding: 28px;
  box-shadow: 0 24px 90px #0008;
}
dialog::backdrop {
  background: #070b0ccc;
  backdrop-filter: blur(5px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  font-size: 21px;
  margin: 0;
  font-weight: 550;
}
dialog p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
dialog label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0 8px;
}
.dialog-input {
  width: 100%;
  background: #121719;
  border: 1px solid #435049;
  border-radius: 7px;
  padding: 12px;
}
.dialog-input:focus {
  border-color: var(--accent);
}
.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}
.dialog-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 8px 0;
  gap: 12px;
}
.dialog-option.selected {
  border-color: #648575;
  color: var(--accent);
}
.dialog-option small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.dialog-section {
  font-size: 12px;
  color: #81908f;
  margin: 24px 0 10px;
  letter-spacing: 1px;
}
.danger {
  color: #ecacaa;
}
.dialog-error {
  font-size: 14px;
  color: #efb3a1;
  margin-top: 12px;
}
#toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: #30433a;
  border: 1px solid #637f70;
  padding: 12px 22px;
  border-radius: 9px;
  color: #e0f5e8;
  font-size: 14px;
  box-shadow: 0 8px 40px #0005;
  z-index: 10;
  max-width: 90vw;
}
.muted {
  color: var(--muted);
}
@media (max-width: 1000px) {
  .sidebar {
    width: 210px;
  }
  main {
    margin-left: 210px;
  }
  .topbar {
    padding: 0 28px;
  }
  .search-view {
    padding: 20px 28px;
  }
  .search-hint {
    display: none;
  }
  .editor-view {
    padding-left: 28px;
    padding-right: 28px;
  }
  .toolbar-note {
    display: none;
  }
}
@media (max-width: 700px) {
  .sidebar {
    display: none;
  }
  main {
    margin-left: 0;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
    gap: 10px;
  }
  .breadcrumb {
    display: none;
  }
  .mobile-vault {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 15px;
    padding: 0;
  }
  .mobile-vault span {
    max-width: 45vw;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
  .mobile-only {
    display: block;
  }
  .connection {
    font-size: 11px;
    padding: 5px 8px;
  }
  .search-view {
    padding: 12px 20px 20px;
  }
  .search-box {
    padding: 8px 12px;
    gap: 9px;
  }
  .search-box input {
    font-size: 16px;
  }
  .search-options {
    gap: 12px;
    margin: 8px 0 12px;
  }
  .filter-group button {
    min-height: 42px;
    padding: 5px 14px;
  }
  .note-row {
    gap: 12px;
    padding: 20px 0;
  }
  .note-symbol {
    width: 34px;
    height: 40px;
    font-size: 19px;
  }
  .note-heading {
    font-size: 16px;
  }
  .note-time {
    font-size: 11px;
  }
  .note-arrow {
    display: none;
  }
  .search-footer {
    font-size: 11px;
    margin-top: 28px;
  }
  .search-footer span:last-child {
    display: none;
  }
  .editor-view {
    padding: 10px 20px 0;
    height: calc(100dvh - 64px);
  }
  .editor-actions {
    gap: 3px;
  }
  #saveState {
    font-size: 11px;
  }
  .editor-top {
    gap: 3px;
  }
  .text-button {
    font-size: 13px;
  }
  .note-title {
    font-size: 27px;
    margin-top: 16px;
  }
  .editor-meta {
    padding-bottom: 16px;
  }
  .editor-toolbar {
    justify-content: space-around;
    gap: 5px;
    margin: 0 -20px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .editor-toolbar button {
    min-width: 56px;
    min-height: 60px;
  }
  .toolbar-divider {
    margin: 0 4px;
  }
  .empty {
    padding: 55px 10px;
  }
  dialog {
    padding: 22px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.15s,
      border-color 0.15s;
  }
  .search-view {
    animation: appear 0.2s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0.5;
      transform: translateY(4px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
#saveState {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor-actions {
  min-width: 0;
}
.note-preview {
  display: block;
}
.editor-view {
  height: calc(var(--app-height, 100dvh) - 78px);
}
@media (max-width: 700px) {
  .editor-view {
    height: calc(var(--app-height, 100dvh) - 64px);
  }
  #saveState {
    max-width: 100px;
  }
}
