:root {
  --green: #18ad8d;
  --rail: #f3f6fb;
  --text: #101418;
  --muted: #8b94a2;
  --stage-scale: 1;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.stage {
  position: fixed;
  left: 0;
  top: 0;
  width: 1920px;
  height: 915px;
  overflow: hidden;
  background: #fff;
  transform: scale(var(--stage-scale));
  transform-origin: top left;
}

.app-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 30;
  background: var(--rail);
  border-right: 1px solid #edf1f6;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 19px;
}

.rail-logo {
  width: 40px;
  height: 40px;
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  background: #fff;
  color: #02aa82;
  display: grid;
  place-items: center;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 33px;
}

.rail-item {
  width: 62px;
  min-height: 74px;
  color: #111922;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
}

.rail-item span {
  width: 30px;
  height: 30px;
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.icon-new { background-image: url("../images/icon-new.svg"); }
.icon-upload { background-image: url("../images/icon-upload.svg"); }
.icon-home { background-image: url("../images/icon-home.svg"); }
.icon-ai { background-image: url("../images/icon-ai.svg"); }
.icon-recent { background-image: url("../images/icon-recent.svg"); }
.icon-kb { background-image: url("../images/icon-kb.svg"); }
.icon-folder { background-image: url("../images/icon-folder.svg"); }
.icon-tools { background-image: url("../images/icon-tools.svg"); }

.rail-item em {
  font-size: 16px;
  line-height: 1;
  font-style: normal;
}

.rail-item.notice::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4450;
}

.rail-bottom {
  margin-top: auto;
  padding-bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rail-bottom button {
  color: #8b9aae;
  font-size: 18px;
}

.search-head {
  position: absolute;
  z-index: 20;
  left: 90px;
  right: 0;
  top: 0;
  height: 70px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(21, 28, 38, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 24px;
}

.search-box {
  width: 859px;
  height: 52px;
  border: 1px solid #aab5c5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  background: #fff;
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 22px;
  color: #000;
  font-size: 20px;
}

.search-box .clear {
  width: 38px;
  height: 38px;
  color: #fff;
  font-size: 22px;
  position: relative;
}

.search-box .clear::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: -1;
  border-radius: 50%;
  background: #d9dce1;
}

.magnifier {
  width: 58px;
  height: 50px;
  position: relative;
}

.magnifier::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 15px;
  width: 16px;
  height: 16px;
  border: 2px solid #1e2329;
  border-radius: 50%;
}

.magnifier::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 31px;
  width: 12px;
  height: 2px;
  background: #1e2329;
  transform: rotate(45deg);
  transform-origin: left center;
}

.head-actions {
  height: 70px;
  padding-right: 85px;
  display: flex;
  align-items: center;
  gap: 25px;
  white-space: nowrap;
}

.head-actions a {
  color: #9b4d12;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}

.head-icon {
  width: 28px;
  height: 28px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.head-icon.save { background-image: url("../images/icon-save.svg"); }
.head-icon.bell { background-image: url("../images/icon-bell.svg"); }

.doc-set {
  position: absolute;
  z-index: 10;
  left: 90px;
  top: 70px;
  bottom: 76px;
  width: 279px;
  background: #fff;
  border-right: 1px solid #e5e7eb;
  box-shadow: 3px 0 7px rgba(30, 39, 50, .04);
  padding: 25px 0 0 24px;
}

.doc-set h1 {
  margin: 0 0 9px;
  font-size: 19px;
  font-weight: 500;
}

.doc-set > p {
  margin: 0 0 27px;
  color: #818891;
  font-size: 15px;
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-list li {
  position: relative;
  min-height: 84px;
  padding-left: 50px;
  padding-right: 10px;
}

.doc-list .idx {
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  color: #7a8495;
  font-size: 15px;
}

.word {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 23px;
  border: 1px solid #63a8ff;
  border-radius: 4px;
  background: #e9f3ff;
  color: #2484ff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.doc-list .word {
  position: absolute;
  left: 21px;
  top: 1px;
}

.doc-list strong {
  display: block;
  max-width: 178px;
  color: #101418;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 25px;
  font-weight: 600;
}

.doc-list li.selected strong {
  color: #10ad8d;
}

.doc-list small {
  display: block;
  margin-top: 7px;
  max-width: 220px;
  color: #969da7;
  font-size: 13px;
  white-space: nowrap;
}

.doc-list b {
  color: #0bb08e;
  letter-spacing: -2px;
  margin-right: 6px;
}

.doc-list em {
  color: #0aa886;
  font-style: normal;
  margin-right: 6px;
}

.collapse-handle {
  position: absolute;
  left: 298px;
  bottom: 23px;
  width: 77px;
  height: 77px;
  border-radius: 50%;
  background: #fff;
  color: #1d2329;
  font-size: 31px;
  box-shadow: 0 3px 16px rgba(22, 28, 36, .13);
}

.reader-shell {
  position: absolute;
  left: 369px;
  right: 0;
  top: 70px;
  bottom: 76px;
  background: #fff;
}

.reader-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-bottom: 46px;
}

.reader-scroll::-webkit-scrollbar { display: none; }

.doc-head {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 82px;
  display: flex;
  align-items: center;
  padding-left: 28px;
  gap: 11px;
  background: #fff;
  font-size: 18px;
}

.doc-head time {
  margin-left: 10px;
  color: #7e858e;
  font-size: 16px;
}

.document-body {
  width: 1010px;
  margin: 0 auto;
  padding-bottom: 10px;
  color: #30343a;
  font-family: KaiTi, STKaiti, "Kaiti SC", "FangSong", serif;
}

.document-body h2 {
  margin: 20px 0 22px;
  text-align: left;
  font-size: 23px;
  line-height: 1.8;
  font-weight: 400;
  letter-spacing: 4px;
}

.document-body p {
  margin: 0;
  font-size: 22px;
  line-height: 2.37;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.document-body .section-title { margin-bottom: 10px; }
.document-body .indent { text-indent: 2em; }
.document-body .faded-start { margin-top: 28px; color: rgba(48, 52, 58, .32); }
.document-body .faded-more { color: rgba(48, 52, 58, .08); }

.locked-panel {
  margin-top: 22px;
  min-height: 595px;
  text-align: center;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  scroll-margin-top: 152px;
}

.remaining {
  margin: 0 auto 32px;
  color: #000;
  font-size: 20px;
}

.remaining button {
  color: #00a982;
  font-size: 20px;
}

.vip-box {
  width: 858px;
  height: 279px;
  margin: 0 auto 37px;
  border-radius: 9px;
  background: #f8f8f8;
  padding-top: 29px;
}

.vip-box h3 {
  margin: 0;
  font-size: 22px;
  line-height: 26px;
  font-weight: 800;
}

.vip-box h3 span {
  display: inline-block;
  margin-right: 11px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #ffd898;
  color: #7e3b00;
  font-size: 15px;
  font-style: italic;
  vertical-align: 2px;
}

.vip-grid {
  width: 730px;
  margin: 33px auto 23px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.vip-grid div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vip-grid i {
  width: 31px;
  height: 31px;
  margin-bottom: 15px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d89945, #a65e20);
  box-shadow: 0 2px 8px rgba(161, 95, 31, .24);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.vip-grid strong {
  margin-bottom: 6px;
  font-size: 18px;
  line-height: 21px;
}

.vip-grid small {
  color: #777f8d;
  font-size: 15px;
}

.vip-cta {
  width: 260px;
  height: 47px;
  border-radius: 9px;
  background: #ffe1aa;
  color: #7e3300;
  font-size: 21px;
  font-weight: 800;
}

.next-doc {
  width: 850px;
  height: 79px;
  margin: 0 auto 27px;
  border: 1px solid #dcdfe4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  color: #999fa7;
  font-size: 17px;
}

.next-doc strong {
  color: #0d1117;
  font-size: 18px;
}

.next-doc em,
.next-doc i {
  color: #ff4747;
  font-style: normal;
}

.next-doc small {
  color: #858b93;
  font-size: 17px;
}

.copyright {
  width: 900px;
  margin: 0 auto;
  color: #999fa7;
  text-align: right;
  font-size: 16px;
  line-height: 1.9;
}

.copyright b { color: #111; }

.right-float {
  position: absolute;
  z-index: 40;
  right: 0;
  top: 0;
  width: 82px;
  height: 128px;
  border-radius: 0 12px 0 18px;
  background: #fff;
  box-shadow: -2px 1px 7px rgba(18, 25, 34, .12);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.to-top {
  height: 52px;
  color: #14191f;
  font-size: 42px;
  line-height: 1;
}

.float-avatar {
  width: 65px;
  height: 65px;
  border: 0;
  border-radius: 50%;
  background: url("../images/right-ball.svg") center/contain no-repeat;
  box-shadow: none;
}

.action-bar {
  position: absolute;
  z-index: 25;
  left: 90px;
  right: 0;
  bottom: 0;
  height: 76px;
  border-top: 1px solid #eef1f4;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(22, 28, 36, .04);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 38px;
  padding-right: 24px;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 31px;
}

.tool-actions button {
  color: #555;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.bar-icon {
  width: 24px;
  height: 24px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.bar-icon.client { background-image: url("../images/icon-client.svg"); }
.bar-icon.copy { background-image: url("../images/icon-copy.svg"); }
.bar-icon.star { background-image: url("../images/icon-star.svg"); }
.bar-icon.pdf { background-image: url("../images/icon-pdf.svg"); }
.bar-icon.more { background-image: url("../images/icon-more.svg"); }

.download-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.download-actions button {
  position: relative;
  height: 57px;
  border: 1px solid #12b28d;
  border-radius: 9px;
  background: #fff;
  color: #17ad8a;
  font-size: 24px;
  font-weight: 700;
}

.download-actions .share { width: 89px; }
.download-actions .batch { width: 199px; }
.download-actions .single {
  width: 180px;
  color: #fff;
  background: #20aa89;
  border-color: #20aa89;
}

.download-actions .batch span {
  position: absolute;
  right: -10px;
  top: -5px;
  height: 17px;
  padding: 0 6px;
  border-radius: 2px;
  background: #ff6b63;
  color: #fff;
  font-size: 12px;
  line-height: 17px;
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(16px);
  opacity: 0;
  padding: 10px 16px;
  border-radius: 5px;
  background: rgba(20, 24, 31, .9);
  color: #fff;
  transition: .18s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
  html,
  body {
    overflow: hidden;
  }

  .stage {
    width: 100vw;
    height: 100vh;
    transform: none;
  }

  .app-rail,
  .doc-set,
  .right-float {
    display: none;
  }

  .search-head {
    left: 0;
    right: 0;
    height: 58px;
    padding: 7px 10px;
  }

  .search-box {
    width: 100%;
    height: 44px;
    border-radius: 7px;
  }

  .search-box input {
    padding: 0 12px;
    font-size: 16px;
  }

  .search-box .clear {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .search-box .clear::before {
    inset: 8px;
  }

  .magnifier {
    width: 46px;
    height: 42px;
  }

  .magnifier::before {
    left: 13px;
    top: 12px;
    width: 15px;
    height: 15px;
  }

  .magnifier::after {
    left: 28px;
    top: 28px;
  }

  .head-actions {
    display: none;
  }

  .reader-shell {
    left: 0;
    right: 0;
    top: 58px;
    bottom: 70px;
  }

  .reader-scroll {
    padding-bottom: 24px;
  }

  .doc-head {
    height: 52px;
    padding: 0 12px;
    gap: 8px;
    font-size: 14px;
    border-bottom: 1px solid #f0f2f5;
  }

  .doc-head .doc-name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .doc-head time {
    margin-left: 0;
    font-size: 12px;
    flex: 0 0 auto;
  }

  .word {
    width: 18px;
    height: 20px;
    font-size: 11px;
    border-radius: 4px;
  }

  .document-body {
    width: auto;
    margin: 0;
    padding: 22px 18px 6px;
    color: #20242a;
  }

  .document-body h2 {
    margin: 6px 0 22px;
    text-align: center;
    font-size: 18px;
    line-height: 1.7;
    letter-spacing: 2px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .document-body p {
    font-size: 17px;
    line-height: 2.05;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    text-align: justify;
  }

  .document-body .faded-start {
    margin-top: 20px;
  }

  .locked-panel {
    margin-top: 24px;
    min-height: 560px;
    padding: 0 14px 30px;
    scroll-margin-top: 72px;
  }

  .remaining,
  .remaining button {
    font-size: 16px;
  }

  .remaining {
    margin-bottom: 22px;
  }

  .vip-box {
    width: 100%;
    height: auto;
    min-height: 292px;
    margin-bottom: 22px;
    padding: 22px 12px 20px;
  }

  .vip-box h3 {
    font-size: 17px;
    line-height: 1.45;
  }

  .vip-box h3 span {
    margin-right: 6px;
    font-size: 12px;
  }

  .vip-grid {
    width: 100%;
    margin: 24px 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 10px;
  }

  .vip-grid i {
    width: 28px;
    height: 28px;
    margin-bottom: 9px;
  }

  .vip-grid strong {
    font-size: 15px;
  }

  .vip-grid small {
    font-size: 12px;
  }

  .vip-cta {
    width: min(260px, 100%);
    height: 42px;
    font-size: 17px;
  }

  .next-doc {
    width: 100%;
    height: auto;
    min-height: 62px;
    padding: 12px;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 13px;
  }

  .next-doc strong {
    max-width: 185px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
  }

  .next-doc small,
  .next-doc i {
    font-size: 13px;
  }

  .copyright {
    width: 100%;
    text-align: left;
    font-size: 12px;
  }

  .collapse-handle {
    display: none;
  }

  .action-bar {
    left: 0;
    right: 0;
    height: 70px;
    padding: 8px;
    justify-content: center;
    gap: 0;
  }

  .tool-actions {
    display: none;
  }

  .download-actions {
    width: 100%;
    gap: 8px;
  }

  .download-actions button {
    flex: 1 1 0;
    min-width: 0;
    height: 50px;
    border-radius: 8px;
    font-size: 15px;
  }

  .download-actions .share {
    width: auto;
    flex: .72 1 0;
  }

  .download-actions .batch {
    width: auto;
    flex: 1.42 1 0;
  }

  .download-actions .single {
    width: auto;
    flex: 1.32 1 0;
  }

  .download-actions .batch span {
    right: -4px;
    top: -7px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 16px;
  }

  .toast {
    bottom: 82px;
    max-width: calc(100vw - 36px);
    font-size: 13px;
  }
}
