@font-face {
  font-family: Xiaolai;
  src: url("assets/Xiaolai-Demo.woff2") format("woff2");
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #24231f;
  --muted: #625e55;
  --page: #faf9f6;
  --line: #d8d2c9;
  --rust: #a7472b;
  --background-primary: #fff;
  --text-normal: #2f2b28;
  --background-modifier-border: #dad4ca;
  --interactive-accent: #a34b30;
  --icon-color: #686359;
  --icon-color-hover: #201e19;
  --moye-panel-bg: #fffffff5;
  --moye-panel-border: #d7d4cf;
  --moye-writing-floating-start: 9px;
  --moye-excerpt-slot-color: #f7d75d;
  color: var(--ink);
  background: var(--page);
  font-family: "PingFang SC", "Microsoft Yahei", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body,
h1,
h2,
p {
  margin: 0;
}
button,
a {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #854731;
  outline-offset: 2px;
}
.skip,
.sr {
  position: absolute;
  clip-path: inset(100%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip:focus {
  position: fixed;
  inset: 4px auto auto 4px;
  width: auto;
  height: auto;
  clip-path: none;
  background: #fff;
  z-index: 20;
  padding: 8px;
}
.wrap,
.mast,
.frame {
  width: min(1160px, calc(100% - 64px));
  margin-inline: auto;
}
.mast,
footer,
.lib-head,
.caption,
.scene-head,
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mast {
  height: 62px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
  font-size: 20px;
}
.brand small {
  font-size: 13px;
}
.intro {
  align-items: end;
  padding-block: 32px;
}
.intro h1 {
  font-size: clamp(36px, 4.4vw, 67px);
  line-height: 1.09;
  letter-spacing: -0.055em;
}
.intro p,
.scene-head p,
.after p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}
.library {
  padding: 22px clamp(18px, 4vw, 48px) 24px;
  background: #f3f0e9;
  border: 1px solid #e1dcd2;
  border-radius: 12px;
  --moye-home-card-visual-ratio: 0.77;
  --moye-home-card-width: 142px;
  --moye-home-surface: #faf5ed;
  --moye-home-border: #d5cec2;
  --moye-home-quick-create-bg: #f8f1e6;
  --moye-home-selected: #eadac3;
  --moye-home-brand: #b18b66;
}
.lib-head h2 {
  font-size: 22px;
}
.lib-head small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}
.new-book {
  border: 1px solid #ddc9ad;
  background: #ead6b8;
  border-radius: 7px;
  padding: 6px 13px;
}
.shelf {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 3.5vw, 48px);
  max-width: 850px;
  margin: 18px auto 0;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
  min-width: 0;
}
.tile strong,
.tile small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile strong {
  font-size: 14px;
  margin-top: 5px;
}
.tile small {
  color: var(--muted);
  font-size: 12px;
}
.tile:hover .moye-home-card-visual {
  outline: 1px solid #ac8660;
}
.tile .moye-home-card-visual {
  width: min(100%, 135px);
  aspect-ratio: 0.77;
}
.tile .booklabel {
  position: absolute;
  left: 24%;
  right: 18%;
  top: 32%;
  border: 1px solid #b9a68a;
  background: #fffaf0;
  border-radius: 5px;
  padding: 8% 0;
  text-align: center;
  font:
    600 12px/1.3 Xiaolai,
    serif;
  color: #74614d;
}
.tile .moye-home-pdf-placeholder {
  background: #faf6ee;
  border-radius: 7px;
  clip-path: polygon(0 0, 85% 0, 100% 12%, 100% 100%, 0 100%);
}
.tile .moye-home-pdf-document-content {
  position: absolute;
  inset: 19% 14% auto;
  display: grid;
  gap: 8px;
}
.tile .moye-home-pdf-content-block {
  width: 37%;
  height: 8px;
  background: #e8e3d9;
}
.tile .moye-home-pdf-content-line {
  height: 1px;
  background: #dcd6cc;
  width: 85%;
}
.tile .moye-home-pdf-content-line-short {
  width: 51%;
}
.tile .moye-home-pdf-label {
  position: absolute;
  bottom: 10%;
  left: 13%;
  border: 1px solid #c8bcac;
  padding: 1px 5px;
  color: #695c4b;
  font: 600 13px/1.5 system-ui;
}
.tile .moye-home-pdf-placeholder:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 15%;
  height: 12%;
  background: #e9dfcf;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}
#showcase {
  position: relative;
  margin-top: 20px;
}
.sticky {
  position: sticky;
  top: 0;
  background: var(--page);
  padding: 8px 0 12px;
}
.modes {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 28px;
}
.modes button {
  background: none;
  border: 0;
  padding: 10px 1px;
  position: relative;
  font-size: 15px;
  color: var(--muted);
}
.modes button[aria-current] {
  color: var(--ink);
  font-weight: 680;
}
.modes button[aria-current]:after {
  position: absolute;
  content: "";
  height: 3px;
  background: var(--rust);
  inset: auto 0 -1px;
}
.scene-head {
  padding: 16px 0 12px;
}
.scene-head h2,
.after h2 {
  font-size: clamp(21px, 2.35vw, 34px);
  letter-spacing: -0.05em;
  font-weight: 650;
}
.scene-head p {
  font-size: 14px;
}
#editor {
  border: 1px solid #d1ccc2;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}
.bar {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  background: #f2efe8;
  border-bottom: 1px solid var(--line);
  overflow: auto;
  scrollbar-width: none;
  color: #625d54;
}
.bar button,
.clickable-icon,
.close,
.source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
}
.bar button {
  height: 30px;
  min-width: 27px;
  border-radius: 5px;
}
.bar button:disabled,
.moye-writing-tool-rail button:disabled {
  color: #837f77;
  opacity: 0.72;
}
.bar button:not(:disabled):hover,
.clickable-icon:not(:disabled):hover {
  background: #e9e5dd;
}
.ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bar .spacer {
  flex: 1;
}
.bar .metric {
  white-space: nowrap;
  font-size: 13px;
}
.bar .folio {
  padding: 2px 8px;
  border: 1px solid var(--line);
  background: #fffcf6;
  border-radius: 4px;
}
.bar .health {
  color: #2f8d49 !important;
}
.desk {
  position: relative;
  height: clamp(335px, 65svh, 595px);
  display: flex;
  padding: 10px 12px 0 66px;
  gap: 12px;
  overflow: hidden;
  background: #e9e6df;
}
.paper {
  position: relative;
  min-width: 0;
  flex: 1;
  background: white;
  overflow: hidden;
}
.paper svg#sheet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-select: none;
}
.paper.editing {
  touch-action: none;
  cursor: crosshair;
}
.moye-writing-tool-rail {
  left: 9px;
  z-index: 3;
  max-height: calc(100% - 18px);
  overscroll-behavior: auto;
  scrollbar-width: thin;
}
.moye-writing-tool-rail button {
  border-radius: 5px;
  flex-shrink: 0;
}
.moye-writing-tool-rail button[aria-pressed="true"] {
  color: var(--rust);
  background: #f0ece7;
}
.grip {
  display: grid;
  place-items: center;
  min-height: 19px;
  color: #7f7973;
}
.moye-tool-rail-divider {
  min-height: 1px;
}
.caption {
  font-size: 12px;
  color: var(--muted);
  padding: 9px 1px;
  line-height: 1.5;
}
.caption a {
  flex: none;
}
.after {
  padding: 64px 0 70px;
}
.after ol {
  margin: 22px 0 0;
  padding: 0;
  list-style-position: inside;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.after li {
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.after p {
  margin-top: 6px;
}
footer {
  padding-block: 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
#support {
  flex: 0 0 min(23%, 245px);
  padding: 14px 6px 10px 0;
  overflow: auto;
  color: #39352f;
}
#support[hidden] {
  display: none;
}
.asidehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 11px;
}
.close {
  width: 26px;
  height: 26px;
}
.cardlist {
  display: grid;
  gap: 8px;
}
.source {
  gap: 4px;
  font-size: 12px;
  color: #594b38;
}
.source .ico {
  width: 14px;
}
.moye-pdf-excerpt-sidebar .moye-excerpt-card {
  gap: 7px;
  padding: 12px;
}
.moye-excerpt-quote {
  overflow-wrap: anywhere;
}
.ai-ref,
.translation {
  line-height: 1.5;
  font-size: 14px;
}
.ai-ref {
  margin: 8px 0;
  padding-left: 8px;
  border-left: 2px solid #bcaa93;
  font-family: Georgia, serif;
}
.translate {
  border: 1px solid #b5997b;
  background: #fffaf1;
  border-radius: 6px;
  padding: 4px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.translation {
  margin-top: 8px;
}
.translation small {
  display: block;
  color: var(--muted);
  margin-top: 7px;
}
.mark-text {
  font-family: Xiaolai, cursive;
}
.pen-cursor {
  pointer-events: none;
}
#effects,
#base {
  pointer-events: none;
}
#marks g[data-ink] {
  cursor: inherit;
}
.grid-paper {
  background-color: #fffefa;
  background-image:
    linear-gradient(#b4c5dd55 1px, transparent 1px),
    linear-gradient(90deg, #b4c5dd55 1px, transparent 1px);
  background-size: 22px 22px;
}
.md-paper {
  border-left: 3px solid #d9d2e3;
}
.locate {
  filter: drop-shadow(0 0 3px #835cb8);
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .wrap,
  .mast,
  .frame {
    width: calc(100% - 28px);
  }
  .intro,
  .scene-head {
    display: block;
  }
  .intro {
    padding: 20px 0;
  }
  .intro p {
    font-size: 14px;
    margin-top: 10px;
  }
  .intro br:not(h1 br) {
    display: none;
  }
  .shelf {
    gap: 10px;
  }
  .library {
    padding: 13px;
  }
  .tile strong {
    font-size: 12px;
  }
  .tile .booklabel {
    font-size: 9px;
  }
  .scene-head {
    padding: 9px 0;
  }
  .scene-head p {
    font-size: 12px;
  }
  .bar {
    gap: 1px;
    padding: 0 4px;
    min-height: 34px;
    height: 34px;
  }
  .bar button {
    min-width: 24px;
  }
  .desk {
    padding: 7px 5px 0 46px;
    height: clamp(282px, 60svh, 495px);
  }
  .moye-writing-tool-rail {
    width: 35px;
    left: 4px;
    padding: 4px 1px;
    gap: 2px;
  }
  .modes {
    gap: 15px;
  }
  .modes button {
    font-size: 14px;
  }
  .caption {
    font-size: 10.5px;
  }
  .after ol {
    display: block;
  }
  .after li {
    margin-top: 12px;
  }
  .after {
    padding-block: 34px;
  }
  .mast {
    height: 47px;
  }
  .mast > span {
    font-size: 12px;
  }
  .lib-head h2 {
    font-size: 18px;
  }
  #support {
    position: absolute;
    right: 8px;
    bottom: 6px;
    background: #faf8f1f5;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    width: min(250px, 65%);
    max-height: 34%;
    z-index: 4;
  }
  .asidehead {
    font-size: 13px;
    margin: 0;
  }
  .moye-pdf-excerpt-sidebar .moye-excerpt-card {
    padding: 7px;
    gap: 2px;
  }
  .moye-pdf-excerpt-sidebar .moye-excerpt-quote,
  .translation,
  .ai-ref {
    font-size: 12px;
  }
  .bar .ico {
    width: 15px;
  }
  .tile .moye-home-quick-create-inner {
    gap: 4px;
  }
  .tile .moye-home-quick-create-mark {
    width: 22px;
    height: 22px;
  }
}
@media (max-height: 580px) and (min-width: 761px) {
  .desk {
    height: 54svh;
    min-height: 170px;
  }
  .scene-head {
    padding: 5px 0;
  }
  .caption {
    padding: 3px;
  }
  .modes button {
    padding-block: 5px;
  }
}
.trace-pen {
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 42px;
  z-index: 6;
  pointer-events: none;
  filter: drop-shadow(1px 2px 2px #4c423a38);
}
.grid-paper .mark-text {
  letter-spacing: 0.015em;
}
.paper:has(#sheet:focus-visible) {
  outline: 2px solid var(--rust);
}
.moye-writing-tool-rail .grip {
  flex: none;
}
.doc-preview {
  position: absolute;
  inset: 3% 0 14%;
  width: 100%;
  height: 85%;
  background: #fffdf7;
  pointer-events: none;
}
.tile:has(.doc-preview) .moye-home-pdf-label {
  z-index: 1;
  font-size: 11px;
  bottom: 5%;
}
.tile:has(.doc-preview) .moye-home-pdf-document-content {
  visibility: hidden;
}
@media (min-width: 761px) {
  .desk[data-mode="pdf"]:has(#support[hidden])::after {
    content: "";
    flex: 0 0 min(23%, 245px);
  }
}
#marks [data-type="highlighter"],
#marks [data-type="excerpt"] {
  mix-blend-mode: multiply;
}
