:root {
  color-scheme: light;
  --paper: #f6f0e7;
  --paper-raised: #fffaf3;
  --paper-deep: #eee3d4;
  --ink: #28231f;
  --ink-soft: #6e6259;
  --line: rgba(70, 55, 43, 0.16);
  --accent: #8a4638;
  --accent-strong: #6d3127;
  --accent-soft: #ead2c8;
  --highlight: rgba(232, 182, 74, 0.38);
  --highlight-overlap: rgba(210, 116, 74, 0.4);
  --shadow: 0 10px 28px rgba(61, 45, 34, 0.12);
  --header-height: 4.25rem;
  --reader-width: 46rem;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

body[data-reading-mode="eye"] {
  color-scheme: light;
  --paper: #f2eedc;
  --paper-raised: #f8f5e7;
  --paper-deep: #e4dfc8;
  --ink: #3d4032;
  --ink-soft: #6c705c;
  --line: rgba(71, 75, 50, 0.2);
  --accent: #64734b;
  --accent-strong: #4d5d38;
  --accent-soft: #d5debd;
  --highlight: rgba(193, 180, 81, 0.34);
  --highlight-overlap: rgba(151, 165, 93, 0.36);
  --shadow: 0 10px 28px rgba(55, 60, 36, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  background: var(--paper);
  color: var(--ink);
}

body.comment-sheet-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

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

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

button {
  color: inherit;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  flex-wrap: wrap;
  min-height: calc(var(--header-height) + env(safe-area-inset-top));
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: calc(0.65rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.65rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-brand {
  display: grid;
  flex: 1 1 8rem;
  max-width: 100%;
  min-width: 0;
  line-height: 1.15;
}

.brand-title {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle {
  overflow: hidden;
  margin-top: 0.2rem;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  flex: 0 1 auto;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
  gap: 0.25rem;
  font-family: system-ui, sans-serif;
  flex-wrap: nowrap;
}

.header-actions > * {
  min-width: 0;
}

.header-link,
.header-button,
.icon-button {
  display: inline-flex;
  height: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.8rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
  white-space: nowrap;
}

.header-link:hover,
.header-button:hover,
.icon-button:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.reading-mode-toggle {
  min-width: 3.2rem;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.reading-mode-toggle:hover,
.reading-mode-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-main {
  width: min(100%, 72rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 7rem) max(1.15rem, env(safe-area-inset-right)) 5rem max(1.15rem, env(safe-area-inset-left));
}

.hero {
  max-width: 52rem;
  margin: 0 auto clamp(5rem, 12vw, 9rem);
}

.hero h1 {
  max-width: 10em;
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.hero-intro {
  max-width: 43rem;
  margin-top: clamp(2rem, 6vw, 3.5rem);
  color: color-mix(in srgb, var(--ink) 88%, var(--ink-soft));
  font-size: clamp(1.03rem, 3.8vw, 1.2rem);
  line-height: 1.95;
}

.hero-intro p {
  margin: 0 0 1.2em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
  font-family: system-ui, sans-serif;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
}

.primary-action {
  background: var(--accent);
  color: #fffaf4;
}

.primary-action:hover {
  background: var(--accent-strong);
}

.secondary-action {
  border-color: var(--line);
  background: var(--paper-raised);
}

.secondary-action:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--accent-strong);
}

.directory-section {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  font-weight: 600;
}

.section-heading > p {
  max-width: 30rem;
  margin: 0;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  font-size: 0.88rem;
  line-height: 1.6;
}

.chapter-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chapter-list a {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.75rem;
  min-height: 3.35rem;
  padding: 0.78rem 0.35rem;
  border-bottom: 1px solid var(--line);
  line-height: 1.45;
}

.chapter-list a:hover,
.chapter-list a[aria-current="page"] {
  color: var(--accent-strong);
}

.chapter-list a[aria-current="page"] {
  background: var(--accent-soft);
}

.chapter-number {
  color: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.site-footer {
  padding: 2.5rem max(1rem, env(safe-area-inset-right)) calc(2.5rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  text-align: center;
}

.reading-progress {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--accent);
  will-change: transform;
}

.reader-main {
  width: min(100%, var(--reader-width));
  margin: 0 auto;
  padding: clamp(2.7rem, 9vw, 5.5rem) max(1.1rem, env(safe-area-inset-right)) calc(5rem + env(safe-area-inset-bottom)) max(1.1rem, env(safe-area-inset-left));
}

.chapter-header {
  margin-bottom: clamp(3.2rem, 10vw, 6rem);
  text-align: center;
}

.chapter-header h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.22;
}

.chapter-comment-button {
  min-height: 2.75rem;
  margin-top: 1.25rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
}

.chapter-comment-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chapter-content {
  font-size: clamp(1.08rem, 4.65vw, 1.22rem);
  letter-spacing: 0.018em;
  line-height: 2.04;
}

.content-block {
  position: relative;
  margin: 0 0 1.34em;
  padding-right: 2.25rem;
}

.block-copy {
  min-width: 0;
  margin: 0;
}

.block-text {
  white-space: pre-wrap;
}

.block-comment-button {
  position: absolute;
  top: 0.08rem;
  right: -0.35rem;
  display: inline-flex;
  min-width: 2.15rem;
  min-height: 2.15rem;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.25rem;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  opacity: 0.5;
}

.content-block:hover .block-comment-button,
.block-comment-button:focus-visible,
.block-comment-button:has(.comment-count:not([hidden])) {
  background: var(--paper-deep);
  color: var(--accent-strong);
  opacity: 1;
}

.comment-count {
  min-width: 1.15rem;
  padding: 0.05rem 0.22rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: system-ui, sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.4;
}

.comment-highlight {
  margin: 0;
  padding: 0.05em 0;
  border-radius: 0.12em;
  background: var(--highlight);
  color: inherit;
  cursor: pointer;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.comment-highlight.overlap {
  background: var(--highlight-overlap);
}

.chapter-end {
  display: grid;
  justify-items: center;
  gap: 1.2rem;
  margin: clamp(4rem, 13vw, 8rem) 0 3rem;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.chapter-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.chapter-navigation a,
.nav-placeholder {
  display: grid;
  gap: 0.3rem;
  min-height: 5rem;
  align-content: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.chapter-navigation a:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--paper-raised);
}

.chapter-navigation span {
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
}

.chapter-navigation b {
  overflow: hidden;
  font-size: 0.92rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-placeholder {
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
}

.toc-dialog {
  width: min(100% - 1rem, 46rem);
  max-width: none;
  max-height: min(88dvh, 52rem);
  margin: auto auto max(0.5rem, env(safe-area-inset-bottom));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.toc-dialog::backdrop {
  background: rgba(22, 17, 14, 0.5);
}

.toc-panel {
  display: grid;
  max-height: min(88dvh, 52rem);
  grid-template-rows: auto minmax(0, 1fr);
}

.toc-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.toc-panel h2 {
  margin: 0;
  font-size: 1.45rem;
}

.toc-panel .chapter-list {
  display: block;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 1rem calc(1rem + env(safe-area-inset-bottom));
}

.sheet-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgba(22, 17, 14, 0.48);
}

.comment-sheet {
  position: fixed;
  z-index: 80;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  max-height: min(88dvh, 50rem);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.35rem 1.35rem 0 0;
  background: var(--paper-raised);
  box-shadow: var(--shadow);
  transform: translateY(105%);
  transition: transform 220ms ease;
  visibility: hidden;
}

.comment-sheet.is-open {
  transform: translateY(0);
  visibility: visible;
}

.sheet-header {
  display: flex;
  min-height: 4.8rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem max(1rem, env(safe-area-inset-right)) 0.85rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
}

.sheet-kicker {
  max-width: 16rem;
  margin: 0 0 0.2rem;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.sheet-body {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1rem max(1rem, env(safe-area-inset-right)) calc(1rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.anchor-preview {
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 0.7rem 0.7rem 0;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.65;
}

.comment-status {
  min-height: 1.4rem;
  margin: 0.4rem 0 1rem;
  color: var(--ink-soft);
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
}

.comment-list {
  display: grid;
  gap: 0.8rem;
}

.comment-card {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--paper);
}

.comment-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: system-ui, sans-serif;
}

.comment-card strong {
  font-size: 0.86rem;
}

.comment-card time {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 0.68rem;
  white-space: nowrap;
}

.comment-card .icon-button {
  height: 2rem;
  min-height: 2rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
}

.comment-card blockquote {
  margin: 0.7rem 0 0;
  padding: 0.55rem 0.7rem;
  border-left: 2px solid var(--accent);
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.55;
}

.comment-body {
  margin: 0.65rem 0 0;
  font-size: 0.94rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-form {
  position: relative;
  display: grid;
  gap: 0.85rem;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-family: system-ui, sans-serif;
}

.comment-form h3 {
  margin: 0;
  font-size: 1rem;
}

.comment-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
}

.comment-form textarea {
  min-height: 6.8rem;
  resize: vertical;
  line-height: 1.55;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.website-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.form-footer b {
  font-weight: 500;
}

.submit-comment:disabled {
  cursor: wait;
  opacity: 0.58;
}

.selection-action {
  position: fixed;
  z-index: 65;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  min-height: 3.25rem;
  padding: 0.75rem 1.15rem;
  border: 0;
  border-radius: 0.45rem;
  background: var(--accent-strong);
  color: #fffaf4;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  left: 1rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin: auto;
  padding: 0.7rem 0.95rem;
  border-radius: 0.45rem;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  text-align: center;
}

.not-found {
  display: grid;
  min-height: calc(100dvh - var(--header-height));
  align-content: center;
  justify-items: start;
  width: min(100%, 42rem);
  margin: auto;
  padding: 3rem max(1.2rem, env(safe-area-inset-right)) 3rem max(1.2rem, env(safe-area-inset-left));
}

.not-found h1 {
  margin: 0;
  font-size: clamp(2.5rem, 10vw, 4.5rem);
}

.not-found > p:not(.eyebrow) {
  margin: 1rem 0 2rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

@media (max-width: 30rem) {
  .site-header {
    gap: 0.5rem;
    padding-right: max(0.65rem, env(safe-area-inset-right));
    padding-left: max(0.65rem, env(safe-area-inset-left));
  }

  .brand-subtitle {
    display: none;
  }

  .header-actions {
    gap: 0.1rem;
  }

  .header-link,
  .header-button,
  .icon-button {
    height: 2.5rem;
    min-height: 2.5rem;
    padding: 0.5rem 0.55rem;
    font-size: 0.78rem;
  }

  .reading-mode-toggle {
    min-width: 2.8rem;
  }
}

@media (min-width: 42rem) {
  .section-heading {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.7fr);
    align-items: end;
  }

  .chapter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.5rem;
  }

  .chapter-navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chapter-navigation a:nth-child(2),
  .chapter-navigation .nav-placeholder:nth-child(2) {
    text-align: right;
  }

  .toc-dialog {
    margin: auto;
  }

  .toc-panel .chapter-list {
    display: grid;
  }
}

@media (min-width: 48rem) {
  body.comment-sheet-open {
    overflow: auto;
  }

  .content-block {
    padding-right: 2.7rem;
  }

  .block-comment-button {
    right: -0.15rem;
    opacity: 0.25;
  }

  .sheet-backdrop {
    background: rgba(22, 17, 14, 0.2);
  }

  .comment-sheet {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(27rem, 92vw);
    max-height: none;
    border-radius: 1.2rem 0 0 1.2rem;
    transform: translateX(105%);
  }

  .comment-sheet.is-open {
    transform: translateX(0);
  }

  .sheet-header {
    padding-top: calc(0.85rem + env(safe-area-inset-top));
  }

}

@media (min-width: 48rem) and (pointer: fine) {
  .selection-action {
    right: auto;
    bottom: auto;
    left: 50%;
    width: max-content;
    min-height: 2.6rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.78rem;
  }
}

@media (hover: none) {
  .block-comment-button {
    opacity: 0.52;
  }
}

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

/* ========== 多小说支持样式 ========== */

.novels-list-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.novels-hero {
  text-align: center;
  margin: 3rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
}

.novels-hero h1 {
  font-size: 2.5rem;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.novels-hero p {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.9;
}

.novels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.novel-card {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.novel-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.novel-card-cover {
  width: 100%;
  height: 360px;
  object-fit: cover;
  background: #fff;
  display: block;
}

img.novel-card-cover {
  cursor: zoom-in;
}

.novel-card-cover-placeholder {
  border-bottom: 1px solid var(--border-light);
}

.novel-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.novel-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--ink);
  line-height: 1.4;
  min-height: 2.6rem;
}

.novel-card-subtitle {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.novel-card-desc {
  color: var(--ink-lighter);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.novel-card-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-align: center;
  align-self: flex-start;
}

.novel-card-link:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.novel-card-link:active {
  transform: scale(0.95);
}

.site-header-nav {
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-soft);
}

.site-back-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.site-back-link:hover {
  color: var(--ink);
}

.novel-cover {
  margin: 2rem 0;
  text-align: center;
}

.novel-cover img {
  max-width: 300px;
  max-height: 450px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: transform 0.3s;
}

.novel-cover img:hover {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .novels-hero h1 {
    font-size: 2rem;
  }

  .novels-hero p {
    font-size: 1rem;
  }

  .novels-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .novel-card-cover {
    height: 240px;
  }

  .novel-card-content {
    padding: 1rem;
  }

  .site-header-nav {
    padding: 0.75rem 1.5rem;
  }

  .site-back-link {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .novels-list-main {
    padding: 1rem;
  }

  .novels-hero {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }

  .novels-hero h1 {
    font-size: 1.5rem;
  }

  .novel-card-title {
    font-size: 1.1rem;
  }

  .novel-card-desc {
    font-size: 0.85rem;
  }
}

/* 首页响应式布局 */
.hero-wrapper {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  margin: 0;
}

.hero-cover {
  flex: 0 0 auto;
  min-width: 200px;
}

.novel-cover {
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: #fff;
}

.novel-cover:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
}

.novel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.novel-cover-placeholder {
  cursor: default;
  border: 1px solid var(--border-light);
}

.novel-cover-placeholder:hover {
  transform: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-lightbox-image]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.hero-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 图片放大光层 - 改进版本 */
.lightbox {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(4px);
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: zoom-out;
  animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  z-index: 1001;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.lightbox-close:active {
  transform: scale(0.95);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 手机端响应式调整 */
@media (max-width: 768px) {
  .hero-wrapper {
    flex-direction: column;
    gap: 2rem;
  }

  .hero-cover {
    min-width: 100%;
    max-width: 240px;
    margin: 0 auto;
  }

  .hero-content {
    width: 100%;
  }

  .lightbox-image {
    max-width: 95vw;
    max-height: 85vh;
  }

  .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: 10px;
    right: 10px;
  }

  .hero-intro {
    font-size: 0.95rem;
    line-height: 1.7;
  }
}
