:root {
  color-scheme: light;
  --background: #fff;
  --foreground: #181b19;
  --primary: #3a5a40;
  --primary-foreground: #fff;
  --muted-foreground: #657369;
  --border: #e1e4e1;
  --popover: #fff;
  --surface: #fff;
  --wash: #edf2eb;
  --font-sans:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  border: 0;
  background: none;
}
button:active {
  transform: scale(0.97);
}
button {
  transition:
    transform 110ms var(--ease),
    background-color 130ms ease;
}
button:disabled {
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #658d71;
  outline-offset: 3px;
}
svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.65;
  flex: none;
}
.page-tools {
  position: sticky;
  top: 0;
  z-index: 5;
  width: 100%;
  height: auto;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  background: rgb(255 255 255 / 90%);
  transition: border-color 140ms ease;
}
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .page-tools {
    background: rgb(255 255 255 / 75%);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}
.page-tools.scrolled {
  border-bottom-color: var(--border);
}
html {
  scroll-padding-top: calc(58px + env(safe-area-inset-top));
}
@media (prefers-reduced-motion: reduce) {
  .page-tools { transition: none; }
}
nav {
  max-width: 1080px;
  margin: auto;
  padding: 0 24px;
  gap: 12px;
}
#brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.055em;
}
#logo,
.empty-icon,
.auth-icon,
.doc-icon {
  display: inline-grid;
  place-items: center;
  background: var(--wash);
  color: var(--primary);
  border-radius: 9px;
}
#logo {
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: var(--background);
}
#role {
  font-size: 12px;
  color: var(--muted-foreground);
}
#actions,
.tools,
.title-row,
.choice {
  display: flex;
  align-items: center;
  gap: 8px;
}
.title-row {
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}
main {
  padding: 64px 20px 80px;
}
.title-row h1,
h1 {
  font-size: clamp(27px, 4vw, 34px);
  font-weight: 650;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.055em;
}
.hint,
.small {
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}
.primary,
.secondary,
.icon-only,
.menu-action,
.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  min-height: 36px;
  font-size: 13px;
  padding: 0 12px;
  font-weight: 550;
}
.primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.secondary,
.icon-only {
  background: var(--surface);
  border: 1px solid var(--border);
}
.icon-only {
  width: 36px;
  padding: 0;
}
.quiet {
  color: var(--muted-foreground);
  padding: 0 6px;
}
.search,
.field input,
textarea,
select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 12px;
  color: var(--muted-foreground);
}
.search input {
  background: none;
  border: 0;
  outline: 0;
  width: 100%;
}
.doc-list {
  border-block: 1px solid var(--border);
  margin-top: 18px;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
}
.doc-row + .doc-row {
  border-top: 1px solid var(--border);
}
.doc-open {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.doc-icon,
.empty-icon,
.auth-icon {
  width: 39px;
  height: 42px;
}
.doc-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 560;
}
.doc-row time {
  font-size: 12px;
  color: var(--muted-foreground);
}
.empty {
  padding: 44px 16px;
  text-align: center;
}
.empty h2 {
  font-size: 17px;
  margin: 12px 0 4px;
}
.auth {
  max-width: 365px;
  margin: 20px auto;
}
.auth-icon {
  margin-bottom: 18px;
}
.auth h1 {
  margin-bottom: 22px;
}
.field {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  font-size: 13px;
  font-weight: 550;
}
.field input {
  width: 100%;
}
.auth .primary,
form > .primary {
  width: 100%;
}
.switch {
  display: block;
  margin: 12px auto;
  color: var(--primary);
  font-size: 13px;
}
.error {
  color: #ae443a;
  font-size: 13px;
}
.error:empty {
  display: none;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-body {
  margin-top: 18px;
}
.dialog-body .hint {
  margin-bottom: 12px;
}
dialog {
  max-height: 82dvh;
  overflow: auto;
  animation: appear 170ms var(--ease);
}
dialog::backdrop {
  backdrop-filter: blur(2px);
}
.menu-action {
  width: 100%;
  justify-content: flex-start;
  padding: 8px;
}
.danger {
  color: #ab463b;
}
.share-row,
.version-row {
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.share-row strong,
.version-row span {
  flex: 1;
  font-size: 14px;
}
.version-row {
  width: 100%;
  text-align: left;
}
.preview {
  max-height: 34vh;
  overflow: auto;
  white-space: pre-wrap;
  background: var(--wash);
  border-radius: 8px;
  padding: 12px;
  font: 14px/1.6 var(--font-sans);
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--foreground);
  color: var(--background);
  border-radius: 8px;
  padding: 10px 18px;
  z-index: 10;
  font-size: 13px;
  box-shadow: 0 4px 20px #0002;
}
.editor-title {
  margin: 22px 0 26px;
}
.ProseMirror {
  font-size: 16px;
}
.ProseMirror ul {
  margin: 0;
}
.ProseMirror ul ul {
  margin-block: 3px;
}
.ProseMirror p:only-child:empty:before {
  content: "开始输入…";
  color: var(--muted-foreground);
}
.editor-wrap {
  padding-top: 8px;
}
.choice {
  flex-wrap: wrap;
}
textarea {
  width: 100%;
  min-height: 100px;
}
button:hover,
.doc-open:hover,
.version-row:hover {
  background-color: var(--wash);
}
.primary:hover {
  background: color-mix(in srgb, var(--primary) 90%, black);
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 540px) {
  nav {
    padding: 0 12px;
    gap: 6px;
  }
  #status {
    max-width: 65px;
    font-size: 10px;
  }
  main {
    padding: 36px 16px;
  }
  .doc-row {
    gap: 7px;
  }
  .doc-row time {
    font-size: 10px;
  }
  #actions {
    gap: 4px;
  }
}
.page-tools,
.page-tools * {
  box-sizing: border-box;
}
.tool-inner {
  max-width: 672px;
  height: 56px;
  padding: 0 24px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-inner .spacer {
  flex: 1;
}
#brand {
  font-size: 18px;
  letter-spacing: -0.035em;
}
#logo {
  width: 23px;
  height: 23px;
  border-radius: 5px;
  color: white;
}
#logo svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}
#people {
  display: none;
}
#status {
  font-size: 11px;
}
#status[data-synced="true"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#actions {
  gap: 3px;
}
.icon-only {
  border: 0;
  background: transparent;
  color: #606760;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border-radius: 6px;
}
.icon-only svg {
  width: 17px;
  height: 17px;
}
.tone-blue {
  color: #466783;
}
.tone-green {
  color: #3a6748;
}
.tone-red,
.danger {
  color: #ad4b43;
}
.icon-only:hover,
.menu-action:hover {
  background: #f2f4f2;
}
main {
  padding: 23px 24px 80px;
  max-width: 672px;
}
.access-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: #f3f4f3;
  color: #505850;
  border-radius: 20px;
  padding: 4px 9px;
}
.access-badge svg {
  width: 12px;
  height: 12px;
}
.editor-title {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 14px 0 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.editor-wrap {
  padding: 0;
}
.ProseMirror {
  line-height: 28px;
}
.ProseMirror ul {
  list-style-type: disc;
  padding-left: 24px;
}
.ProseMirror ul ul {
  margin: 0;
  border-left: 0;
}
.ProseMirror li {
  padding: 0;
}
.ProseMirror li::marker {
  font-size: 15px;
  color: #535853;
}
.ProseMirror a[href] { cursor: text; }
.ProseMirror.open-links a[href] { cursor: pointer; }
.ProseMirror a[href], .outline-url {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--primary) 45%, transparent);
}
::highlight(outline-find) {
  background: #ffe29b;
  color: #20231e;
}
.find-input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.find-input + small {
  display: block;
  padding: 4px 8px;
}
.title-row h1 {
  font-size: 29px;
}
.tools .icon-only {
  background: #f4f5f4;
}
.tools .tone-green {
  color: white;
  background: #3a5a40;
}
.share-row {
  border: 0;
  gap: 8px;
  padding: 6px;
}
.share-row > svg {
  color: #6a746c;
}
.share-row .small {
  font-size: 11px;
}
.menu-heading {
  font-size: 15px;
  margin: 6px 8px 9px;
}
#floating > .hint {
  margin: 0 8px 8px;
  font-size: 12px;
}
#floating {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 5px;
  width: min(248px, calc(100vw - 16px));
  max-height: 80dvh;
  overflow: auto;
  border: 1px solid #e1e4e1;
  border-radius: 7px;
  background: #fff;
  color: var(--foreground);
  box-shadow:
    0 3px 9px #0002,
    0 1px 3px #0001;
  transform-origin: top right;
}
#floating:popover-open {
  animation: appear 130ms var(--ease);
}
#floating::backdrop {
  background: transparent;
}
.menu-action {
  min-height: 34px;
  font-size: 14px;
  gap: 10px;
  font-weight: 400;
  border-radius: 4px;
  padding: 6px 9px;
}
.menu-action svg {
  color: #656d65;
  width: 15px;
  height: 15px;
}
.menu-action.danger svg {
  color: inherit;
}
.menu-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 9px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.menu-profile strong,
.menu-profile small {
  display: block;
}
.menu-profile strong {
  font-size: 14px;
  font-weight: 500;
}
.menu-profile small {
  color: var(--muted-foreground);
  font-size: 11px;
  margin-top: 2px;
}
.avatar {
  border-radius: 50%;
  background: #e9efea;
  color: var(--primary);
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.history-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted-foreground);
  font-size: 13px;
  margin-bottom: 20px;
}
.history-list {
  margin: 20px 0;
}
.version-row {
  gap: 8px;
  justify-content: flex-start;
}
.version-row small {
  margin-left: auto;
}
.version-preview h2 {
  font-size: 18px;
}
.doc-list {
  border-top: 0;
}
.auth {
  margin-top: 20px;
}
@media (max-width: 700px) {
  .tool-inner {
    padding: 0 16px;
    height: 49px;
  }
  main {
    padding: 24px 16px 64px;
  }
  .editor-title {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #floating:popover-open {
    animation: none;
  }
}
.menu-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px -5px;
}
.menu-profile {
  border: 0;
  padding-bottom: 6px;
}
.access-badge + .editor-title {
  margin-top: 15px;
}
.menu-action:last-child:hover {
  border-radius: 4px;
}
[hidden] {
  display: none !important;
}
.home-link {
  padding: 6px;
  color: #606760 !important;
}
.crumbs {
  display: flex;
  align-items: center;
  overflow: auto;
  min-width: 0;
  gap: 3px;
}
.crumbs:empty {
  display: none;
}
.crumb {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 125px;
  color: #626862;
}
.crumbs svg {
  width: 12px;
}
.inline-search {
  background: #f2f3f2;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 12px;
  min-width: 48px;
  flex: 1;
}
.inline-search input {
  width: 0;
  flex: 1;
  outline: 0;
  border: 0;
  background: transparent;
  height: 36px;
}
.searching .spacer,
.searching .crumbs {
  display: none;
}
.tool-inner #status {
  position: absolute;
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sync-details {
  display: grid;
  gap: 6px;
  padding: 10px;
}
.online-label {
  margin-top: 8px;
  color: #6d756f;
}
.online-person {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
#sync-cloud[data-state="syncing"] svg {
  animation: cloud-spin 0.9s linear infinite;
}
@keyframes cloud-spin {
  to {
    transform: rotate(360deg);
  }
}
.ProseMirror {
  --dot-center-x: -13px;
  --dot-hit-width: 22px;
}
.outline-item:not(.row-shell) > .row-content > ul {
  position: relative;
}
.outline-item:not(.row-shell) > .row-content > ul::before {
  content: "";
  position: absolute;
  inset-block: 0;
  left: var(--dot-center-x);
  width: 1px;
  transform: translateX(-50%);
  background: var(--border);
  pointer-events: none;
}
.outline-item {
  position: relative;
  list-style: none;
}
.row-dot {
  position: absolute;
  top: 0;
  left: calc(var(--dot-center-x) - var(--dot-hit-width) / 2);
  display: grid;
  place-items: center;
  width: var(--dot-hit-width);
  height: 28px;
  touch-action: none;
  cursor: grab;
  border-radius: 5px;
}
.row-dot:before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #535853;
}
.row-dot:active {
  cursor: grabbing;
}
.ProseMirror ul {
  padding-left: 22px;
}
.outline-item.outside-tree,
.row-shell > .row-dot,
.row-shell > .row-content > p {
  display: none;
}
.row-shell > .row-content > ul {
  padding: 0;
  border: 0;
  margin: 0;
}
.row-shell {
  position: static;
}
.row-shell > .row-content > ul > .outline-item {
  margin-left: 0;
}
.outline-item[data-drop="before"] > .row-content > p {
  box-shadow: 0 -2px #679878;
}
.outline-item[data-drop="after"] {
  box-shadow: 0 2px #679878;
}
.outline-item[data-drop="inside"] > .row-content > p {
  background: #e6efe8;
}
.drag-source {
  opacity: 0.48;
}
.add-child {
  display: flex;
  align-items: center;
  color: #68716b;
  gap: 5px;
  font-size: 16px;
  padding: 3px 0;
}
.ProseMirror:has(.row-shell) {
  min-height: 0;
}
.ProseMirror p:has(> br:only-child):before {
  content: "开始输入…";
  pointer-events: none;
  color: #717873;
}
.outline-item:has(> .row-content > p > br:only-child) > .row-dot:before {
  content: "+";
  background: transparent;
  font: 18px/1 sans-serif;
  width: auto;
  height: auto;
  color: #6f7772;
}
.ProseMirror p {
  min-height: 28px;
}
.share-dialog {
  width: min(450px, calc(100vw - 28px));
}
.permission-card,
.name-input,
.dialog-buttons {
  display: flex;
  align-items: center;
  gap: 9px;
}
.permission-card {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px;
  margin-top: 10px;
}
.permission-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f3;
}
.permission-text {
  flex: 1;
}
.permission-text strong,
.permission-text small {
  display: block;
  font-size: 14px;
}
.permission-text small {
  font-size: 12px;
  color: #677169;
}
.permission-switch {
  background: #3a5a40;
  width: 32px;
  height: 19px;
  border-radius: 15px;
  padding: 2px;
}
.permission-switch:after {
  content: "";
  background: #fff;
  float: right;
  width: 15px;
  height: 15px;
  border-radius: 50%;
}
.permission-switch:hover {
  background: #426c4a;
}
.name-dialog {
  width: min(380px, calc(100vw - 28px));
}
.name-input input {
  min-width: 0;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.name-input .icon-only {
  border: 1px solid var(--border);
}
.dialog-buttons {
  justify-content: flex-end;
  margin-top: 18px;
}
.history-page .page-tools {
  display: none;
}
.history-page main {
  max-width: 1040px;
  padding: 12px 20px;
}
.history-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #626962;
}
.history-head strong {
  color: #181b19;
}
.history-head .history-back {
  margin: 0;
}
.history-head button {
  margin-left: auto;
}
.history-layout {
  margin-top: 30px;
  display: grid;
  grid-template-columns: minmax(195px, 28%) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.history-list {
  display: grid;
  gap: 5px;
  margin: 0;
}
.version-row {
  border: 0;
  gap: 10px;
  border-radius: 8px;
  padding: 9px 12px;
}
.version-row.selected .avatar {
  background: #cddbcf;
  color: #34543c;
}
.version-row.selected {
  background: #edf0ed;
}
.version-info span,
.version-info small,
.revision-head small {
  display: block;
}
.version-info small,
.revision-head small {
  color: #646c65;
  font-size: 12px;
}
.version-row span.avatar {
  flex: none;
}
.version-info .current-tag {
  display: inline-block;
  background: #dce6dd;
  color: #3a5a40;
  padding: 1px 6px;
  border-radius: 12px;
  margin-left: 8px;
}
.version-preview {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.revision-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.revision-tree {
  padding: 12px 22px;
  overflow-wrap: anywhere;
}
.revision-tree p {
  margin: 0;
}
.revision-tree ul {
  padding-left: 22px;
  line-height: 1.8;
}
.version-preview .choice {
  padding: 10px 20px 16px;
}
.history-head span {
  overflow-wrap: anywhere;
}
@media (max-width: 680px) {
  .history-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .history-list {
    max-height: 28vh;
    overflow: auto;
  }
  .history-head button {
    font-size: 12px;
  }
  .tool-inner {
    gap: 4px;
  }
  .inline-search {
    padding-left: 6px;
  }
  .searching #actions {
    gap: 0;
  }
}
.revision-added,
.revision-changed {
  background: #edf1ed;
  border-radius: 4px;
}
.revision-changed {
  background: #f5f1e5;
}
.delta-badge {
  display: inline-block;
  margin: 5px 5px 0 0;
  padding: 2px 6px;
  border-radius: 8px;
  background: #eef2ed;
  font-size: 11px;
}
.revision-head small {
  margin-top: 3px;
}
.revision-tree a {
  color: var(--primary);
}
.outline-item > .row-content > p {
  touch-action: pan-y pinch-zoom;
}
.row-dot:before {
  transition: transform 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.row-more,
.fold-toggle {
  position: absolute;
  top: 0;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #767d77;
  background: transparent;
  border-radius: 5px;
}
.fold-toggle {
  left: -42px;
  width: 20px;
  opacity: 0;
}
.fold-toggle svg {
  width: 13px;
  height: 13px;
  transform: rotate(90deg);
  transition: transform 140ms ease;
}
.branch-folded > .fold-toggle svg {
  transform: none;
}
.branch-folded > .row-content > ul,
.branch-folded > .row-content > ol {
  display: none;
}
.row-more {
  display: none;
  right: 0;
  width: 30px;
}
.row-more svg {
  width: 16px;
}
.active-row:not(.row-shell) > .row-more {
  display: grid;
}
.active-row > .row-content > p {
  padding-right: 32px;
}
.row-shell > .fold-toggle,
.row-shell > .row-more {
  display: none;
}
.row-completed > .row-content > p {
  color: #788179;
  text-decoration: line-through;
}
.ProseMirror > ul {
  padding-left: 43px;
}
.ProseMirror ul ul {
  padding-left: 24px;
}
.row-shell > .row-content > ul {
  padding-left: 0;
}
.fold-toggle:focus-visible,
.branch-folded > .fold-toggle {
  opacity: 1;
}
.outline-item[data-swipe] > .row-content > p {
  background: #eef4ee;
  border-radius: 5px;
}
.outline-item[data-swipe] > .row-dot:before {
  transform: scale(1.5);
  background: #406847;
}
.sheet-label,
.row-sheet h2 {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.sheet-label {
  padding: 7px;
  color: #626963;
  font-size: 12px;
}
.row-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}
.quick-action {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  background: #f2f4f2;
  border-radius: 8px;
  height: 55px;
  font-size: 11px;
}
.menu-action.danger,
.menu-action.danger svg {
  color: #b22c29;
}
.swipe-hint {
  display: none;
}
.row-sheet {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px 14px max(18px, env(safe-area-inset-bottom));
  border-radius: 14px 14px 0 0;
  border: 0;
  max-height: 85dvh;
}
.row-sheet::backdrop {
  background: #0003;
  backdrop-filter: none;
}
.row-sheet .dialog-body {
  margin-top: 9px;
}
.row-sheet .dialog-head h2 {
  font-size: 14px;
  font-weight: 450;
  color: #5c645c;
}
.row-sheet .menu-action {
  min-height: 42px;
}
.row-sheet .dialog-head .icon-only {
  min-height: 26px;
  height: 26px;
}
.row-sheet .menu-action:disabled,
.quick-action:disabled {
  opacity: 0.4;
}
.row-sheet .menu-action:last-child {
  margin-top: 5px;
}
@media (hover: hover) {
  .outline-item:hover:not(:has(li:hover)) > .row-dot:before,
  .row-dot:hover:before {
    transform: scale(1.55);
  }
  .outline-item:hover:not(:has(li:hover)) > .fold-toggle {
    opacity: 1;
  }
}
@media (pointer: coarse), (max-width: 680px) {
  .fold-toggle {
    opacity: 1;
  }
  .swipe-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #f2f4f2;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 12px;
  }
  .swipe-hint .icon-only {
    min-height: 24px;
    width: 24px;
    height: 24px;
    flex: none;
  }
  .fold-toggle {
    width: 21px;
  }
  .row-more {
    height: 29px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .row-dot:before,
  .fold-toggle svg {
    transition: none;
  }
}
/* Document actions and fields use separate lines, including narrow dialogs. */
.dialog-body form {
  display: block;
}
.dialog-body form .field {
  margin: 0 0 14px;
}
.dialog-body form .field input {
  width: 100%;
  min-width: 0;
}
.dialog-body form button,
.dialog-buttons button {
  font-size: 14px;
  white-space: nowrap;
}
.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.name-dialog .name-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
}
.name-input .icon-only {
  width: 40px;
  height: 40px;
}
.name-dialog .hint {
  margin: 4px 0 16px;
}
.delete-dialog {
  width: min(512px, calc(100vw - 28px));
  padding: 24px;
}
.delete-dialog .dialog-head .icon-only {
  display: none;
}
.delete-dialog .dialog-body {
  margin-top: 8px;
}
.destructive {
  border-radius: 7px;
  background: #c52828;
  color: white;
  padding: 8px 17px;
  font-size: 14px;
}
.destructive:hover {
  background: #ac2121;
}
.permission-card {
  display: block;
  padding: 0;
}
.permission-top,
.permission-url {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}
.permission-url {
  border-top: 1px solid var(--border);
}
.permission-url input {
  min-width: 0;
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbf9;
  color: #636b64;
  font: 13px/1.4 monospace;
}
.permission-url button,
.permission-top button {
  white-space: nowrap;
}
.link-options {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 4px;
  width: 174px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  color: var(--foreground);
  box-shadow: 0 4px 12px #0002;
}
.link-options .danger {
  border-top: 1px solid var(--border);
  border-radius: 0;
}
.library-page {
  padding-top: 44px;
}
.library-page .doc-list {
  border: 0;
  margin: 20px -10px 0;
}
.library-page .doc-row {
  position: relative;
  border: 0;
  border-radius: 8px;
  min-height: 55px;
  padding: 0 10px;
}
.library-page .doc-open {
  align-self: stretch;
  gap: 12px;
}
.library-page .doc-icon {
  background: transparent;
  width: auto;
  height: auto;
  color: #636a64;
}
.library-page .doc-name {
  font-weight: 450;
}
.library-page .doc-row:hover,
.library-page .doc-row:focus-within {
  background: #f1f3f1;
}
.doc-row .icon-only {
  position: absolute;
  right: 8px;
  opacity: 0;
  pointer-events: none;
}
.doc-row:hover .icon-only,
.doc-row:focus-within .icon-only {
  opacity: 1;
  pointer-events: auto;
}
.doc-row:hover time,
.doc-row:focus-within time {
  visibility: hidden;
}
.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8ece8;
  color: #3a5a40;
  font-weight: 600;
}
.account-avatar:hover {
  background: #dde5df;
}
.library-page .title-row {
  align-items: flex-end;
}
.library-page .tools button {
  white-space: nowrap;
}
.history-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-height: 27px;
  padding: 1px 8px 1px calc(8px + var(--depth) * 24px);
  border-radius: 5px;
}
.history-line::before {
  content: "";
  flex: 0 0 7px;
  height: 7px;
  border-radius: 50%;
  background: #181b19;
  align-self: flex-start;
  margin-top: 10px;
}
.history-line p {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
}
.revision-tree {
  padding: 16px;
}
.revision-added {
  background-color: #e4f3e7;
  color: #215d33;
}
.revision-changed {
  background-color: #fff0c8;
  color: #73530f;
}
.revision-removed {
  background-color: #fde6e6;
  color: #923539;
}
.history-line.revision-removed p {
  text-decoration: line-through;
}
.delta-badge.revision-added {
  background-color: #e4f3e7;
}
.delta-badge.revision-changed {
  background-color: #fff0c8;
}
.delta-badge.revision-removed {
  background-color: #fde6e6;
}
@media (hover: none) {
  .doc-row .icon-only {
    position: static;
    opacity: 1;
    pointer-events: auto;
  }
  .doc-row:hover time,
  .doc-row:focus-within time {
    visibility: visible;
  }
}
.account-avatar {
  display: inline-grid;
  place-items: center;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}
.account-profile {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 8px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.account-profile > div {
  min-width: 0;
}
.account-profile small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted-foreground);
  font-size: 12px;
  margin-top: 2px;
}
.dialog-body .field,
.dialog-body .field input {
  font-weight: 400;
}
.dialog-buttons .primary {
  width: auto;
}
.sync-details .sync-label {
  font-size: 13px;
  font-weight: 400;
}
.sync-details .online-label {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.outline-item > .row-dot {
  cursor: pointer;
  background: transparent;
}
.outline-item > .row-dot:hover,
.outline-item > .row-dot:active {
  background: transparent;
  cursor: pointer;
}
.ProseMirror > ul {
  padding-left: 22px;
}
.ProseMirror {
  min-height: 0;
}
.outline-item.initial-slot {
  display: none;
}
.ProseMirror.empty-surface {
  display: none;
}
.ProseMirror p:only-child:empty:before,
.ProseMirror p:has(> br:only-child):before {
  content: none;
}
.first-placeholder > .row-content > p:has(> br:only-child):before,
.first-placeholder > .row-content > p:empty:before {
  content: "开始输入…";
  color: #7a817c;
  pointer-events: none;
}
.outline-item:has(> .row-content > p > br:only-child) > .row-dot:before {
  content: "";
  width: 7px;
  height: 7px;
  background: #535853;
}
.add-child {
  margin-left: -2px;
  gap: 2px;
  height: 28px;
  padding: 0;
  border-radius: 16px;
  color: #737c74;
}
.add-child svg {
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
}
.add-child:hover,
.add-child:focus-visible {
  background: transparent;
}
.add-child:hover svg,
.add-child:focus-visible svg {
  background: #e8efe9;
}
.add-child.labeled {
  padding-right: 5px;
}
.add-child.labeled:hover {
  background: #edf2ed;
}
@media (pointer: fine) and (hover: hover) {
  .outline-item > .row-more {
    display: none !important;
  }
  .active-row > .row-content > p {
    padding-right: 0;
  }
}
.editor-title[contenteditable] {
  cursor: text;
  outline: none;
  white-space: pre-wrap;
}
.ProseMirror .focus-heading > .row-content > p {
  display: block;
  position: relative;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 14px 0 18px;
  min-height: 1.2em;
  padding: 0;
}
.ProseMirror .focus-heading > .row-content > p:has(> br:only-child):before {
  content: "空白条目";
  color: #858c86;
  pointer-events: none;
}
.ProseMirror.in-focus > ul {
  padding-left: 0;
  border: 0;
}
.ProseMirror .focus-heading > .row-content > ul {
  padding-left: 22px;
}
.row-dot:before {
  box-shadow: 0 0 0 3px white;
}
.editor-wrap .ProseMirror li.row-shell > .row-dot {
  display: none;
}
.add-child:hover,
.add-child.labeled:hover,
.add-child:hover svg,
.add-child:focus-visible svg {
  background: transparent;
  color: #38453b;
}

.touch-ui .share-action > span {
  display: none;
}
.touch-ui .share-action {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
}
.touch-ui .fold-toggle {
  opacity: 1;
}
.touch-ui .active-row:not(.row-shell) > .row-more {
  display: grid !important;
}
.touch-ui .active-row > .row-content > p {
  padding-right: 32px;
}
.touch-ui .swipe-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  background: #f2f4f2;
  border-radius: 8px;
  font-size: 12px;
}
.touch-ui dialog#panel {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: 100%;
  max-height: 85dvh;
  margin: 0;
  padding: 18px max(16px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  border-radius: 16px 16px 0 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.touch-ui dialog#panel[open] {
  animation: sheet-rise 170ms var(--ease);
}
@keyframes sheet-rise {
  from {
    opacity: 0.65;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .touch-ui dialog#panel[open] {
    animation: none;
  }
}
.account-avatar .avatar-glyph {
  display: block;
  line-height: 1;
  transform: translateY(-0.095em);
}
#floating:has(.sync-details) {
  width: max-content;
  min-width: 0;
  max-width: calc(100vw - 16px);
}
#floating:has(.online-label) {
  min-width: min(250px, calc(100vw - 16px));
}
.online-person .self-tag {
  margin-left: auto;
  color: var(--muted-foreground);
  font-size: 12px;
}
.online-person .icon-only {
  width: 24px;
  min-height: 24px;
  height: 24px;
}
.ProseMirror .row-content > p {
  position: relative;
}
.ProseMirror .first-placeholder > .row-content > p::before,
.ProseMirror .focus-heading > .row-content > p::before {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  pointer-events: none;
  user-select: none;
}
.page-skeleton {
  display: grid;
  gap: 13px;
  padding: 14px 0;
  pointer-events: none;
}
.page-skeleton i {
  display: block;
  width: 72%;
  height: 12px;
  border-radius: 5px;
  background: #e9ede9;
  animation: outline-pulse 1.25s ease-in-out infinite alternate;
}
.page-skeleton i:first-child {
  width: 35%;
  height: 25px;
  margin-bottom: 11px;
}
.page-skeleton i:nth-child(3) {
  width: 57%;
}
.page-skeleton i:last-child {
  width: 63%;
}
@keyframes outline-pulse {
  to {
    opacity: 0.35;
  }
}
.page-enter {
  animation: outline-enter 160ms ease-out;
}
@keyframes outline-enter {
  from {
    opacity: 0.35;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
#panel,
#floating,
.link-options {
  opacity: 0;
  transform: translateY(3px) scale(0.985);
  transition:
    opacity 135ms ease,
    transform 150ms var(--ease),
    display 150ms allow-discrete,
    overlay 150ms allow-discrete;
}
#panel[open],
#floating:popover-open,
.link-options:popover-open,
.touch-ui dialog#panel[open] {
  opacity: 1;
  transform: none;
  animation: none;
}
#panel::backdrop {
  opacity: 0;
  transition:
    opacity 150ms ease,
    display 150ms allow-discrete,
    overlay 150ms allow-discrete;
}
#panel[open]::backdrop {
  opacity: 1;
}
.touch-ui dialog#panel:not([open]) {
  transform: translateY(22px);
}
@starting-style {
  #panel[open],
  #floating:popover-open,
  .link-options:popover-open {
    opacity: 0;
    transform: translateY(4px) scale(0.985);
  }
  .touch-ui dialog#panel[open] {
    opacity: 0;
    transform: translateY(22px);
  }
  #panel[open]::backdrop {
    opacity: 0;
  }
}
button {
  transition:
    background-color 140ms ease,
    color 140ms ease,
    opacity 120ms ease,
    transform 110ms var(--ease);
}
.version-row,
.doc-row {
  transition: background-color 140ms ease;
}
.revision-tree,
.permission-url {
  animation: outline-enter 150ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  #panel,
  #floating,
  .link-options,
  #panel::backdrop,
  button,
  .version-row,
  .doc-row {
    transition: none !important;
  }
  .page-skeleton i,
  .page-enter,
  .revision-tree,
  .permission-url {
    animation: none !important;
  }
}
.selected-outline-row > .row-content > p { background: #e4eee5; border-radius: 4px; box-shadow: -0.8em 0 #e4eee5; }
.help-section h3 { font-size: 1rem; font-weight: 650; margin: .6rem 0; }
.help-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: .7rem; align-items: baseline; padding: .4rem 0; font-size: .9rem; }
.help-row > :last-child { color: #59635d; }
.help-row kbd { margin: 0 .25rem .15rem 0; }
#focus-add { width: 100%; justify-content: flex-start; }
#brand.home-link { border-radius: 7px; transition: background-color 100ms ease-out; }
#brand.home-link:is(:hover,:focus-visible) { background-color: #edf1ed; }
#panel { animation: none; }
#panel::backdrop { backdrop-filter: none; }
.library-page .doc-open:hover { background: transparent; }
.library-page .doc-row { transition: background-color 90ms ease-out; }
@media (hover: hover) {
  .library-page .doc-row time { transition: opacity 90ms ease-out; }
  .library-page .doc-row:is(:hover,:focus-within) time { visibility: visible; opacity: 0; }
}
.selected-outline-row > .row-content > p { box-shadow: calc(var(--dot-center-x) - 6px) 0 #e4eee5; }
.selected-outline-row > .row-dot { z-index: 1; }
.selected-outline-row > .row-content > p::selection, .selected-outline-row > .row-content > p *::selection { background: transparent; }
#main:has(> .access-page) { min-height: calc(100dvh - 56px); display: grid; place-items: center; padding: 36px 18px; box-sizing: border-box; }
.access-page { display: grid; justify-items: center; text-align: center; }
.access-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #606861; background: #f1f3f1; }
.access-page h1 { font-size: 22px; margin: 20px 0 8px; }
.access-page button { margin-top: 20px; }
.registration-setting { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; border-top: 1px solid var(--border); padding: 18px 0; }
.registration-setting input { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }
