:root {
  font-family:
    Inter,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
  color: #182b49;
  background: #f2f6fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink:#182b49;
  --muted:#78869b;
  --line:#e0e7ee;
  --blue:#0865ad;
  --blue2:#3184ca;
  --pale:#e6f2fd;
  --paper:#fff;
  --canvas:#f4f7fa;
  --soft-shadow:0 2px 9px #1b36500b;
  --radius:10px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #eff4f8;
  color: var(--ink);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #75b8f2;
  outline-offset: 2px;
}
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  background: var(--paper);
}
.sidebar {
  width: 210px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #e7edf2;
  padding: 0 10px 16px;
}
.brand {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: #12294b;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.brand-leaf {
  font-family: Georgia, serif;
  font-size: 36px;
  line-height: 1;
  color: #559a78;
  transform: rotate(-28deg);
  display: inline-flex;
}
.nav-list {
  display: grid;
  gap: 5px;
  padding-top: 9px;
}
.nav-item {
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #263a58;
  font-size: 14px;
}
.nav-item:hover {
  background: #f2f7fc;
}
.nav-item.active {
  background: #e7f3fd;
  color: #0865ad;
  font-weight: 650;
  box-shadow: inset 3px 0 #1884e2;
}
.nav-icon {
  font-family: Arial, sans-serif;
  font-size: 22px;
  width: 20px;
  text-align: center;
}
.side-art {
  margin-top: auto;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 12px 5px;
  background: url(/assets/landscape.svg) center bottom/cover no-repeat;
}
.side-art p {
  font-family:
    Georgia,
    "Songti SC",
    serif;
  font-size: 11px;
  line-height: 1.8;
  color: #6e8190;
  margin: 0;
}
.art-stroke {
  width: 35px;
  border-top: 1px solid #8096a1;
  transform: rotate(-9deg);
  margin-top: 12px;
}
.workspace {
  grid-column: 2;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 68px;
  flex: 0 0 68px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 0 clamp(22px, 4vw, 54px);
  background: #fff;
  border-bottom: 1px solid #e8edf2;
  position: sticky;
  top: 0;
  z-index: 4;
}
.global-search {
  height: 38px;
  width: min(340px, 40vw);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dce4eb;
  border-radius: 7px;
  padding: 0 11px;
  color: #51627b;
}
.global-search > span {
  font-size: 24px;
  line-height: 1;
}
.global-search input {
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 0;
  background: transparent;
  font-size: 13px;
}
.global-search kbd {
  color: #9aa6b5;
  font-size: 10px;
}
.private-state {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #75849a;
  font-size: 12px;
  white-space: nowrap;
}
.lock-icon {
  color: #5090c7;
  font-size: 15px;
}
.mobile-brand {
  display: none;
}
.main-content {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 26px clamp(22px, 3.2vw, 42px) 60px;
  flex: 1;
  min-height: 0;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 20px;
  gap: 20px;
}
.page-heading h1 {
  font-size: 24px;
  letter-spacing: .01em;
  margin: 0 0 6px;
  font-weight: 700;
  color: #172c4c;
}
.page-heading p {
  color: #7d8b9f;
  margin: 0;
  font-size: 13px;
}
.button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s, border-color .15s;
}
.button.primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 2px 4px #0960a11c;
}
.button.primary:hover {
  background: #075690;
}
.button.secondary {
  background: #fff;
  border-color: #dce4eb;
  color: #40536c;
}
.button.secondary:hover {
  background: #f7fafe;
}
.button.danger {
  color: #bd4242;
  background: #fff;
  border-color: #efc4c4;
}
.button.danger:hover {
  background: #fff3f3;
}
.button.quiet {
  background: transparent;
  color: #4c6786;
}
.button.small {
  min-height: 32px;
  padding: 0 11px;
}
.composer {
  background: #fff;
  border: 1px solid #e1e7ec;
  border-radius: 9px;
  padding: 15px;
  box-shadow: var(--soft-shadow);
  margin-bottom: 20px;
}
.composer textarea {
  width: 100%;
  height: 68px;
  resize: vertical;
  border: 1px solid #dce4eb;
  border-radius: 7px;
  padding: 12px 13px;
  font-size: 14px;
  line-height: 1.6;
  background: #fff;
}
.composer textarea::placeholder {
  color: #8b98aa;
}
.composer-fields {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.2fr 132px;
  gap: 13px;
  align-items: end;
  margin-top: 12px;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field label,
.field-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #52637c;
}
.field input,
.field select,
.field textarea,
.search-control {
  width: 100%;
  height: 36px;
  border: 1px solid #dce4eb;
  border-radius: 6px;
  background: #fff;
  padding: 0 10px;
  font-size: 12px;
}
.field input::placeholder {
  color: #a1adbc;
}
.tags-input {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  border: 1px solid #dce4eb;
  border-radius: 6px;
  padding: 3px 7px;
  flex-wrap: wrap;
}
.tags-input input {
  border: 0;
  outline: 0;
  box-shadow: none;
  min-width: 80px;
  flex: 1;
  padding: 0;
  height: 27px;
}
.tag-chip {
  font-size: 11px;
  background: #e7f3fd;
  color: #24669b;
  border-radius: 20px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.tag-chip button {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1;
}
.timeline-day {
  margin-top: 19px;
}
.day-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 2px 8px;
}
.day-heading h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 700;
}
.day-meta {
  font-size: 12px;
  color: #8491a3;
}
.day-more {
  margin-left: auto;
  border: 0;
  background: none;
  color: #73839a;
  font-size: 18px;
}
.timeline-list {
  display: grid;
  gap: 8px;
  position: relative;
}
.timeline-list:before {
  content: "";
  position: absolute;
  left: 8px;
  top: 15px;
  bottom: 15px;
  border-left: 1px solid #d8e1e9;
}
.entry-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 13px;
  align-items: stretch;
  position: relative;
}
.entry-time {
  position: relative;
  padding: 13px 0 0 27px;
  font-size: 12px;
  color: #596c85;
}
.entry-time:before {
  content: "";
  position: absolute;
  left: 3px;
  top: 16px;
  width: 11px;
  height: 11px;
  background: #98bad6;
  border: 2px solid #fff;
  border-radius: 50%;
  z-index: 1;
}
.entry-card {
  min-width: 0;
  min-height: 78px;
  background: #fff;
  border: 1px solid #e2e7ec;
  border-radius: 9px;
  padding: 11px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
}
.entry-card:hover {
  border-color: #c5d8e9;
  box-shadow: 0 3px 12px #1b365011;
}
.entry-main {
  min-width: 0;
}
.entry-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #20314b;
}
.entry-preview {
  margin: 0;
  color: #68788f;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry-empty-title {
  color: #8090a4;
  font-weight: 500;
}
.entry-tags {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  align-content: center;
  flex-wrap: wrap;
  max-width: 190px;
}
.entry-actions {
  position: absolute;
  right: 10px;
  top: 5px;
  background: transparent;
  border: 0;
  color: #8591a2;
  padding: 2px 5px;
  font-size: 16px;
}
.empty-state {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
  padding: 52px 20px;
  color: #75849a;
}
.empty-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 15px;
  background: #eef6fc;
  color: #5f9bc9;
  display: grid;
  place-items: center;
  font-size: 25px;
}
.empty-state h2 {
  color: #273d5c;
  font-size: 16px;
  margin: 0 0 8px;
}
.empty-state p {
  font-size: 13px;
  margin: 0 0 18px;
}
.search-panel,
.tag-panel,
.setting-card,
.detail-card,
.editor-card {
  background: #fff;
  border: 1px solid #e1e7ec;
  border-radius: 9px;
  box-shadow: var(--soft-shadow);
}
.search-panel {
  padding: 14px;
  margin-bottom: 20px;
}
.search-row {
  display: flex;
  gap: 9px;
}
.search-row input {
  height: 42px;
  flex: 1;
  min-width: 0;
  border: 1px solid #dce4eb;
  border-radius: 7px;
  padding: 0 12px;
}
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #68788e;
}
.filter-label {
  margin-right: 2px;
}
.filter-pill {
  height: 29px;
  border: 1px solid transparent;
  background: #f2f5f8;
  border-radius: 18px;
  padding: 0 13px;
  color: #65748a;
  font-size: 12px;
}
.filter-pill.active {
  background: #fff;
  border-color: #58a4e7;
  color: #1677bd;
}
.filter-spacer {
  width: 1px;
  height: 22px;
  background: #e2e8ed;
  margin: 0 8px;
}
.filters select {
  height: 30px;
  border: 1px solid #dce4eb;
  border-radius: 5px;
  background: white;
  padding: 0 8px;
  font-size: 12px;
  color: #4b5e76;
}
.result-heading {
  font-size: 13px;
  color: #677890;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 1px 9px;
}
.result-list {
  display: grid;
  gap: 8px;
}
.result-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  background: #fff;
  border: 1px solid #e1e7ec;
  border-radius: 8px;
  padding: 13px;
  cursor: pointer;
}
.result-card:hover {
  border-color: #bad4e8;
}
.result-date {
  font-size: 12px;
  line-height: 1.65;
  color: #72819a;
}
.result-card mark {
  background: #ffe58f;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.tag-panel {
  padding: 15px;
  margin-bottom: 20px;
}
.tag-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.tag-sort {
  display: flex;
  gap: 6px;
}
.tag-sort button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #7e8da0;
  font-size: 12px;
  padding: 8px 9px;
}
.tag-sort button.active {
  color: #1478bc;
  border-color: #1681ce;
  font-weight: 650;
}
.tag-search {
  height: 33px;
  width: min(240px, 40%);
  border: 1px solid #dce4eb;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
}
.tag-cloud {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag-cloud .tag-chip {
  border: 1px solid transparent;
  font-size: 12px;
  cursor: pointer;
  padding: 8px 14px;
}
.tag-cloud .tag-chip:hover {
  border-color: #a9cee9;
  background: #dceeff;
}
.tag-count {
  color: #7f91a4;
  margin-left: 3px;
}
.tag-record-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
}
.tag-record-heading h2 {
  font-size: 17px;
  margin: 0;
}
.tag-record-heading span {
  font-size: 12px;
  color: #8492a3;
}
.detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}
.back-link {
  border: 0;
  background: none;
  color: #387caf;
  font-size: 13px;
  padding: 8px 0;
}
.detail-nav {
  display: flex;
  gap: 7px;
}
.detail-nav button {
  height: 32px;
  border: 1px solid #dce4eb;
  border-radius: 6px;
  background: white;
  padding: 0 11px;
  font-size: 12px;
  color: #536781;
}
.detail-card {
  padding: 25px 27px;
}
.detail-title {
  font-size: 25px;
  margin: 0 0 12px;
  color: #172c4a;
}
.detail-meta {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: #78869a;
  margin-bottom: 15px;
}
.detail-actions {
  margin-left: auto;
  display: flex;
  gap: 7px;
}
.detail-tags {
  display: flex;
  gap: 7px;
  margin-bottom: 16px;
}
.markdown-body {
  border-top: 1px solid #e9edf1;
  padding-top: 17px;
  font-size: 14px;
  line-height: 1.85;
  color: #344660;
  overflow-wrap: anywhere;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: #172d4d;
  line-height: 1.35;
  margin: 1.4em 0 .55em;
}
.markdown-body h1 {
  font-size: 23px;
}
.markdown-body h2 {
  font-size: 19px;
}
.markdown-body h3 {
  font-size: 16px;
}
.markdown-body p {
  margin: .6em 0;
}
.markdown-body ul,
.markdown-body ol {
  padding-left: 1.5em;
}
.markdown-body blockquote {
  margin: 1em 0;
  padding: 11px 15px;
  background: #f1f7fc;
  border-left: 4px solid #a8d1f1;
  border-radius: 4px;
  color: #5d708a;
}
.markdown-body code {
  font-family: Consolas, monospace;
  background: #f1f4f7;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: .9em;
}
.markdown-body pre {
  white-space: pre-wrap;
  background: #f3f6f9;
  padding: 12px;
  border-radius: 6px;
  overflow: auto;
}
.markdown-body a {
  color: #1675b5;
  text-decoration: underline;
}
.markdown-body .blocked-image {
  display: inline-block;
  border: 1px dashed #c7d3df;
  border-radius: 4px;
  padding: 2px 6px;
  color: #7c8998;
  font-size: 12px;
}
.editor-card {
  padding: 18px;
}
.editor-fields {
  display: grid;
  grid-template-columns: 1fr 220px 1.15fr;
  gap: 13px;
  margin-bottom: 18px;
}
.editor-fields .field input {
  height: 39px;
}
.editor-label {
  font-size: 13px;
  font-weight: 650;
  color: #4e6079;
  margin: 0 0 8px;
}
.editor-tools {
  height: 44px;
  border: 1px solid #dce4eb;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #fbfcfd;
  padding: 0 8px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.editor-tools button {
  height: 30px;
  min-width: 31px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #4d5c71;
  font-size: 14px;
}
.editor-tools button:hover {
  background: #eaf3fb;
  color: #176da9;
}
.editor-tools .tool-spacer {
  flex: 1;
}
.editor-body {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  border: 1px solid #dce4eb;
  border-radius: 0 0 7px 7px;
  padding: 17px;
  font-size: 14px;
  line-height: 1.8;
}
.preview-body {
  min-height: 320px;
  border: 1px solid #dce4eb;
  border-radius: 0 0 7px 7px;
  padding: 17px;
}
.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: #8491a2;
  font-size: 11px;
}
.editor-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}
.editor-actions .right {
  display: flex;
  gap: 8px;
}
.setting-card {
  padding: 17px 19px;
  margin-bottom: 10px;
}
.setting-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.setting-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  font-size: 21px;
  color: #315a81;
}
.setting-copy {
  flex: 1;
}
.setting-copy h2 {
  font-size: 15px;
  margin: 0 0 3px;
}
.setting-copy p {
  font-size: 12px;
  color: #7a899d;
  margin: 0;
  line-height: 1.6;
}
.theme-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 13px 0 0 43px;
}
.theme-choice {
  min-height: 61px;
  border: 1px solid #e0e6eb;
  border-radius: 7px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  text-align: left;
}
.theme-choice.active {
  border-color: #4c9bea;
  box-shadow: 0 0 0 1px #4c9bea;
}
.theme-choice strong {
  font-size: 12px;
  display: block;
}
.theme-choice span {
  font-size: 11px;
  color: #8692a3;
  display: block;
  margin-top: 2px;
}
.storage-note {
  margin: 12px 0 0 43px;
  background: #edf6ff;
  border: 1px solid #d7eafd;
  border-radius: 6px;
  padding: 11px 13px;
  color: #5a7690;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.import-export {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 13px 0 0 43px;
}
.io-box {
  border: 1px solid #e1e7ec;
  border-radius: 7px;
  padding: 12px;
}
.io-box strong {
  font-size: 13px;
}
.io-box p {
  font-size: 11px;
  color: #8490a0;
  margin: 5px 0 10px;
}
.io-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reminder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 13px 0 0 43px;
  color: #8390a1;
  font-size: 12px;
}
.reminder-row input {
  accent-color: #1978bd;
}
.privacy-copy {
  margin: 10px 0 0 43px;
  color: #62758e;
  font-size: 12px;
  line-height: 1.7;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 15px);
  background: #1d3554;
  color: white;
  padding: 10px 16px;
  border-radius: 7px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 20;
  box-shadow: 0 6px 18px #142b4826;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.dialog {
  border: 0;
  border-radius: 11px;
  padding: 0;
  width: min(410px, calc(100vw - 32px));
  box-shadow: 0 18px 50px #10264145;
}
.dialog::backdrop {
  background: #1a2b3d55;
}
.dialog-card {
  padding: 22px;
}
.dialog-card h2 {
  font-size: 17px;
  margin: 0 0 8px;
}
.dialog-card p {
  font-size: 13px;
  color: #718097;
  margin: 0 0 20px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.theme-dark {
  --ink:#e1e9f3;
  --muted:#a5b2c1;
  --line:#374657;
  --paper:#1d2938;
  --canvas:#182330;
  background: #182330;
  color: var(--ink);
}
.theme-dark .app-shell,
.theme-dark .sidebar,
.theme-dark .topbar,
.theme-dark .composer,
.theme-dark .entry-card,
.theme-dark .search-panel,
.theme-dark .tag-panel,
.theme-dark .setting-card,
.theme-dark .detail-card,
.theme-dark .editor-card,
.theme-dark .result-card,
.theme-dark .empty-state {
  background: #1d2938;
  border-color: #334252;
}
.theme-dark .workspace {
  background: #182330;
}
.theme-dark .brand,
.theme-dark .page-heading h1,
.theme-dark .day-heading h2,
.theme-dark .entry-title,
.theme-dark .detail-title,
.theme-dark .setting-copy h2,
.theme-dark .empty-state h2 {
  color: #e2eafa;
}
.theme-dark input,
.theme-dark textarea,
.theme-dark select,
.theme-dark .tags-input,
.theme-dark .theme-choice,
.theme-dark .io-box,
.theme-dark .detail-nav button,
.theme-dark .button.secondary {
  background: #202f40;
  border-color: #3b4b5d;
  color: #d8e3ef;
}
.theme-dark .entry-preview,
.theme-dark .markdown-body {
  color: #bcc8d5;
}
.theme-dark .markdown-body h1,
.theme-dark .markdown-body h2,
.theme-dark .markdown-body h3 {
  color: #e4edf8;
}
.theme-dark .editor-tools {
  background: #243244;
  border-color: #3b4b5d;
}
.theme-dark .global-search {
  border-color: #3b4b5d;
}
.theme-dark .global-search input {
  color: #e3eaf3;
}
.theme-dark .nav-item {
  color: #ccd8e5;
}
.theme-dark .nav-item.active {
  background: #243c53;
  color: #86c4f5;
}
.theme-dark .side-art {
  opacity: .8;
}
.theme-dark .storage-note {
  background: #203b53;
  border-color: #315571;
}
.theme-dark .filter-pill {
  background: #273648;
  color: #bac7d4;
}
.theme-dark .filter-pill.active {
  background: #1d2938;
  color: #8fc9f5;
  border-color: #4e9dde;
}
@media (min-width: 1500px) {
  .main-content {
    padding-top: 32px;
  }
  .composer textarea {
    height: 76px;
  }
  .entry-card {
    min-height: 82px;
  }
}
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 176px minmax(0, 1fr);
  }
  .sidebar {
    width: 176px;
  }
  .main-content {
    padding-inline: 22px;
  }
  .composer-fields {
    grid-template-columns: 1fr 1fr;
  }
  .composer-fields .button {
    width: 100%;
  }
  .editor-fields {
    grid-template-columns: 1fr 1fr;
  }
  .editor-fields .field:last-child {
    grid-column: 1/-1;
  }
}
@media (max-width: 650px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: 62px;
    padding: 5px 8px;
    background: #fff;
    border-right: 0;
    border-top: 1px solid #e3e9ef;
  }
  .brand,
  .side-art {
    display: none;
  }
  .nav-list {
    height: 100%;
    padding: 0;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
  }
  .nav-item {
    height: 50px;
    border-radius: 7px;
    padding: 3px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    font-size: 10px;
    text-align: center;
    box-shadow: none !important;
  }
  .nav-item.active {
    box-shadow: inset 0 2px #1884e2 !important;
  }
  .nav-icon {
    font-size: 20px;
  }
  .workspace {
    min-height: 100vh;
    padding-bottom: 62px;
  }
  .topbar {
    height: 58px;
    flex-basis: 58px;
    padding: 0 14px;
    gap: 8px;
    justify-content: space-between;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
  }
  .mobile-brand .brand-leaf {
    font-size: 27px;
  }
  .global-search {
    width: min(44vw, 230px);
    height: 34px;
    padding: 0 7px;
    gap: 5px;
  }
  .global-search input {
    font-size: 11px;
  }
  .global-search kbd,
  .private-state span:last-child {
    display: none;
  }
  .private-state {
    font-size: 14px;
  }
  .main-content {
    padding: 19px 14px 25px;
  }
  .page-heading {
    margin-bottom: 15px;
  }
  .page-heading h1 {
    font-size: 20px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .button {
    font-size: 12px;
    padding-inline: 11px;
  }
  .composer {
    padding: 10px;
    margin-bottom: 17px;
  }
  .composer textarea {
    height: 72px;
  }
  .composer-fields {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }
  .composer-fields .field:nth-child(3) {
    grid-column: 1/-1;
  }
  .entry-row {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 8px;
  }
  .entry-time {
    padding-left: 19px;
    font-size: 11px;
  }
  .entry-time:before {
    left: 1px;
  }
  .timeline-list:before {
    left: 6px;
  }
  .entry-card {
    padding: 10px;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }
  .entry-tags {
    justify-content: flex-start;
    max-width: none;
  }
  .entry-actions {
    right: 5px;
    top: 1px;
  }
  .result-card {
    grid-template-columns: 75px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }
  .result-card > .entry-tags {
    grid-column: 2;
  }
  .result-date {
    font-size: 10px;
  }
  .search-row {
    gap: 6px;
  }
  .filters {
    gap: 5px;
  }
  .filter-spacer {
    margin: 0 2px;
  }
  .filters select {
    max-width: 130px;
  }
  .tag-tools {
    align-items: flex-start;
    flex-direction: column;
  }
  .tag-search {
    width: 100%;
  }
  .detail-card {
    padding: 17px 14px;
  }
  .detail-title {
    font-size: 21px;
  }
  .detail-meta {
    gap: 8px;
  }
  .detail-actions {
    width: 100%;
    margin: 6px 0 0;
  }
  .detail-meta {
    align-items: flex-start;
  }
  .detail-actions .button {
    flex: 1;
  }
  .editor-card {
    padding: 12px;
  }
  .editor-fields {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .editor-fields .field:last-child {
    grid-column: 1/-1;
  }
  .editor-body,
  .preview-body {
    min-height: 260px;
    padding: 12px;
  }
  .theme-choices {
    margin-left: 0;
    grid-template-columns: 1fr;
  }
  .theme-choice {
    min-height: 49px;
  }
  .storage-note,
  .import-export,
  .reminder-row,
  .privacy-copy {
    margin-left: 0;
  }
  .import-export {
    grid-template-columns: 1fr;
  }
  .setting-card {
    padding: 14px;
  }
  .setting-head {
    gap: 10px;
  }
  .setting-icon {
    width: 25px;
  }
  .filters .filter-label:nth-of-type(2) {
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
