:root {
  --ink: #293a31;
  --muted: #8a9188;
  --green: #3e5a47;
  --line: #e6e8df;
  --paper: #fffefa;
  --sand: #f8ebc1;
  --rose: #f7dddc;
  --sage: #e1eacb;
  --sky: #dce9f1;
  --lavender: #e8e0f3;
  --white: #fffefa;
  --sidebar: 252px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f7f7f2;
  font-size: 14px;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: wait;
  opacity: 0.52;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #849e74;
  outline-offset: 3px;
}
button,
input {
  min-height: 44px;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  height: 20px;
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}
.icon-button:hover {
  background: #e9ece3;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand > span {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 3px;
}
.brand small {
  font-size: 10px;
  font-weight: 450;
  letter-spacing: 1.7px;
  display: block;
  margin-top: 1px;
}
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  padding: 0 20px;
  min-height: 46px;
  font-weight: 550;
}
.primary-button {
  background: var(--green);
  color: #fff;
}
.primary-button:hover {
  background: #2d4436;
}
.secondary-button {
  background: #f0f1eb;
  border: 1px solid var(--line);
}
.text-button {
  color: #617757;
  padding: 0;
  font-size: 12px;
}
.text-button:hover {
  text-decoration: underline;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.8px;
  font-weight: 650;
  color: #929b84;
}
.mobile-only {
  display: none;
}
.app-shell {
  height: 100dvh;
  display: flex;
  overflow: hidden;
}
.sidebar {
  width: var(--sidebar);
  background: #fbfcf7;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 30;
  padding: 31px 18px 0;
}
.sidebar-brand-row {
  padding: 0 13px;
  margin-bottom: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.new-board-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dce2d4;
  border-radius: 9px;
  background: #eff3e9;
  text-align: left;
  padding: 0 13px;
  color: #45603f;
  min-height: 45px;
  font-size: 13px;
  font-weight: 600;
}
.new-board-button > span {
  margin-left: auto;
  color: #92a08a;
  font-size: 18px;
  font-weight: 400;
}
.new-board-button:hover {
  background: #e6eeda;
}
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 29px 12px 13px;
  font-size: 10px;
  letter-spacing: 1.3px;
  color: #939a8d;
}
.section-label > span {
  font-size: 10px;
  letter-spacing: 0;
  background: #e9ede3;
  color: #748369;
  border-radius: 4px;
  padding: 2px 6px;
}
.board-list {
  overflow: auto;
  min-height: 50px;
  flex: 1;
}
.board-item {
  display: flex;
  gap: 11px;
  align-items: center;
  width: 100%;
  border-radius: 8px;
  padding: 10px 13px;
  color: #73806e;
  min-height: 46px;
  text-align: left;
  margin-bottom: 5px;
}
.board-item > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-size: 13px;
}
.board-item.active {
  background: #e8eee0;
  color: #3f593c;
  font-weight: 600;
}
.board-item.active::after {
  content: "";
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  background: #718c5c;
  border-radius: 50%;
}
.board-item:hover {
  background: #edf1e7;
}
.board-item svg {
  width: 17px;
  height: 17px;
}
.sidebar-bottom {
  padding-top: 28px;
}
.sidebar-tip {
  padding: 18px 13px 25px;
  border-bottom: 1px solid var(--line);
}
.tip-star {
  font-size: 25px;
  display: block;
  color: #9caa82;
  margin-bottom: 9px;
}
.sidebar-tip strong {
  font-size: 12px;
  letter-spacing: 0.4px;
  font-weight: 550;
}
.sidebar-tip p {
  font-size: 10px;
  margin: 8px 0 0;
  color: #a1a795;
}
.help-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  font-size: 11px;
  min-height: 62px;
  color: #818b79;
  text-align: left;
  padding: 0 13px;
}
.help-button > span:last-child {
  margin-left: auto;
}
.help-mark {
  border: 1px solid #adb59f;
  font-size: 10px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  text-align: center;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 19px 4px 22px;
}
.avatar {
  background: #e1e8d3;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #66794d;
  font-size: 12px;
  font-weight: 600;
}
.profile > div {
  flex: 1;
  min-width: 0;
}
.profile strong {
  display: block;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile small {
  display: block;
  font-size: 9px;
  color: #9aa28e;
  margin-top: 5px;
}
.profile .icon-button {
  color: #909a83;
  width: 35px;
}
.profile svg {
  width: 17px;
}
.workspace {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}
.topbar {
  height: 94px;
  flex-shrink: 0;
  background: #fcfdf8;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 31px;
  z-index: 20;
  gap: 18px;
}
.board-heading {
  min-width: 0;
}
.breadcrumb {
  display: flex;
  gap: 10px;
  color: #9da391;
  font-size: 9px;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}
.breadcrumb > span {
  color: #c5caba;
}
.board-title-button {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 100%;
  min-height: 38px;
  padding: 0;
  text-align: left;
}
.board-title-button h1 {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: 0.2px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}
.board-title-button svg {
  width: 13px;
  opacity: 0;
  transition: opacity 0.15s;
}
.board-title-button:hover svg {
  opacity: 0.6;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}
.save-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #97a08c;
  white-space: nowrap;
  padding: 0 2px;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #93a87e;
}
.save-status[data-state="dirty"] .status-dot,
.save-status[data-state="saving"] .status-dot {
  background: #c5a268;
}
.save-status[data-state="error"],
.save-status[data-state="conflict"] {
  color: #b06d57;
}
.save-status[data-state="error"] .status-dot,
.save-status[data-state="conflict"] .status-dot {
  background: #b06d57;
}
.save-status[data-state="saving"] .status-dot {
  animation: pulse 1s ease infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e4e8dd;
  border-radius: 8px;
  padding: 0 10px;
  background: #f8faf4;
  height: 38px;
  width: 186px;
  color: #99a38c;
}
.search-box svg {
  width: 15px;
  height: 15px;
}
.search-box input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  border: 0;
  background: none;
  outline: none;
  color: var(--ink);
  font-size: 11px;
}
.search-box input::placeholder {
  color: #a2aa97;
}
kbd {
  font-family: inherit;
  font-size: 10px;
  border: 1px solid #dce2d2;
  border-radius: 4px;
  min-width: 17px;
  text-align: center;
  padding: 1px 4px;
  color: #a2ac96;
}
.topbar-actions > .icon-button {
  color: #929c87;
  min-width: 36px;
}
.canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  outline: none !important;
  background-color: #f6f7f1;
  background-image: radial-gradient(#cdd4c4 1px, transparent 1px);
  background-size: 24px 24px;
}
.canvas-surface {
  position: absolute;
  inset: 0;
  touch-action: none;
}
.canvas.is-panning,
.canvas.space-ready {
  cursor: grab;
}
.canvas.is-panning {
  cursor: grabbing;
}
.world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  pointer-events: none;
  will-change: transform;
}
.note {
  position: absolute;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  border-radius: 4px 4px 10px 4px;
  background: var(--sand);
  box-shadow:
    1px 4px 10px #4149330b,
    0 16px 26px -20px #33422a40;
  border: 1px solid #7a703716;
  transition: box-shadow 0.15s;
  min-width: 180px;
  min-height: 140px;
}
.note.selected {
  outline: 2px solid #8aa16c;
  outline-offset: 3px;
  box-shadow: 0 6px 24px #3b48241a;
}
.note.search-miss {
  opacity: 0.22;
}
.note.search-match {
  outline: 2px solid #b29050;
  outline-offset: 3px;
}
.link-card {
  flex-direction: row;
  align-items: center;
  min-height: 44px;
  max-height: 44px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 8px #22341d18;
  overflow: visible;
}
.link-grip {
  flex: 0 0 39px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.link-grip:active { cursor: grabbing; }
.link-grip svg { width: 18px; height: 18px; color: #72846a; }
.link-icon { width: 20px; height: 20px; object-fit: contain; }
.link-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2c342c;
  font-size: 13px;
  text-decoration: none;
  line-height: 42px;
}
.link-title:hover { text-decoration: underline; }
.link-menu {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  min-height: 42px;
  color: #7c8976;
  opacity: 0;
  pointer-events: none;
}
.link-menu svg { width: 16px; height: 16px; }
.link-card:hover .link-menu,
.link-card.selected .link-menu,
.link-card:focus-within .link-menu { opacity: 1; pointer-events: auto; }
.link-resize {
  flex: 0 0 44px;
  height: 42px;
  cursor: ew-resize;
  touch-action: none;
  border-radius: 0 6px 6px 0;
  position: relative;
}
.link-resize::before {
  content: "";
  position: absolute;
  right: 10px;
  top: 16px;
  height: 10px;
  border-right: 1px solid #9da998;
}
.note-header {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 14px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.note-header:active {
  cursor: grabbing;
}
.note-grip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  letter-spacing: 1.4px;
  color: #807e6266;
}
.note-grip::before {
  content: "⠿";
  font-size: 17px;
  color: #6e785360;
}
.note-header .icon-button {
  min-height: 32px;
  min-width: 32px;
  width: 32px;
  border-radius: 6px;
  color: #746d5766;
}
.note-header .icon-button:hover {
  background: #00000008;
  color: #665f4b;
}
.note-header svg {
  width: 16px;
  height: 16px;
}
.note-content {
  resize: none;
  width: 100%;
  flex: 1;
  min-height: 0;
  background: none;
  border: 0;
  padding: 2px 20px 16px;
  color: #424735;
  font-size: 14px;
  line-height: 1.85;
  outline: none !important;
  overflow: auto;
  touch-action: pan-y;
  overscroll-behavior: contain;
  white-space: pre-wrap;
  cursor: text;
}
.note-content::placeholder {
  color: #8d886b90;
}
.note-footer {
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px 9px;
  color: #8a886783;
  font-size: 8px;
  letter-spacing: 0.8px;
  pointer-events: none;
}
.note-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  cursor: nwse-resize;
  touch-action: none;
  border-radius: 0 0 10px 0;
}
.note-resize::before {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 8px;
  width: 8px;
  height: 8px;
  border-right: 1px solid #807a4e65;
  border-bottom: 1px solid #807a4e65;
}
.note-popover {
  position: absolute;
  top: 38px;
  right: 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 30px #25332020;
  padding: 8px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  min-width: 224px;
}
.note-popover .color-options {
  justify-content: center;
}
.note-popover > button {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 8px;
  text-align: left;
  border-radius: 5px;
  font-size: 12px;
}
.note-popover > button:hover {
  background: #f1f2eb;
}
.note-popover > button svg {
  width: 15px;
}
.note-popover input {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: 5px;
}
.note-size-fields {
  display: flex;
  gap: 5px;
  padding: 6px;
  font-size: 10px;
}
.note-size-fields label {
  flex: 1;
  min-width: 0;
  color: var(--muted);
}
.empty-state {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 390px;
  max-width: 90%;
  pointer-events: none;
}
.empty-state button {
  pointer-events: auto;
}
.empty-state h2 {
  font-size: 24px;
  letter-spacing: 0.8px;
  margin: 15px 0 13px;
  font-weight: 550;
}
.empty-state p {
  font-size: 12px;
  line-height: 2.05;
  color: #939a88;
  margin: 0 0 24px;
  letter-spacing: 0.2px;
}
.empty-state .primary-button {
  font-size: 12px;
  min-height: 43px;
  padding: 0 19px;
}
.empty-state .primary-button svg {
  width: 16px;
}
.empty-state small {
  display: block;
  font-size: 9px;
  color: #b0b7a4;
  margin-top: 16px;
  letter-spacing: 0.5px;
}
.empty-illustration {
  position: relative;
  width: 125px;
  height: 117px;
  margin: 0 auto 28px;
}
.empty-paper {
  position: absolute;
  width: 78px;
  height: 88px;
  border-radius: 3px 3px 8px 3px;
  border: 1px solid #ced8bd66;
}
.empty-paper.back {
  background: #e3ead7;
  left: 13px;
  top: 8px;
  transform: rotate(-13deg);
}
.empty-paper.front {
  background: #f8ebbf;
  left: 32px;
  top: 19px;
  transform: rotate(9deg);
  box-shadow: 0 10px 15px -10px #8d91684d;
  text-align: left;
  padding: 9px 13px;
}
.empty-paper span {
  font-size: 29px;
  color: #96a576;
  line-height: 1.2;
}
.empty-paper i {
  display: block;
  height: 2px;
  margin-top: 7px;
  background: #c1b78855;
  width: 38px;
}
.empty-paper i:last-child {
  width: 27px;
}
.empty-spark {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 20px;
  color: #9eae83;
}
.canvas-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 23px;
  padding: 0 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  z-index: 12;
}
.canvas-footer > div {
  pointer-events: auto;
}
.canvas-hint {
  font-size: 9px;
  color: #a1aa92;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  pointer-events: none !important;
}
.hint-divider {
  height: 10px;
  border-left: 1px solid #d4dcc9;
}
.creation-dock {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 5px 10px 5px 5px;
  background: #fefefb;
  border: 1px solid #e2e7d9;
  border-radius: 13px;
  box-shadow: 0 5px 22px #5867410d;
}
.add-note {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--green);
  color: #fff;
  border-radius: 9px;
  min-height: 40px;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 11px;
}
.add-note:hover {
  background: #2b4434;
}
.add-note svg {
  width: 17px;
}
.add-note kbd {
  border-color: #718168;
  color: #c7d1be;
  font-size: 8px;
  margin-left: 3px;
  min-width: 14px;
}
.add-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 7px;
  color: var(--green);
  font-size: 11px;
  white-space: nowrap;
}
.add-link:hover { background: #f0f4eb; border-radius: 7px; }
.add-link svg { width: 16px; height: 16px; }
.dock-divider {
  height: 21px;
  border-left: 1px solid var(--line);
}
.color-options {
  display: flex;
  gap: 0;
  align-items: center;
}
.color-button {
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 28px;
  padding: 0;
}
.color-button::before {
  content: "";
  width: 15px;
  height: 15px;
  display: block;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid #42472f15;
}
.color-button[aria-pressed="true"]::before {
  outline: 1px solid #98a183;
  outline-offset: 3px;
}
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fefefb;
  border: 1px solid #e2e7d9;
  border-radius: 10px;
  box-shadow: 0 5px 22px #58674108;
}
.zoom-controls .icon-button {
  font-size: 19px;
  min-width: 35px;
  min-height: 42px;
  border-radius: 8px;
  color: #89977b;
}
.zoom-controls .icon-button svg {
  width: 16px;
  height: 16px;
}
.zoom-controls > span {
  height: 17px;
  border-left: 1px solid var(--line);
  margin: 0 5px;
}
.zoom-controls > #zoom-level {
  min-width: 44px;
  font-size: 10px;
  color: #7f8c72;
  padding: 0 3px;
}
.search-result {
  position: absolute;
  right: 24px;
  top: 18px;
  padding: 9px 14px;
  background: #fffef9ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #839272;
  font-size: 11px;
  pointer-events: none;
}
.popup-menu {
  position: absolute;
  right: 0;
  top: 54px;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffefa;
  box-shadow: 0 8px 35px #2d3e2420;
  padding: 6px;
  z-index: 60;
}
.popup-menu button {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  width: 100%;
  font-size: 12px;
  border-radius: 6px;
  padding: 0 11px;
}
.popup-menu button:hover {
  background: #f0f2e9;
}
.popup-menu svg {
  width: 16px;
}
.danger-text {
  color: #ac6859 !important;
}
.sync-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 24px;
  background: #fff1d6;
  color: #91662f;
  font-size: 12px;
  z-index: 13;
  border-bottom: 1px solid #ecdbba;
}
.sync-banner > div {
  display: flex;
  gap: 8px;
}
.sync-banner button {
  min-height: 32px;
  font-size: 11px;
  text-decoration: underline;
  white-space: nowrap;
}
.modal {
  width: 420px;
  max-width: calc(100% - 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffefa;
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 22px 80px #22341d25;
}
.modal::backdrop {
  background: #27332340;
  backdrop-filter: blur(3px);
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal h2 {
  font-size: 19px;
  letter-spacing: 0.4px;
  margin: 0;
}
.modal > form > p {
  color: #8b9580;
  line-height: 1.9;
  font-size: 12px;
  white-space: pre-line;
  margin: 13px 0 20px;
}
.modal label {
  display: block;
  font-size: 12px;
  margin-bottom: 8px;
}
.modal input {
  border: 1px solid #dce2d3;
  background: #fafbf6;
  border-radius: 8px;
  padding: 0 12px;
  width: 100%;
  color: var(--ink);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.modal-actions button {
  font-size: 12px;
}
.link-modal label { margin-top: 17px; }
.link-modal input { min-height: 42px; font-size: 14px; }
.link-fetch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #7b8775;
  font-size: 11px;
  margin-top: 8px;
}
.link-fetch-row span { flex: 1; }
.link-fetch-row button { min-height: 36px; white-space: nowrap; font-size: 11px; }
.modal .shortcut-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  color: #79876d;
}
.toast-region {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100% - 30px);
  width: max-content;
}
.toast {
  padding: 12px 20px;
  border-radius: 9px;
  background: #364b3ef5;
  color: #f8fbf4;
  font-size: 12px;
  box-shadow: 0 5px 20px #24331c25;
  line-height: 1.7;
  animation: appear 0.15s ease;
}
.toast.error {
  background: #805a45;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  background: #f5f7ef;
  z-index: 150;
  color: #8a967a;
  font-size: 12px;
}
.loading-screen img {
  animation: pulse 1.5s infinite;
}
.auth-screen {
  display: flex;
  min-height: 100dvh;
  background: #fbfcf7;
}
.auth-art {
  position: relative;
  width: 48%;
  background: #e9eddf;
  overflow: hidden;
  min-height: 100dvh;
  background-image: radial-gradient(#c2cdb5 1px, transparent 1px);
  background-size: 28px 28px;
}
.auth-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #e9eddf 3%, transparent 45%, #e9eddf99);
}
.art-orbit {
  position: absolute;
  left: 50%;
  top: 48%;
  border: 1px solid #c7d2b76b;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.orbit-one {
  width: 470px;
  height: 470px;
}
.orbit-two {
  width: 660px;
  height: 660px;
}
.art-note {
  position: absolute;
  z-index: 2;
  padding: 28px;
  border: 1px solid #9caa7e20;
  box-shadow: 4px 17px 36px #76875c17;
  border-radius: 4px 4px 16px 4px;
}
.art-note-a {
  width: 260px;
  height: 250px;
  left: 16%;
  top: 27%;
  background: #f5e7b5;
  transform: rotate(-9deg);
}
.art-note-a > span:not(.art-pin) {
  display: block;
  font-size: 20px;
  color: #75805c;
  margin-top: 34px;
  letter-spacing: 2px;
}
.art-note-a strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  letter-spacing: 1px;
  font-weight: 500;
  color: #64704f;
}
.art-note-a i {
  display: block;
  width: 110px;
  height: 3px;
  background: #c5b98955;
  margin-top: 17px;
}
.art-note-a i + i {
  width: 145px;
  margin-top: 12px;
}
.art-note-a i:last-child {
  width: 85px;
}
.art-pin {
  position: absolute;
  top: -13px;
  left: 95px;
  width: 67px;
  height: 26px;
  background: #cad6b7a0;
  transform: rotate(2deg);
}
.art-note-b {
  width: 210px;
  height: 220px;
  left: 47%;
  top: 49%;
  background: #d9e3c6;
  transform: rotate(11deg);
}
.art-note-b > span {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #7f9069;
}
.art-sprout {
  font-size: 85px;
  line-height: 1.5;
  color: #6f8960;
  text-align: center;
}
.art-note-b small {
  display: block;
  text-align: center;
  font-size: 10px;
  color: #849475;
  letter-spacing: 1.5px;
}
.art-caption {
  position: absolute;
  left: 44px;
  bottom: 47px;
  font-size: 10px;
  letter-spacing: 3px;
  line-height: 1.9;
  color: #9ba88a;
  z-index: 3;
}
.auth-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 44px 8% 25px;
  min-width: 0;
}
.auth-brand {
  margin-bottom: 35px;
}
.auth-form-wrap {
  width: 100%;
  max-width: 345px;
  margin: auto;
}
.auth-form-wrap h1 {
  font-size: 32px;
  font-weight: 550;
  letter-spacing: 1px;
  margin: 18px 0 18px;
}
.auth-description {
  font-size: 13px;
  line-height: 2;
  color: #98a08b;
  margin: 0 0 36px;
}
.auth-form-wrap label {
  font-size: 12px;
  color: #65775b;
  display: block;
  margin-bottom: 9px;
}
.auth-form-wrap input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dce3d1;
  border-radius: 9px;
  background: #f8faf2;
  padding: 0 14px;
  outline-color: #8a9f74;
  color: #40573b;
  font-size: 13px;
}
.auth-form-wrap input::placeholder {
  font-size: 12px;
  color: #a8b09c;
}
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 23px;
}
.label-row label {
  margin: 0;
}
.label-row .text-button {
  min-height: 30px;
  font-size: 10px;
}
.field-hint {
  font-size: 10px;
  color: #9fa991;
  line-height: 1.8;
  margin: 10px 0 22px;
}
.login-submit {
  width: 100%;
  justify-content: space-between;
  font-size: 13px;
  min-height: 48px;
}
.auth-form-wrap .remember-device {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  margin-bottom: 0;
  cursor: pointer;
}
.auth-form-wrap .remember-device input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: #65775b;
}
.auth-security {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: #a6ae9a;
  font-size: 9px;
  letter-spacing: 0.5px;
  margin: 24px 0;
}
.auth-security svg {
  width: 12px;
  height: 12px;
}
.auth-footer {
  font-size: 9px;
  color: #b3bba6;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  white-space: nowrap;
  margin: 40px 0 0;
  letter-spacing: 0.5px;
}
.form-error {
  font-size: 11px;
  line-height: 1.8;
  color: #b27257;
  background: #fff0e8;
  padding: 10px 12px;
  border-radius: 7px;
}
.auth-screen.session-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: auto;
}
.auth-screen.session-overlay .auth-art {
  display: none;
}
.auth-screen.session-overlay .auth-content {
  max-width: 640px;
  margin: auto;
  min-height: 100dvh;
  padding: 36px 55px;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: #26372140;
  backdrop-filter: blur(2px);
  width: 100%;
  height: 100%;
}
.board-list-empty {
  font-size: 11px;
  color: #9da78e;
  line-height: 1.8;
  padding: 13px;
}
.busy {
  cursor: progress !important;
}
@media (min-width: 1500px) {
  .canvas-footer {
    padding: 0 38px;
  }
  .topbar {
    padding: 0 39px;
  }
  .creation-dock {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .canvas-hint {
    font-size: 10px;
  }
}
@media (max-width: 1250px) {
  :root {
    --sidebar: 228px;
  }
  .topbar {
    padding: 0 24px;
  }
  .canvas-hint span:last-child,
  .hint-divider {
    display: none;
  }
  .topbar-actions {
    gap: 10px;
  }
  .board-title-button h1 {
    max-width: 260px;
  }
  .search-box {
    width: 165px;
  }
  .canvas-footer {
    padding: 0 22px;
    gap: 8px;
  }
  .creation-dock {
    gap: 6px;
  }
  .color-button {
    min-width: 24px;
  }
  .zoom-controls .icon-button {
    min-width: 32px;
  }
  .auth-content {
    padding: 40px 6% 24px;
  }
  .art-note-a {
    left: 10%;
    width: 240px;
  }
  .art-note-b {
    left: 43%;
  }
}
@media (max-width: 1050px) {
  :root {
    --sidebar: 215px;
  }
  .sidebar {
    padding: 26px 13px 0;
  }
  .sidebar-brand-row {
    padding: 0 10px;
  }
  .topbar {
    padding: 0 20px;
  }
  .canvas-hint {
    display: none;
  }
  .board-title-button h1 {
    max-width: 220px;
  }
  .search-box {
    width: 142px;
  }
  .save-status {
    font-size: 9px;
  }
  .topbar-actions {
    gap: 7px;
  }
  .canvas-footer {
    bottom: 19px;
  }
  .creation-dock {
    padding-right: 9px;
  }
  .color-button {
    min-width: 25px;
  }
  .board-title-button svg {
    display: none;
  }
  .auth-form-wrap h1 {
    font-size: 28px;
  }
  .art-note-a {
    width: 225px;
    left: 8%;
  }
  .art-note-b {
    width: 185px;
    left: 42%;
  }
  .art-note-a strong {
    font-size: 20px;
  }
}
@media (max-width: 820px) {
  .mobile-only {
    display: inline-flex;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-101%);
    transition: transform 0.2s ease;
    padding: 24px 18px 0;
    box-shadow: 15px 0 50px #25311c15;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-brand-row {
    margin-bottom: 23px;
  }
  .topbar {
    height: 82px;
    padding: 0 16px 0 8px;
    gap: 8px;
  }
  .topbar-actions {
    margin-left: auto;
  }
  .board-title-button h1 {
    font-size: 17px;
    max-width: 220px;
  }
  .breadcrumb {
    font-size: 8px;
  }
  .canvas-footer {
    padding: 0 18px;
  }
  .auth-art {
    width: 43%;
  }
  .art-note-a {
    width: 200px;
    height: 220px;
    left: 5%;
    padding: 22px;
    top: 31%;
  }
  .art-note-a strong {
    font-size: 17px;
  }
  .art-note-a > span:not(.art-pin) {
    font-size: 17px;
  }
  .art-note-b {
    width: 155px;
    height: 180px;
    padding: 20px;
    left: 38%;
    top: 54%;
  }
  .art-note-b span {
    font-size: 7px;
  }
  .art-sprout {
    font-size: 64px;
  }
  .art-note-b small {
    font-size: 8px;
  }
  .art-caption {
    left: 25px;
    font-size: 8px;
  }
  .auth-content {
    padding: 35px 5% 24px;
  }
  .auth-footer {
    flex-direction: column;
    gap: 7px;
  }
  .sync-banner {
    padding: 9px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 77px;
    padding-right: 8px;
    gap: 5px;
  }
  .board-title-button h1 {
    max-width: 180px;
    font-size: 16px;
  }
  .topbar-actions {
    gap: 1px;
  }
  .save-status {
    min-width: 28px;
    justify-content: center;
  }
  .save-status #save-label {
    display: none;
  }
  .save-status .status-dot {
    width: 7px;
    height: 7px;
  }
  .search-box {
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    padding: 0 10px;
  }
  .search-box input {
    width: 22px;
    position: absolute;
    right: 45px;
    top: 48px;
    width: calc(100vw - 30px);
    background: #fffef9;
    border: 1px solid var(--line);
    padding: 0 14px;
    min-height: 44px;
    border-radius: 9px;
    box-shadow: 0 5px 18px #2d3e2410;
    display: none;
    z-index: 25;
  }
  .search-box:focus-within input {
    display: block;
  }
  .search-box.search-open input {
    display: block;
  }
  .search-box svg {
    width: 20px;
    height: 20px;
  }
  .search-box kbd {
    display: none;
  }
  .topbar-actions > .icon-button {
    min-width: 40px;
  }
  .breadcrumb {
    margin-top: 2px;
  }
  .canvas-footer {
    bottom: max(16px, env(safe-area-inset-bottom));
    padding: 0 12px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    pointer-events: none;
  }
  .creation-dock {
    order: 2;
    min-height: 54px;
    border-radius: 13px;
    box-shadow: 0 5px 25px #32422215;
    padding: 5px 9px 5px 5px;
    gap: 7px;
  }
  .add-note {
    min-height: 44px;
    font-size: 12px;
    padding: 0 12px;
  }
  .add-link { min-height: 44px; font-size: 11px; }
  .color-button {
    min-width: 28px;
    min-height: 44px;
  }
  .color-button::before {
    width: 16px;
    height: 16px;
  }
  .zoom-controls {
    order: 1;
    position: absolute;
    bottom: 68px;
    right: 12px;
  }
  .zoom-controls .icon-button {
    min-width: 40px;
    min-height: 44px;
  }
  .zoom-controls > span {
    margin: 0 2px;
  }
  .zoom-controls > #home-view {
    display: none;
  }
  .empty-state {
    top: 40%;
    width: 340px;
  }
  .empty-state h2 {
    font-size: 21px;
  }
  .empty-state p {
    font-size: 11px;
  }
  .empty-illustration {
    margin-bottom: 20px;
  }
  .empty-state .eyebrow {
    font-size: 8px;
  }
  .empty-state .primary-button {
    min-height: 46px;
  }
  .note-header {
    height: 44px;
  }
  .note-header .icon-button {
    min-height: 44px;
    min-width: 44px;
  }
  .note-content {
    font-size: 15px;
  }
  .note-grip {
    font-size: 8px;
  }
  .note-popover .color-button {
    min-width: 34px;
  }
  .auth-art {
    display: none;
  }
  .auth-content {
    padding: 32px 29px 25px;
    min-height: 100dvh;
  }
  .auth-brand {
    margin-bottom: 40px;
  }
  .auth-form-wrap {
    max-width: 360px;
    padding: 12px 0;
  }
  .auth-form-wrap h1 {
    font-size: 30px;
  }
  .auth-description {
    margin-bottom: 31px;
    font-size: 12px;
  }
  .auth-footer {
    flex-direction: row;
    font-size: 8px;
    margin-top: 35px;
  }
  .auth-security {
    font-size: 9px;
  }
  .auth-screen.session-overlay .auth-content {
    padding: 32px 27px;
  }
  .sync-banner {
    font-size: 11px;
  }
  .sync-banner button {
    min-height: 44px;
  }
  .search-result {
    top: 65px;
    right: 15px;
    font-size: 10px;
  }
  .modal {
    padding: 20px;
  }
  .modal h2 {
    font-size: 18px;
  }
  .popup-menu {
    top: 48px;
  }
  .note-size-fields input {
    font-size: 16px;
  }
  .note-content:focus {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep every touch target comfortable; the mobile palette opens above the dock. */
.color-picker-button {
  display: none;
  min-width: 44px;
  min-height: 44px;
  --swatch: var(--sand);
}
.color-picker-button::before {
  content: "";
  width: 21px;
  height: 21px;
  background: var(--swatch);
  border: 1px solid #a2ae91;
  border-radius: 50%;
}
.color-button {
  min-width: 44px;
  min-height: 44px;
}
.note-header {
  height: 44px;
}
.note-header .icon-button {
  min-width: 44px;
  min-height: 44px;
}
.note-popover {
  min-width: 280px;
}
.topbar-actions > .icon-button {
  min-width: 44px;
}
.zoom-controls .icon-button {
  min-width: 44px;
  min-height: 44px;
}
@media (max-width: 1250px) {
  .canvas-hint {
    display: none;
  }
  .canvas-footer {
    justify-content: center;
    gap: 15px;
  }
  .creation-dock {
    gap: 5px;
  }
  .color-button {
    min-width: 36px;
  }
}
@media (max-width: 1000px) {
  .creation-dock {
    position: relative;
  }
  .color-picker-button {
    display: grid;
    place-items: center;
  }
  .creation-dock > .color-options {
    display: none;
    position: absolute;
    right: 0;
    bottom: 62px;
    gap: 0;
    padding: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 5px 25px #32422215;
  }
  .creation-dock > .color-options.palette-open {
    display: flex;
  }
  .creation-dock .color-button {
    min-width: 44px;
  }
  .canvas-footer {
    justify-content: space-between;
  }
  .note-popover .color-button {
    min-width: 44px;
  }
}
@media (max-width: 600px) {
  .canvas-footer {
    justify-content: center;
  }
  .creation-dock {
    position: relative;
  }
  .creation-dock > .color-options {
    right: -35px;
    bottom: 63px;
  }
  .creation-dock > .dock-divider {
    display: block;
  }
  .creation-dock > .color-picker-button {
    display: grid;
  }
  .zoom-controls .icon-button {
    min-width: 44px;
  }
  .topbar-actions > .icon-button {
    min-width: 44px;
  }
  .search-box {
    min-width: 44px;
  }
  .note-popover {
    right: 0;
  }
}

.todo-card {
  background: #fffdf7;
}
.todo-title {
  margin: 0 15px 8px;
  padding: 3px 0;
  min-width: 0;
  width: calc(100% - 30px);
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}
.todo-items {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 12px;
  touch-action: pan-y;
}
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding: 6px 0;
  border-bottom: 1px solid #e8e7de;
}
.todo-item label {
  min-height: 26px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.todo-item input {
  min-height: 18px;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 0;
  accent-color: #698258;
}
.todo-text {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.6;
}
.todo-item.done .todo-text {
  text-decoration: line-through;
  color: #8a9083;
}
.todo-item-delete {
  flex: 0 0 24px;
  min-height: 24px;
  color: #929588;
  font-size: 19px;
}
.todo-empty {
  color: #929588;
  font-size: 13px;
  padding: 10px 0;
}
.todo-add {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  margin: 9px 12px 0;
}
.todo-new-text {
  min-width: 0;
  flex: 1;
  border: 1px solid #e1e5d9;
  border-radius: 5px;
  padding: 7px;
  background: #fff;
  font-size: 12px;
}
.todo-add button {
  width: 30px;
  border-radius: 5px;
  background: #e9efdf;
  color: #556c44;
  font-size: 21px;
}
#todo-key-modal > p {
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
#todo-key-modal > .secondary-button {
  margin-top: 7px;
}
#todo-key-value, #todo-api-url {
  width: 100%;
}
@media (max-width: 600px) {
  .creation-dock {
    gap: 5px;
  }
  .todo-item-delete {
    min-height: 32px;
  }
}
