:root {
  --paper: #f4f0e7;
  --paper-deep: #e8e0d1;
  --ink: #232a24;
  --ink-soft: #626b61;
  --forest: #315b45;
  --forest-deep: #234333;
  --sage: #a8b7a5;
  --line: rgba(42, 55, 45, 0.14);
  --white: #fffdf8;
  --amber: #b17234;
  --danger: #9d433d;
  --shadow: 0 24px 70px rgba(42, 48, 41, 0.11);
  font-family: "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.85), transparent 32rem),
    linear-gradient(120deg, rgba(206, 191, 164, 0.1), transparent 38%),
    var(--paper);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--forest);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.19em;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 0.88fr) minmax(420px, 1.12fr);
  padding: clamp(20px, 4vw, 64px);
  gap: clamp(24px, 4vw, 72px);
}

.login-card {
  align-self: center;
  justify-self: end;
  width: min(100%, 500px);
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid rgba(72, 83, 69, 0.11);
  border-radius: 3px;
  background: rgba(255, 253, 248, 0.83);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 32px;
  border-radius: 50%;
  color: var(--forest);
  background: #e7ece4;
}

.brand-mark svg {
  width: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-card h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.18;
}

.login-intro {
  margin: 18px 0 34px;
  max-width: 380px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.9;
}

.login-form label {
  display: block;
  margin-bottom: 9px;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  height: 54px;
  padding: 0 54px 0 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.password-field input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(49, 91, 69, 0.1);
}

.icon-button {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--forest);
  background: rgba(49, 91, 69, 0.07);
}

.icon-button svg,
.primary-button svg,
.copy-button svg,
.open-button svg,
.view-button svg,
.search-box svg,
.sort-control svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-message {
  min-height: 20px;
  margin: 8px 0;
  color: var(--danger);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.78rem;
}

.primary-button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border: 0;
  border-radius: 2px;
  color: #fffdf8;
  background: var(--forest);
  cursor: pointer;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease;
}

.primary-button:hover {
  background: var(--forest-deep);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.76;
  transform: none;
}

.primary-button.is-loading svg {
  animation: slide 900ms ease-in-out infinite;
}

@keyframes slide {
  50% {
    transform: translateX(4px);
  }
}

.privacy-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 24px;
  color: var(--ink-soft);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.73rem;
  line-height: 1.6;
}

.privacy-note svg {
  flex: 0 0 16px;
  width: 16px;
  margin-top: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.login-aside {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 560px;
  overflow: hidden;
  padding: clamp(32px, 6vw, 82px);
  border-radius: 3px;
  color: #f4f0e7;
  background:
    linear-gradient(180deg, rgba(24, 48, 35, 0.2), rgba(23, 45, 33, 0.9)),
    radial-gradient(circle at 20% 10%, #6a7f61, transparent 42%),
    #294637;
}

.login-aside::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  pointer-events: none;
}

.login-aside blockquote {
  position: relative;
  z-index: 1;
  margin: 0;
  width: min(100%, 520px);
  font-size: clamp(1.55rem, 3.2vw, 2.7rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.login-aside blockquote span {
  display: block;
  height: 38px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 5rem;
  line-height: 1;
}

.login-aside > p {
  position: relative;
  z-index: 1;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
}

.shelf-line {
  position: absolute;
  right: -8%;
  left: -8%;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
}

.shelf-line-one {
  top: 18%;
  transform: rotate(-3deg);
}

.shelf-line-two {
  top: 31%;
  transform: rotate(4deg);
}

.book-stack {
  position: absolute;
  top: 13%;
  right: 7%;
  left: 7%;
  height: 40%;
}

.book {
  position: absolute;
  display: block;
  width: 34px;
  border-radius: 2px 2px 0 0;
  opacity: 0.34;
  background: #d7d0bc;
  box-shadow: inset 3px 0 rgba(0, 0, 0, 0.1);
}

.book::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 9px;
  left: 9px;
  height: 1px;
  background: rgba(40, 58, 45, 0.4);
}

.book-one {
  bottom: 0;
  right: 4%;
  height: 74%;
  transform: rotate(2deg);
}

.book-two {
  bottom: 0;
  right: 14%;
  height: 85%;
  width: 42px;
  background: #adbaaa;
  transform: rotate(-1deg);
}

.book-three {
  bottom: 0;
  right: 26%;
  height: 63%;
  width: 29px;
  transform: rotate(3deg);
}

.book-four {
  bottom: 0;
  right: 34%;
  height: 72%;
  width: 38px;
  background: #cbb899;
  transform: rotate(-4deg);
}

.app-shell {
  width: min(1240px, calc(100% - clamp(28px, 6vw, 96px)));
  margin: 0 auto;
  padding-bottom: 52px;
}

.site-header {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.wordmark-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--forest);
  background: #e6ebe3;
}

.wordmark-icon svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wordmark strong,
.wordmark small {
  display: block;
}

.wordmark strong {
  font-size: 1.02rem;
  font-weight: 600;
}

.wordmark small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.15em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sync-note,
.text-button {
  color: var(--ink-soft);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.73rem;
}

.text-button {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.text-button:hover {
  color: var(--forest);
  border-color: currentColor;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(56px, 8vw, 110px) 0 clamp(42px, 6vw, 72px);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.065em;
}

.hero-copy > p:last-child {
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

.hero-stat {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 6px 10px;
  padding: 18px 0 2px 28px;
  border-left: 1px solid var(--line);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
}

.hero-stat strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  font-weight: 500;
}

.hero-stat span {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.hero-stat i {
  grid-column: 1 / -1;
  height: 1px;
  background: var(--line);
}

.library-panel {
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid rgba(61, 77, 63, 0.12);
  border-radius: 3px;
  background: rgba(255, 253, 248, 0.74);
  box-shadow: 0 20px 60px rgba(44, 53, 43, 0.07);
}

.activity-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: -28px 0 24px;
  border: 1px solid rgba(61, 77, 63, 0.12);
  border-radius: 3px;
  background: rgba(238, 241, 234, 0.72);
}

.activity-strip article {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-right: 1px solid var(--line);
}

.activity-strip article:last-child {
  border-right: 0;
}

.activity-strip small {
  color: var(--ink-soft);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.66rem;
}

.activity-strip p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.7rem;
}

.activity-strip strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5b9b6d;
  box-shadow: 0 0 0 4px rgba(91, 155, 109, 0.12);
}

.contact-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 13px 16px;
  border-left: 2px solid var(--forest);
  color: #5e695d;
  background: rgba(240, 242, 235, 0.76);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.74rem;
  line-height: 1.7;
}

.contact-notice svg {
  flex: 0 0 17px;
  width: 17px;
  margin-top: 2px;
  fill: none;
  stroke: var(--forest);
  stroke-width: 1.7;
  stroke-linecap: round;
}

.contact-notice p {
  margin: 0;
}

.contact-notice strong {
  color: var(--forest-deep);
  font-weight: 700;
}

.search-row {
  display: flex;
  gap: 12px;
}

.search-box {
  flex: 1;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.73);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-box:focus-within {
  border-color: rgba(49, 91, 69, 0.56);
  box-shadow: 0 0 0 3px rgba(49, 91, 69, 0.08);
}

.search-box svg {
  flex: 0 0 20px;
  color: var(--forest);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.92rem;
}

.search-box input::placeholder {
  color: #8f968d;
}

.search-box kbd {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: #929990;
  background: #f4f2ec;
  font-family: ui-sans-serif, sans-serif;
  font-size: 0.68rem;
}

.sort-control {
  position: relative;
  width: 142px;
  flex: 0 0 142px;
}

.sort-control select {
  width: 100%;
  height: 58px;
  padding: 0 38px 0 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  appearance: none;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.8rem;
}

.sort-control select:focus {
  border-color: var(--forest);
}

.sort-control svg {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 17px;
  transform: translateY(-50%);
  pointer-events: none;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-top: 20px;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.provider-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.provider-filters:empty {
  display: none;
}

.provider-chip {
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 11px;
  letter-spacing: 0.02em;
  opacity: 0.82;
}

.provider-chip.is-active {
  opacity: 1;
}

.category-chip,
.clear-button {
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid transparent;
  border-radius: 20px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.71rem;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.category-chip:hover,
.clear-button:hover {
  color: var(--forest);
  border-color: var(--line);
}

.category-chip.is-active {
  color: #fffdf8;
  background: var(--forest);
}

.clear-button {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.results-heading {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.results-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.73rem;
}

.view-toggle {
  display: flex;
  gap: 3px;
}

.view-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 2px;
  color: #899087;
  background: transparent;
  cursor: pointer;
}

.view-button.is-active {
  color: var(--forest);
  background: #e8ede5;
}

.warning-panel {
  margin-top: 18px;
  padding: 13px 16px;
  border-left: 2px solid var(--amber);
  color: #6c5031;
  background: rgba(196, 151, 85, 0.09);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.74rem;
  line-height: 1.6;
}

.warning-panel strong {
  display: block;
  margin-bottom: 2px;
}

.warning-panel p {
  margin: 2px 0;
}

.save-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(49, 91, 69, 0.18);
  border-radius: 10px;
  background: rgba(232, 238, 229, 0.6);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.save-tip p {
  margin: 0;
  flex: 1 1 auto;
}

.save-tip strong {
  color: var(--forest-deep);
  font-weight: 600;
}

.save-tip button {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.save-tip button:hover {
  background: rgba(49, 91, 69, 0.1);
  color: var(--forest-deep);
}

.funnel-summary {
  margin: 10px 2px 0;
  padding: 0 2px;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.book-list.view-list {
  display: block;
}

.book-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 108px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  animation: rise 300ms both;
}

.book-card:nth-child(2) {
  animation-delay: 35ms;
}

.book-card:nth-child(3) {
  animation-delay: 70ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

.file-badge {
  width: 50px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(49, 91, 69, 0.18);
  border-radius: 2px 7px 2px 2px;
  color: var(--forest);
  background:
    linear-gradient(135deg, transparent 10px, #edf0e8 10px) top right / 100% 100%,
    #edf0e8;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.book-content {
  min-width: 0;
}

.book-content h3 {
  margin: 0;
  overflow: hidden;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.book-topics span {
  padding: 2px 8px;
  border-radius: 10px;
  color: #677160;
  background: #edf0e9;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.66rem;
}

.book-detail {
  margin: 7px 0 0;
  color: #858c82;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.67rem;
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  row-gap: 6px;
}

.book-actions.is-multi .open-button,
.book-actions.is-multi .copy-button {
  min-height: 0;
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.book-actions.is-multi .open-button svg {
  width: 12px;
  height: 12px;
}

.book-meta {
  margin: 6px 0 0;
  overflow: hidden;
  color: #7c857b;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-meta:empty {
  display: none;
}

.copy-button,
.open-button,
.secondary-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.71rem;
}

.copy-button {
  width: 37px;
  padding: 0;
}

.copy-button:hover {
  color: var(--forest);
  border-color: rgba(49, 91, 69, 0.35);
}

.copy-button:disabled,
.open-button.is-disabled {
  color: #9ca39a;
  border-color: var(--line);
  background: transparent;
  cursor: not-allowed;
  opacity: 0.72;
}

.open-button {
  border-color: var(--forest);
  color: #fffdf8;
  background: var(--forest);
}

.open-button:hover {
  background: var(--forest-deep);
}

.open-button.is-disabled:hover {
  background: transparent;
}

.open-button svg {
  width: 15px;
}

.book-list.view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 20px;
}

.view-grid .book-card {
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: start;
  min-height: 168px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.38);
}

.view-grid .file-badge {
  width: 43px;
  height: 54px;
}

.view-grid .book-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 8px;
}

.empty-state {
  padding: 78px 20px 86px;
  text-align: center;
}

.empty-mark {
  color: var(--sage);
  font-size: 3rem;
}

.empty-state h3 {
  margin: 10px 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.empty-state p {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.secondary-button {
  padding: 0 18px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  color: #858b82;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.67rem;
}

.toast {
  position: fixed;
  right: 50%;
  bottom: 26px;
  z-index: 10;
  padding: 11px 18px;
  border-radius: 3px;
  color: #fffdf8;
  background: rgba(35, 67, 51, 0.95);
  box-shadow: 0 10px 40px rgba(30, 48, 36, 0.22);
  transform: translate(50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 0.78rem;
}

.toast.is-visible {
  transform: translate(50%, 0);
  opacity: 1;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .login-card {
    justify-self: stretch;
    width: 100%;
    max-width: 620px;
    margin: 24px auto;
  }

  .login-aside {
    min-height: 370px;
    width: 100%;
    max-width: 620px;
    margin: 0 auto 24px;
  }

  .book-stack {
    top: 8%;
    left: 48%;
    height: 36%;
  }

  .book-list.view-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: calc(100% - 28px);
  }

  .site-header {
    min-height: 78px;
  }

  .sync-note {
    display: none;
  }

  .hero {
    display: block;
    padding: 52px 2px 36px;
  }

  .hero-copy h1 {
    font-size: clamp(2.7rem, 14vw, 4rem);
  }

  .hero-copy > p:last-child {
    font-size: 0.86rem;
    line-height: 1.6;
  }

  .hero-stat {
    display: flex;
    gap: 8px;
    margin-top: 28px;
    padding: 0;
    border: 0;
  }

  .hero-stat strong {
    font-size: 1.55rem;
  }

  .hero-stat span:first-of-type {
    margin-right: 10px;
  }

  .hero-stat i {
    display: none;
  }

  .activity-strip {
    margin: -16px 0 18px;
  }

  .activity-strip article {
    min-height: 66px;
    display: block;
    padding: 12px 10px;
    text-align: center;
  }

  .activity-dot {
    display: none;
  }

  .activity-strip strong {
    font-size: 1.25rem;
  }

  .library-panel {
    padding: 14px;
  }

  .search-row {
    display: block;
  }

  .search-box {
    height: 54px;
  }

  .search-box kbd {
    display: none;
  }

  .sort-control {
    width: 100%;
    margin-top: 9px;
  }

  .sort-control select {
    height: 44px;
  }

  .filter-row {
    margin-top: 14px;
  }

  .category-filters {
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .category-filters::-webkit-scrollbar {
    display: none;
  }

  .category-chip {
    flex: 0 0 auto;
  }

  .clear-button {
    display: none;
  }

  .results-heading {
    margin-top: 14px;
  }

  .book-card,
  .view-grid .book-card {
    grid-template-columns: 39px minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 18px 2px;
  }

  .file-badge,
  .view-grid .file-badge {
    width: 36px;
    height: 47px;
    font-size: 0.5rem;
  }

  .book-content h3 {
    font-size: 0.98rem;
    white-space: normal;
  }

  .book-actions,
  .view-grid .book-actions {
    grid-column: 2;
    justify-content: flex-start;
    padding-top: 2px;
  }

  .book-list.view-grid {
    gap: 0;
    padding-top: 0;
  }

  .view-grid .book-card {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  .site-footer {
    display: block;
    line-height: 1.6;
  }

  .site-footer p:last-child {
    margin-top: 4px;
  }
}

.book-topics .provider-tag {
  padding: 2px 7px;
  color: var(--forest-deep);
  background: #e8eee5;
  font-weight: 700;
}

.results-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-mode-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.share-mode-button.is-active {
  border-color: var(--forest);
  color: #fffdf8;
  background: var(--forest);
}

.shared-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 13px 16px;
  border: 1px solid rgba(47, 90, 67, 0.16);
  color: #344b3b;
  background: rgba(232, 238, 229, 0.8);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

.shared-banner strong {
  margin-right: 8px;
}

.shared-banner button {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--forest);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.book-card {
  position: relative;
}

.book-card.is-selected {
  box-shadow: inset 0 0 0 2px var(--forest);
  background: rgba(232, 238, 229, 0.72);
}

.selection-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fffdf8;
  background: #fffdf8;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.book-card.is-selected .selection-toggle {
  border-color: var(--forest);
  background: var(--forest);
}

.selection-bar {
  position: fixed;
  right: max(24px, calc((100vw - 1200px) / 2));
  bottom: 24px;
  left: max(24px, calc((100vw - 1200px) / 2));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fffdf8;
  background: rgba(31, 49, 37, 0.96);
  box-shadow: 0 18px 50px rgba(31, 47, 35, 0.28);
  backdrop-filter: blur(14px);
}

.selection-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

.selection-summary strong {
  color: #fffdf8;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.selection-summary button {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.36);
  color: rgba(255, 255, 255, 0.8);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.generate-share-card {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #fffdf8;
  color: #20382a;
  background: #fffdf8;
  cursor: pointer;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.share-card-dialog {
  width: min(92vw, 620px);
  max-height: 92vh;
  padding: 24px;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(20, 32, 23, 0.32);
}

.share-card-dialog::backdrop {
  background: rgba(22, 32, 25, 0.62);
  backdrop-filter: blur(5px);
}

.share-card-dialog h2 {
  margin: 4px 0 4px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
  font-weight: 500;
}

.dialog-eyebrow {
  margin: 0;
  color: var(--forest);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.dialog-help {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 25px;
}

#share-card-image {
  display: block;
  width: 100%;
  max-height: 64vh;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fffdf8;
  pointer-events: auto;
  user-select: auto;
  -webkit-touch-callout: default;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.dialog-actions a,
.dialog-actions button {
  min-height: 44px;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--forest);
  color: #fffdf8;
  background: var(--forest);
  cursor: pointer;
  text-decoration: none;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 13px;
}

.dialog-actions button {
  color: var(--forest);
  background: transparent;
}

.limit-dialog {
  width: min(90vw, 430px);
  padding: 28px;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(20, 32, 23, 0.32);
}

.limit-dialog::backdrop {
  background: rgba(22, 32, 25, 0.62);
  backdrop-filter: blur(5px);
}

.limit-dialog h2 {
  margin: 5px 0 12px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
  font-weight: 500;
}

.limit-dialog > p:not(.dialog-eyebrow) {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

.limit-dialog > button {
  width: 100%;
  min-height: 44px;
  border: 0;
  color: #fffdf8;
  background: var(--forest);
  cursor: pointer;
}

@media (max-width: 680px) {
  .results-tools {
    gap: 5px;
  }

  .share-mode-button {
    min-height: 36px;
    padding: 0 9px;
    font-size: 11px;
  }

  .shared-banner {
    align-items: flex-start;
    font-size: 12px;
  }

  .selection-toggle {
    top: 9px;
    right: 2px;
    width: 34px;
    height: 34px;
  }

  .selection-bar {
    right: 12px;
    bottom: 12px;
    left: 12px;
    padding: 11px 12px;
  }

  .selection-summary {
    gap: 8px;
    font-size: 11px;
  }

  .selection-summary strong {
    font-size: 16px;
  }

  .selection-summary button {
    font-size: 11px;
  }

  .generate-share-card {
    min-height: 44px;
    padding: 0 14px;
  }

  .share-card-dialog {
    width: calc(100vw - 24px);
    padding: 20px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 书籍封面 */
.book-cover {
  position: relative;
  width: 58px;
  height: 78px;
  display: block;
  border-radius: 2px 6px 2px 2px;
  overflow: hidden;
}

.book-cover img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px 6px 2px 2px;
  box-shadow: 0 6px 16px rgba(35, 49, 38, 0.14);
}

.book-cover img ~ .file-badge {
  display: none;
}

.book-cover .file-badge {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.book-list.view-grid .book-cover {
  width: 84px;
  height: 112px;
}

@media (max-width: 680px) {
  .book-cover,
  .book-list.view-grid .book-cover {
    width: 28px;
    height: 36px;
  }

  .book-cover img {
    box-shadow: 0 3px 8px rgba(35, 49, 38, 0.12);
  }

  .provider-filters {
    margin-top: 3px;
    gap: 5px;
  }

  .provider-chip {
    min-height: 18px;
    padding: 0 8px;
    font-size: 10px;
  }

  .book-list .book-card,
  .book-list.view-grid .book-card {
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .book-actions.is-multi {
    gap: 5px;
    row-gap: 4px;
  }

  .book-actions.is-multi .open-button,
  .book-actions.is-multi .copy-button {
    height: 24px;
    padding: 0 8px;
    font-size: 10px;
    gap: 4px;
  }

  .book-actions.is-multi .open-button svg {
    display: none;
  }

  .book-actions.is-multi .open-prefix {
    display: none;
  }

  .book-actions.is-multi .copy-button svg {
    width: 11px;
    height: 11px;
  }
}


/* 2026 editorial catalog redesign */
.login-card h1 {
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  line-height: 1.2;
  text-wrap: balance;
}

.login-card h1 span {
  display: block;
}

.hero {
  display: block;
  padding: clamp(54px, 6vw, 72px) 0 34px;
}

.hero-copy h1 {
  max-width: 900px;
  font-size: clamp(58px, 5.2vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero-copy h1 span {
  display: inline;
}

.hero-copy > p:last-child {
  margin-top: 18px;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.metrics-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 22px 0 18px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
}

.metric-card {
  min-height: 76px;
  padding: 14px 20px;
  border-right: 1px solid var(--line);
}

.metric-card:last-child {
  border-right: 0;
}

.metric-card small {
  display: block;
  color: var(--ink-soft);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.metric-card p {
  margin: 3px 0 0;
}

.metric-card strong {
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
}

.metric-card span {
  margin-left: 4px;
  color: var(--ink-soft);
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 12px;
}

.online-metric small::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #4e8a60;
  box-shadow: 0 0 0 4px rgba(78, 138, 96, 0.12);
}

.contact-notice {
  margin-bottom: 18px;
  padding: 13px 16px;
  font-size: 14px;
  line-height: 1.65;
}

.contact-notice svg {
  width: 18px;
  flex-basis: 18px;
}

.library-panel {
  padding: 22px;
}

.search-box {
  height: 54px;
}

.search-box input {
  font-size: 15px;
}

.sort-control select {
  height: 54px;
  min-width: 136px;
}

.category-chip {
  min-height: 38px;
  padding: 7px 13px;
  border-color: var(--line);
  font-size: 12px;
}

.results-heading {
  min-height: 54px;
  margin-top: 16px;
}

.results-heading p {
  font-size: 13px;
}

.book-list.view-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding-top: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.book-list.view-grid .book-card {
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  min-height: 158px;
  padding: 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.26);
}

.book-list.view-grid .file-badge {
  width: 42px;
  height: 54px;
  font-size: 10px;
}

.book-list .book-content h3 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.45;
  white-space: normal;
  text-overflow: initial;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.book-topics {
  margin-top: 7px;
}

.book-topics span {
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
}

.book-detail {
  margin-top: 5px;
  color: #69736a;
  font-size: 12px;
}

.book-list.view-grid .book-actions {
  grid-column: 2;
  justify-content: flex-start;
  margin-top: 0;
  padding-top: 12px;
}

.book-actions .copy-button,
.book-actions .open-button {
  height: 42px;
  min-height: 42px;
}

.book-actions .copy-button {
  width: auto;
  padding: 0 13px;
  font-size: 13px;
}

@media (max-width: 680px) {
  .book-actions .copy-button {
    letter-spacing: 0.01em;
  }
}

.book-actions .open-button {
  padding: 0 13px;
  font-size: 13px;
}

.load-more {
  width: 100%;
  min-height: 46px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--forest);
  background: transparent;
  cursor: pointer;
  font-family: ui-sans-serif, "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

.load-more:hover {
  border-color: var(--forest);
  background: rgba(232, 238, 229, 0.45);
}

.site-footer {
  font-size: 12px;
}

@media (max-width: 680px) {
  .login-aside {
    display: none;
  }

  .login-shell {
    min-height: 100vh;
    padding: 14px;
  }

  .login-card {
    margin: 16px auto;
    padding: 32px 24px;
  }

  /* 手机端压缩头部与筛选区，保证一屏至少 5 本 */
  .site-header {
    min-height: 52px;
  }

  .wordmark-icon {
    width: 30px;
    height: 30px;
  }

  .wordmark-icon svg {
    width: 19px;
  }

  .wordmark strong {
    font-size: 15px;
  }

  .wordmark small {
    margin-top: 0;
    font-size: 9px;
    letter-spacing: 0.08em;
  }

  .header-actions {
    gap: 10px;
  }

  .text-button {
    padding: 4px 0;
    font-size: 12px;
  }

  .hero {
    padding: 6px 2px 6px;
  }

  .hero .eyebrow {
    display: none;
  }

  .hero-copy h1 {
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.03em;
  }

  .hero-copy h1 span {
    display: inline;
  }

  .hero-copy > p:last-child {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.4;
  }

  .metrics-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 8px 0;
  }

  .metric-card {
    min-height: 0;
    padding: 6px 9px;
    border-bottom: 0;
  }

  .metric-card:nth-child(3) {
    border-right: 0;
  }

  .metric-card:nth-child(4),
  .metric-card:nth-child(5) {
    display: none;
  }

  .metric-card small {
    font-size: 10px;
  }

  .metric-card p {
    margin-top: 1px;
  }

  .metric-card strong {
    font-size: 17px;
  }

  .metric-card span {
    font-size: 10px;
  }

  .contact-notice {
    gap: 6px;
    max-height: 42px;
    margin: 0 0 6px;
    padding: 5px 8px;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.4;
  }

  .contact-notice svg {
    width: 14px;
    flex-basis: 14px;
    margin-top: 1px;
  }

  .library-panel {
    padding: 10px;
  }

  .search-row {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    gap: 6px;
    padding: 4px 0 3px;
    background: rgba(249, 246, 238, 0.96);
    backdrop-filter: blur(10px);
  }

  .search-box {
    height: 38px;
    gap: 8px;
    padding: 0 11px;
  }

  .search-box svg {
    width: 16px;
    flex-basis: 16px;
  }

  .search-box input {
    font-size: 13px;
  }

  .sort-control {
    width: 92px;
    flex: 0 0 92px;
    margin-top: 0;
  }

  .sort-control select {
    height: 38px;
    min-width: 0;
    padding: 0 22px 0 9px;
    font-size: 11px;
  }

  .sort-control svg {
    right: 6px;
    width: 13px;
  }

  .filter-row {
    align-items: center;
    margin-top: 2px;
  }

  .category-filters {
    gap: 6px;
    padding-bottom: 2px;
  }

  .category-chip {
    min-height: 28px;
    padding: 3px 10px;
    font-size: 11.5px;
  }

  .results-heading {
    min-height: 34px;
    margin-top: 4px;
  }

  .results-heading p {
    font-size: 11.5px;
  }

  .view-button {
    width: 28px;
    height: 28px;
  }

  .warning-panel {
    max-height: 32px;
    margin-top: 6px;
    padding: 5px 8px;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.35;
  }

  .warning-panel strong {
    display: inline;
    margin: 0 4px 0 0;
  }

  .warning-panel p {
    display: inline;
  }

  .book-list.view-grid {
    display: block;
    border-left: 0;
  }

  .book-list.view-grid .book-card {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-height: 0;
    padding: 3px 0;
    border-right: 0;
    background: transparent;
  }

  .book-list.view-grid .file-badge {
    width: 26px;
    height: 34px;
    border-radius: 2px 5px 2px 2px;
    font-size: 6.5px;
  }

  .book-list .book-content h3 {
    font-size: 14px;
    line-height: 1.35;
    -webkit-line-clamp: 1;
  }

  .book-meta {
    margin-top: 1px;
    font-size: 10px;
    line-height: 1.35;
  }

  .book-list.view-grid .book-actions {
    grid-column: 2;
    gap: 6px;
    padding-top: 3px;
  }

  .book-actions .copy-button,
  .book-actions .open-button {
    height: 26px;
    min-height: 26px;
    gap: 4px;
    padding: 0 8px;
    font-size: 11px;
  }

  .book-actions .copy-button svg,
  .book-actions .open-button svg {
    width: 13px;
  }

  .selection-toggle {
    top: 6px;
    right: 0;
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .load-more {
    min-height: 40px;
    margin-top: 10px;
    font-size: 12px;
  }

  .site-footer {
    font-size: 10.5px;
  }
}


/* 手机构图优先：一屏 5 本，转存说明交给引导页本身，不在列表页占高 */
@media (max-width: 680px) {
  .save-tip {
    display: none;
  }
}

/* 移动端密度：多网盘入口与第二行筛选共存时，仍保证一屏 5 本 */
@media (max-width: 680px) {
  .book-list .book-card,
  .book-list.view-grid .book-card {
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .book-list .book-actions .open-button,
  .book-list .book-actions .copy-button {
    height: 24px;
    min-height: 0;
    padding: 0 8px;
    font-size: 10px;
    gap: 4px;
  }

  .book-list .book-actions .open-button svg {
    display: none;
  }
}

/* 网盘筛选与分类筛选用细分隔，避免挤成一条 */
@media (min-width: 681px) {
  .provider-filters {
    margin-left: 4px;
    padding-left: 10px;
    border-left: 1px solid var(--line);
    align-items: center;
  }

  .book-actions.is-multi .open-button {
    padding: 0 10px;
  }
}

@media (min-width: 681px) {
  .book-actions.is-multi {
    gap: 6px;
    row-gap: 6px;
  }

  .book-actions.is-multi .open-button,
  .book-actions.is-multi .copy-button {
    padding: 0 8px;
    font-size: 11.5px;
    gap: 5px;
  }

  .book-actions.is-multi .open-button svg {
    width: 11px;
    height: 11px;
  }
}

/* 移动端：网盘筛选单独一行，横向可滑，不占高 */
@media (max-width: 680px) {
  .provider-filters {
    flex: 1 0 100%;
    flex-wrap: nowrap;
    gap: 4px;
    margin-top: 2px;
    padding-bottom: 1px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .provider-filters::-webkit-scrollbar {
    display: none;
  }

  .provider-chip {
    flex: 0 0 auto;
    min-height: 18px;
    padding: 0 7px;
    font-size: 9.5px;
  }
}

@media (max-width: 680px) {
  .filter-row {
    flex-wrap: wrap;
    row-gap: 2px;
  }

  #category-filters {
    flex: 1 0 100%;
  }
}

/* ===== 2026-12-05 卡片 v3：简介两行 + 单一保存入口 + 网盘选择抽屉 ===== */
.book-list .book-card,
.book-list.view-grid .book-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 16px;
  row-gap: 0;
}

.book-intro {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: ui-sans-serif, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.78rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
}

.book-footer {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  margin-top: 10px;
}

.book-save {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.book-save-main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--forest);
  color: #fff;
  font-family: ui-sans-serif, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.book-save-main:hover {
  background: var(--forest-deep);
}

.book-save-main:active {
  transform: translateY(1px);
}

.book-save-main.is-disabled {
  background: #d9d5ca;
  color: #6d6a61;
  pointer-events: none;
}

.book-save-more {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  min-height: 40px;
  padding: 0;
  border: 1px solid rgba(49, 91, 69, 0.3);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--forest);
  cursor: pointer;
}

.book-save-more:hover {
  border-color: var(--forest);
  background: #eef3ee;
}

.book-save-more svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.book-save-more.is-placeholder {
  border-color: rgba(49, 91, 69, 0.12);
  background: rgba(255, 253, 248, 0.45);
  pointer-events: none;
}

.book-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 7px 0 0;
  color: #8a9088;
  font-family: ui-sans-serif, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  line-height: 1.4;
}

.book-hint-dot {
  color: #c3c6bd;
}

.book-copy {
  padding: 0;
  border: 0;
  background: none;
  color: var(--forest);
  font-family: inherit;
  font-size: 11px;
  text-decoration: underline;
  text-decoration-color: rgba(49, 91, 69, 0.35);
  text-underline-offset: 3px;
  cursor: pointer;
}

.book-copy:hover {
  text-decoration-color: var(--forest);
}

/* 抽屉 */
.provider-sheet {
  width: min(440px, 100vw);
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 20px 20px 0 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 -18px 50px rgba(35, 42, 36, 0.22);
}

.provider-sheet::backdrop {
  background: rgba(28, 36, 30, 0.36);
}

.provider-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 10px;
}

.provider-sheet-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.provider-sheet-list {
  padding: 0 12px 4px;
}

.provider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 10px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
}

.provider-row:first-child {
  border-top: 0;
}

.provider-row:hover {
  background: rgba(42, 55, 45, 0.05);
}

.provider-badge {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #edf0e8;
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
}

.provider-name {
  flex: 1 1 auto;
}

.provider-go {
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 12.5px;
}

.provider-sheet-tip {
  margin: 0;
  padding: 10px 22px 22px;
  color: #8a9088;
  font-family: ui-sans-serif, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 680px) {
  .book-list .book-card,
  .book-list.view-grid .book-card {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
    padding: 8px 0 10px;
    min-height: 0;
  }

  .book-intro {
    margin-top: 4px;
    font-size: 0.72rem;
    line-height: 1.5;
  }

  .book-footer {
    margin-top: 8px;
  }

  .book-save-main {
    min-height: 38px;
    font-size: 13px;
  }

  .book-save-more {
    flex-basis: 38px;
    min-height: 38px;
  }

  .book-hint {
    margin-top: 6px;
    font-size: 10.5px;
  }

  .book-copy {
    font-size: 10.5px;
  }
}

/* v3 密度微调：简介两行的前提下尽量把卡片压回紧凑 */
@media (max-width: 680px) {
  .book-list .book-card,
  .book-list.view-grid .book-card {
    padding: 6px 0 8px;
  }

  .book-intro {
    margin-top: 3px;
    font-size: 0.72rem;
    line-height: 1.45;
  }

  .book-footer {
    margin-top: 6px;
  }

  .book-save-main {
    min-height: 36px;
    border-radius: 10px;
    font-size: 12.5px;
  }

  .book-save-more {
    flex-basis: 36px;
    min-height: 36px;
    border-radius: 10px;
  }

  .book-hint {
    margin-top: 5px;
  }
}

@media (min-width: 681px) {
  .book-save {
    max-width: 340px;
  }
}

/* ===== 私享资源（owner 专属可见） ===== */
:root {
  --private-ink: #A8763F;
  --private-wash: rgba(168, 118, 63, 0.1);
}

.book-card.is-private {
  position: relative;
  box-shadow: inset 3px 0 0 var(--private-ink), 0 10px 24px rgba(20, 40, 30, 0.08);
}

.private-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--private-ink);
  color: #fff;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  box-shadow: 0 4px 10px rgba(168, 118, 63, 0.32);
}

.book-save-main.is-private-link {
  border: 1px dashed var(--private-ink);
  background: var(--private-wash);
  color: #7a5223;
}

.book-save-main.is-private-link:disabled {
  opacity: 0.55;
}

.scope-summary {
  margin: 10px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: #7a5223;
}


.scope-filter .category-chip[data-scope="private"].is-active {
  background: var(--private-ink);
  border-color: var(--private-ink);
  color: #fff;
}

.private-link-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 26px 24px 22px;
  border: 1px solid rgba(20, 40, 30, 0.12);
  border-radius: 18px;
}

.private-link-book {
  margin: 6px 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.private-link-dialog input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(168, 118, 63, 0.45);
  border-radius: 10px;
  background: #fdfaf5;
  font-size: 13px;
  color: #4a3a24;
}

.private-link-countdown {
  margin: 10px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #9a4b1e;
}
.scope-filter { margin-left: 14px; padding-left: 14px; border-left: 1px solid rgba(31,58,49,.14); }


@media (max-width: 680px) {
  .filter-row {
    flex-wrap: nowrap;
    align-items: center;
  }
  #category-filters {
    flex: 1 1 auto;
    min-width: 0;
  }
  #scope-filter {
    flex: 0 0 auto;
    margin-left: 0;
    padding-left: 10px;
  }
  #scope-filter .category-chip {
    min-height: 26px;
    padding: 2px 9px;
    font-size: 11px;
  }
}

@media (max-width: 680px) {
  #category-filters {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
}

/* 私享范围胶囊跟分类同一行，靠左边线分隔 */
.scope-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding-left: 10px;
  border-left: 1px solid rgba(31, 58, 49, 0.16);
}
