:root {
  --paper: #f7f3ea;
  --paper-deep: #efe8d8;
  --paper-low: #f2ede1;
  --ink: #343633;
  --ink-soft: #777066;
  --ink-faint: #bfb6a7;
  --seal: #bb2b27;
  --seal-soft: rgba(187, 43, 39, 0.08);
  --forest: #2d342c;
  --line: rgba(116, 108, 93, 0.16);
  --glass: rgba(255, 253, 247, 0.78);
  --sidebar: #f4f0e8;
  --reader-wash: #f8f6f0;
}

.login-shot-body {
  margin: 0;
  min-height: 100vh;
  background: #f6f1e6;
}

.login-shot-page {
  min-height: 100vh;
  padding: 0;
}

.login-shot-frame {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #f6f1e6;
}

.login-shot-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-compose-layer {
  position: absolute;
  inset: 0;
  font-family: "Noto Serif SC", serif;
}

.login-compose-layer > div,
.login-overlay-form > * {
  position: absolute;
}

.overlay-right-title {
  left: 59.48%;
  top: 21.55%;
  color: #43413d;
  font-size: clamp(26px, 2.5vw, 45px);
  font-weight: 500;
  letter-spacing: 0;
}

.overlay-right-subtitle {
  left: 59.48%;
  top: 29.68%;
  color: rgba(209, 204, 196, 0.98);
  font-size: clamp(11px, 0.94vw, 16px);
}

.login-hotspot {
  position: absolute;
  display: block;
}

.hotspot-seal {
  top: 11.55%;
  right: 3.85%;
  width: 4.75%;
  height: 6.2%;
}

.login-overlay-form {
  position: absolute;
  inset: 0;
}

.login-overlay-field {
  left: 59.48%;
  width: 31.28%;
}

.login-overlay-account {
  top: 40.08%;
}

.login-overlay-password {
  top: 49.67%;
}

.login-overlay-field span {
  display: block;
  color: rgba(217, 211, 203, 0.98);
  font-size: clamp(12px, 1vw, 17px);
  line-height: 1;
}

.login-overlay-field input {
  width: 100%;
  height: 3.9vw;
  min-height: 38px;
  margin-top: 1.08vw;
  border: 0;
  border-bottom: 1px solid rgba(220, 214, 206, 0.92);
  background: transparent;
  color: #4a4844;
  font-size: clamp(14px, 1vw, 18px);
  padding: 0;
}

.login-overlay-field input:focus {
  outline: none;
  border-bottom-color: rgba(140, 132, 121, 0.72);
}

.login-overlay-check {
  left: 59.48%;
  top: 60.32%;
  display: inline-flex;
  align-items: center;
  gap: 0.62vw;
  color: rgba(194, 188, 180, 0.98);
  font-size: clamp(10px, 0.84vw, 14px);
}

.login-overlay-check input {
  width: 0.95vw;
  height: 0.95vw;
  min-width: 12px;
  min-height: 12px;
  margin: 0;
  accent-color: #d8d0c4;
}

.login-overlay-forgot {
  left: 87.08%;
  top: 60.28%;
  transform: translateX(-100%);
  color: rgba(209, 203, 195, 0.98);
  font-size: clamp(10px, 0.84vw, 14px);
}

.login-overlay-submit {
  left: 59.38%;
  top: 67.34%;
  width: 31.32%;
  height: 8.08%;
  border: 0;
  background: #2e342b;
  color: #f2ede3;
  font-size: clamp(18px, 1.56vw, 27px);
  font-weight: 400;
  letter-spacing: 0.58em;
  text-align: center;
}

.login-overlay-register {
  left: 74.88%;
  top: 81.03%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.42em;
  color: rgba(207, 201, 193, 0.96);
  font-size: clamp(9px, 0.72vw, 12px);
  white-space: nowrap;
}

.login-overlay-register a {
  color: rgba(149, 138, 124, 0.98);
}

.login-overlay-footer-copy {
  left: 74.92%;
  top: 83.88%;
  transform: translateX(-50%);
  color: rgba(210, 205, 197, 0.9);
  font-size: clamp(7px, 0.58vw, 10px);
  white-space: nowrap;
}

.login-overlay-footer-links {
  left: 74.92%;
  top: 87.12%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.28em;
  color: rgba(210, 205, 197, 0.9);
  font-size: clamp(7px, 0.58vw, 10px);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .login-shot-frame {
    height: auto;
    min-height: 100vh;
  }

  .login-shot-image {
    height: auto;
  }

  .overlay-right-title {
    font-size: 22px;
  }

  .login-overlay-submit {
    letter-spacing: 0.24em;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Serif SC", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(204, 170, 107, 0.2), transparent 23%),
    radial-gradient(circle at 68% 28%, rgba(193, 168, 121, 0.12), transparent 20%),
    linear-gradient(180deg, #f8f5ed 0%, #f6f1e6 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.auth-body {
  overflow: hidden;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  min-height: 100vh;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 36% 16%, rgba(250, 224, 165, 0.86), transparent 22%),
    radial-gradient(circle at 30% 56%, rgba(214, 197, 149, 0.24), transparent 26%),
    linear-gradient(180deg, #c4b08a 0%, #d8c29b 34%, #ede0bf 100%);
}

.auth-visual-photo {
  background-image:
    linear-gradient(180deg, rgba(193, 169, 122, 0.12), rgba(237, 222, 193, 0.08)),
    url("./assets/login-reference.jpg");
  background-size: cover;
  background-position: left center;
  background-repeat: no-repeat;
}

.auth-panel-band {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 21%;
  width: 18%;
  background: linear-gradient(180deg, rgba(118, 92, 58, 0.18), rgba(118, 92, 58, 0.1));
}

.auth-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(130, 112, 82, 0.28);
}

.auth-corner-top {
  top: 36px;
  left: 36px;
  border-right: 0;
  border-bottom: 0;
}

.auth-corner-bottom {
  right: 36px;
  bottom: 36px;
  border-left: 0;
  border-top: 0;
}

.auth-form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 88px 34px;
  background: rgba(252, 250, 244, 0.96);
}

.seal-link {
  position: absolute;
  top: 24px;
  right: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px 4px;
  padding: 6px 7px;
  border: 2px solid var(--seal);
  color: var(--seal);
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(255, 251, 245, 0.55);
}

.seal-link span {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 11px;
}

.auth-form-wrap {
  width: min(100%, 420px);
  margin: 0 auto;
}

.auth-title h2 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: 3.5rem;
  color: var(--ink);
}

.auth-title p {
  margin: 16px 0 56px;
  color: #c5beb2;
  font-size: 1.06rem;
}

.auth-form {
  display: grid;
  gap: 34px;
}

.auth-form label > span {
  display: block;
  margin-bottom: 14px;
  color: #b8b2a7;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(178, 170, 158, 0.48);
  background: transparent;
  color: var(--ink);
  font-size: 1.1rem;
}

.auth-form input::placeholder {
  color: #d1cbc0;
}

.auth-form input:focus {
  outline: none;
  border-bottom-color: var(--seal);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -8px;
  color: #bab4a9;
  font-size: 0.84rem;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.remember input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.auth-submit {
  display: grid;
  place-items: center;
  width: 100%;
  height: 70px;
  background: var(--forest);
  color: #f8f2ea;
  letter-spacing: 0.7em;
  font-size: 1.15rem;
}

.auth-register {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 86px;
  color: #c6beb1;
  font-size: 0.84rem;
}

.auth-register a {
  text-decoration: underline;
}

.auth-footer {
  position: absolute;
  right: 42px;
  bottom: 24px;
  display: grid;
  gap: 8px;
  color: #c4bcaf;
  font-size: 0.72rem;
  text-align: right;
}

.auth-footer div {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}

.app-body {
  background:
    radial-gradient(circle at 20% 0%, rgba(221, 204, 166, 0.16), transparent 24%),
    linear-gradient(180deg, #f8f6f0 0%, #f3eee3 100%);
}

.workspace-shell {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  min-height: 100vh;
}

.workspace-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 22px;
  background: rgba(246, 242, 235, 0.96);
  border-right: 1px solid rgba(172, 164, 150, 0.14);
}

.workspace-brand strong {
  display: block;
  font-family: "Newsreader", serif;
  font-size: 2rem;
}

.workspace-brand span {
  color: #a7a094;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
}

.workspace-nav {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.nav-item,
.workspace-footer-nav a,
.nav-children span {
  display: block;
  padding: 10px 14px;
  color: #6b665d;
  font-family: "Inter", sans-serif;
  font-size: 0.96rem;
}

.nav-item.active {
  color: var(--seal);
  background: rgba(239, 232, 221, 0.88);
  font-weight: 600;
}

.nav-parent {
  padding-bottom: 4px;
}

.nav-children {
  display: grid;
  gap: 2px;
  margin-left: 16px;
}

.nav-children span {
  padding: 8px 14px;
  font-size: 0.9rem;
  color: #8b8478;
}

.workspace-footer-nav {
  display: grid;
  gap: 4px;
  padding-top: 20px;
  border-top: 1px solid rgba(172, 164, 150, 0.14);
}

.workspace-mainview {
  padding: 12px 28px 40px;
}

.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.searchbar {
  display: flex;
  align-items: center;
  width: min(100%, 560px);
  padding: 0 18px;
  background: rgba(251, 249, 243, 0.9);
  box-shadow: 0 14px 34px rgba(105, 91, 63, 0.05);
}

.search-icon {
  color: #72695d;
  font-size: 1.3rem;
}

.searchbar input {
  width: 100%;
  height: 50px;
  border: 0;
  background: transparent;
  color: #857d73;
}

.searchbar input:focus {
  outline: none;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

.topbar-actions button,
.topbar-actions a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #615d55;
  font-size: 1.2rem;
}

.workspace-section {
  margin-top: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.workspace-section h1,
.workspace-section h2 {
  margin: 0 0 18px;
  font-family: "Newsreader", serif;
  font-size: 3rem;
  font-weight: 500;
}

.select-toggle {
  color: #827c74;
  font-size: 1.1rem;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.action-card {
  min-height: 190px;
  padding: 22px 18px;
  background: rgba(255, 255, 255, 0.7);
}

.action-card.muted {
  background: rgba(242, 237, 228, 0.74);
}

.action-icon {
  color: #9a958b;
  font-size: 1.6rem;
}

.action-card h3 {
  margin: 72px 0 8px;
  font-family: "Newsreader", serif;
  font-size: 2rem;
  font-weight: 500;
}

.action-card p {
  margin: 0;
  color: #a4a096;
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
}

.knowledge-slot {
  display: grid;
  place-items: center;
  width: 104px;
  height: 126px;
  border: 1px dashed #d8d0c2;
  color: #d0c9bc;
  background: rgba(255, 255, 255, 0.35);
}

.knowledge-add {
  font-size: 2rem;
  line-height: 1;
}

.recent-content-grid {
  display: grid;
  grid-template-columns: 172px 148px 148px 1fr;
  gap: 22px;
}

.recent-item {
  min-height: 202px;
  background: rgba(255, 255, 255, 0.54);
}

.recent-book {
  display: grid;
  place-items: center;
}

.book-cover {
  width: 128px;
  height: 176px;
  background:
    linear-gradient(90deg, #ae9a6d 0 18%, #d5c8a8 18% 100%);
  box-shadow: 8px 0 0 rgba(120, 104, 70, 0.08);
}

.recent-note,
.recent-scroll {
  padding: 18px;
}

.recent-note span {
  color: #999287;
  font-size: 0.76rem;
}

.recent-note h3 {
  margin: 24px 0 0;
  font-family: "Newsreader", serif;
  font-size: 1.9rem;
  line-height: 1.2;
}

.scroll-cover {
  display: grid;
  place-items: center;
  height: 100%;
  font-family: "Newsreader", serif;
  font-size: 2rem;
  background: linear-gradient(180deg, #fbfaf7, #e8e2d5);
}

.recent-paper {
  background:
    radial-gradient(circle at 30% 30%, rgba(227, 201, 147, 0.54), transparent 30%),
    linear-gradient(180deg, rgba(239, 224, 185, 0.86), rgba(245, 236, 212, 0.82));
}

.reader-page {
  background: #f6f1e7;
}

.reader-shell-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.reader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  height: 68px;
  background: rgba(247, 243, 234, 0.96);
  border-bottom: 1px solid rgba(160, 149, 132, 0.12);
}

.reader-tabs {
  display: flex;
  gap: 18px;
}

.reader-tab {
  position: relative;
  padding: 16px 0;
  color: #8a8378;
}

.reader-tab.active {
  color: #2b2f2b;
}

.reader-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: #2d2e2b;
}

.reader-tab.plus {
  color: #bcb4a7;
}

.reader-top-actions {
  display: flex;
  gap: 14px;
  color: #797266;
}

.reader-workspace {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 240px;
  min-height: 0;
}

.reader-left,
.reader-center,
.reader-right {
  min-height: calc(100vh - 116px);
}

.reader-left {
  padding: 24px 18px;
  background: rgba(250, 248, 242, 0.86);
  border-right: 1px solid rgba(161, 152, 137, 0.12);
}

.left-title h1 {
  margin: 0;
  font-size: 2rem;
  font-family: "Newsreader", serif;
}

.left-title span {
  color: #b2aa9e;
  font-size: 0.8rem;
}

.chapter-list {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.chapter-list span {
  padding: 12px 10px;
  color: #8a847b;
  font-size: 0.94rem;
}

.chapter-list span.active {
  background: rgba(236, 232, 223, 0.96);
  color: #2b2c29;
  font-weight: 600;
}

.reader-center {
  position: relative;
  padding: 26px 36px 42px;
  background:
    linear-gradient(180deg, rgba(251, 249, 243, 0.94), rgba(247, 242, 233, 0.94));
}

.tool-float {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.tool-float button {
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  color: #645e54;
}

.reader-article {
  width: min(100%, 660px);
  margin: 0 auto;
  text-align: center;
}

.article-meta {
  margin-top: 14px;
  color: #c0b7a8;
  font-style: italic;
}

.reader-article h2 {
  margin: 8px 0 38px;
  font-family: "Newsreader", serif;
  font-size: 3.4rem;
  font-weight: 600;
}

.reader-article p {
  margin: 0 0 28px;
  color: #59544d;
  text-align: left;
  font-size: 1.2rem;
  line-height: 2.2;
}

.reader-article mark {
  background: rgba(175, 166, 137, 0.42);
  color: inherit;
}

.reader-anchor-note {
  margin-top: 72px;
  color: #dfd7cb;
  font-size: 0.92rem;
}

.reader-right {
  padding: 22px 18px;
  background: rgba(250, 249, 245, 0.88);
  border-left: 1px solid rgba(161, 152, 137, 0.12);
}

.side-card {
  margin-bottom: 18px;
  padding-bottom: 12px;
}

.side-label {
  display: block;
  margin-bottom: 10px;
  color: #bab1a4;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.source-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  background: rgba(243, 239, 230, 0.98);
}

.source-card strong,
.featured strong,
.side-card > strong {
  display: block;
  color: #242623;
  font-size: 1.05rem;
}

.source-card p,
.side-card p,
.side-card small {
  color: #8c8478;
  font-size: 0.82rem;
  line-height: 1.7;
}

.mini-seal {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 58px;
  border: 2px solid #716652;
  font-size: 0.72rem;
  writing-mode: vertical-rl;
}

.featured {
  padding: 14px;
  border-top: 2px solid #2c2e2a;
  background: rgba(243, 239, 230, 0.7);
}

.reader-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 18px;
  background: rgba(249, 246, 239, 0.96);
  border-top: 1px solid rgba(161, 152, 137, 0.12);
  color: #756f65;
  font-size: 0.86rem;
}

.bottom-right {
  display: flex;
  gap: 18px;
}

@media (max-width: 1100px) {
  .auth-shell,
  .workspace-shell,
  .reader-workspace,
  .action-grid,
  .recent-content-grid {
    grid-template-columns: 1fr;
  }

  .auth-body {
    overflow: auto;
  }

  .auth-form-panel,
  .workspace-mainview,
  .reader-center {
    padding-left: 24px;
    padding-right: 24px;
  }

  .workspace-sidebar {
    gap: 24px;
  }

  .reader-left,
  .reader-right {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .auth-copy {
    left: 10%;
    right: 10%;
    bottom: 10%;
  }

  .auth-form-panel {
    padding: 56px 24px 32px;
  }

  .auth-title h2,
  .workspace-section h1,
  .workspace-section h2,
  .reader-article h2 {
    font-size: 2.4rem;
  }

  .reader-top {
    height: auto;
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
