/* 寻梦网文 — 番茄小说风格前台
 * 书库 / 书详情 / 沉浸阅读
 */

.xm-novel-accent-from-theme {
  --xm-novel-accent: var(--theme-color, #ff6740);
}

.xm-novel-shell {
  --xm-novel-accent: var(--xm-novel-accent, #ff6740);
  --xm-novel-muted: var(--muted-color, #8a8a8a);
  --xm-novel-bg: #f7f7f7;
  --xm-novel-text: var(--key-color, #222);
  --xm-novel-radius: 8px;
  --xm-novel-orange: #ff6740;
  color: var(--xm-novel-text);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.xm-novel-shell:not(.theme-box) {
  background: var(--main-bg-color, #fff);
  border-radius: var(--main-radius, 8px);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
  padding: 20px 22px 24px;
}

.xm-novel-shell.theme-box {
  padding: 20px 22px 24px;
}

.page-article .xm-novel-shell,
.wp-posts-content .xm-novel-shell {
  margin-top: 0;
}

.limit-height .wp-posts-content .xm-novel-shell,
.article.limit-height .wp-posts-content .xm-novel-shell {
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

/* ========== 书库 ========== */
.xm-novel-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.xm-novel-hero-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 2px;
  letter-spacing: 0.02em;
}

.xm-novel-hero-desc {
  margin: 0;
  color: var(--xm-novel-muted);
  font-size: 13px;
}

.xm-novel-layout-toggle,
.xm-novel-layout-btn {
  display: none !important;
}

.xm-novel-library-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 13px;
  color: #999;
}

.xm-novel-library-total {
  color: #666;
}

/* 番茄横排书卡网格：一排可设 1～4 列 */
.xm-novel-book-list {
  --xm-novel-cols: 4;
  display: grid;
  grid-template-columns: repeat(var(--xm-novel-cols), minmax(0, 1fr));
  gap: 20px 24px;
  width: 100%;
}

.xm-novel-book-card {
  background: transparent;
  overflow: visible;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 0;
  transition: opacity 0.15s;
  min-width: 0;
}

.xm-novel-book-card:hover {
  background: transparent;
  opacity: 0.92;
  transform: none;
  box-shadow: none;
}

.xm-novel-book-link {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  text-decoration: none !important;
  color: inherit !important;
}

.xm-novel-cover-wrap {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  background: #f3f3f3;
}

.xm-novel-book-list[data-cols="1"] .xm-novel-cover-wrap {
  width: 96px;
}

.xm-novel-book-list[data-cols="2"] .xm-novel-cover-wrap {
  width: 84px;
}

.xm-novel-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.xm-novel-cover--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #ffd4c4, #ffb39a);
  color: #c44520;
  font-size: 1.25rem;
  font-weight: 700;
}

.xm-novel-book-info {
  flex: 1;
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.xm-novel-book-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #222;
  margin: 0 !important;
  padding: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.xm-novel-book-author,
.xm-novel-book-meta-line,
.xm-novel-book-time {
  font-size: 12px;
  color: #999;
  line-height: 1.4;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xm-novel-book-synopsis {
  font-size: 12px;
  color: #999;
  line-height: 1.45;
  margin: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.xm-novel-book-time {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .xm-novel-book-list {
    grid-template-columns: repeat(min(3, var(--xm-novel-cols)), minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .xm-novel-book-list {
    grid-template-columns: repeat(min(2, var(--xm-novel-cols)), minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .xm-novel-book-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .xm-novel-cover-wrap,
  .xm-novel-book-list[data-cols="1"] .xm-novel-cover-wrap,
  .xm-novel-book-list[data-cols="2"] .xm-novel-cover-wrap {
    width: 78px;
  }

  .xm-novel-book-title {
    font-size: 15px;
  }
}

/* 兼容旧 class */
.xm-novel-book-grid {
  display: grid;
  grid-template-columns: repeat(var(--xm-novel-cols, 4), minmax(0, 1fr));
  gap: 20px 24px;
}

.xm-novel-cover-badge {
  display: none;
}

.xm-novel-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

/* 番茄书库：多行筛选 */
.xm-novel-library-filters {
  background: #fafafa;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid #f0f0f0;
}

.xm-novel-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
}

.xm-novel-filter-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.xm-novel-filter-row:first-child {
  padding-top: 0;
}

.xm-novel-filter-label {
  flex: 0 0 48px;
  font-size: 13px;
  color: #999;
  line-height: 28px;
  font-weight: 500;
}

.xm-novel-filter-opts {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  min-width: 0;
}

.xm-novel-library-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 13px;
  color: #999;
}

.xm-novel-library-total {
  color: #666;
}

.xm-novel-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 4px;
  background: transparent;
  color: #555 !important;
  text-decoration: none !important;
  font-size: 13px;
  line-height: 20px;
  transition: background 0.15s, color 0.15s;
}

.xm-novel-filter-chip:hover {
  background: #fff3ef;
  color: var(--xm-novel-orange) !important;
}

.xm-novel-filter-chip.is-active {
  background: var(--xm-novel-orange);
  color: #fff !important;
  font-weight: 600;
}

.xm-novel-book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.xm-novel-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #fff3ef;
  color: var(--xm-novel-orange);
  line-height: 1.4;
}

.xm-novel-tag.is-muted {
  background: #f5f5f5;
  color: #888;
}

.xm-novel-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--xm-novel-muted);
}

.xm-novel-empty-hint {
  margin: 8px 0 0;
  font-size: 13px;
  opacity: 0.75;
  line-height: 1.55;
}

.xm-novel-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
}

.xm-novel-pager-link {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f5f5f5;
  color: inherit !important;
  text-decoration: none !important;
  font-size: 13px;
}

.xm-novel-pager-link.is-active {
  background: var(--xm-novel-orange);
  color: #fff !important;
  font-weight: 600;
}

/* ========== 书详情（番茄 page） ========== */
.xm-novel-crumb {
  font-size: 13px;
  color: var(--xm-novel-muted);
  margin-bottom: 18px;
}

.xm-novel-crumb a {
  color: var(--xm-novel-muted) !important;
  text-decoration: none !important;
}

.xm-novel-crumb a:hover {
  color: var(--xm-novel-orange) !important;
}

.xm-novel-crumb-sep {
  margin: 0 6px;
  opacity: 0.5;
}

.xm-novel-book-header {
  display: flex;
  gap: 24px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.xm-novel-book-header-cover {
  width: 160px;
  flex-shrink: 0;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.xm-novel-book-header-cover img,
.xm-novel-book-header-cover .xm-novel-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xm-novel-book-header-info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.xm-novel-book-header-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 12px !important;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.xm-novel-book-header-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.xm-novel-book-header-meta {
  color: var(--xm-novel-muted);
  margin: 0 0 10px !important;
  font-size: 13px;
  line-height: 1.6;
}

.xm-novel-book-header-meta strong {
  color: #444;
  font-weight: 600;
}

.xm-novel-book-header-update {
  font-size: 13px;
  color: #999;
  margin-bottom: 18px;
}

.xm-novel-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  height: 42px;
  padding: 0 28px;
  border-radius: 22px;
  background: var(--xm-novel-orange);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 4px 12px rgba(255, 103, 64, 0.35);
}

.xm-novel-btn-primary:hover {
  opacity: 0.92;
  color: #fff !important;
  transform: translateY(-1px);
}

.xm-novel-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  height: 42px;
  padding: 0 20px;
  border-radius: 22px;
  background: #fff3ef;
  color: var(--xm-novel-orange) !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
  margin-left: 10px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.xm-novel-book-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin-top: 4px;
}

.xm-novel-btn-primary.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

.xm-novel-author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  font-size: 14px;
}

.xm-novel-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb39a, #ff6740);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.xm-novel-author-name {
  font-weight: 600;
}

.xm-novel-author-motto {
  color: var(--xm-novel-muted);
  font-size: 12px;
  margin-top: 2px;
}

.xm-novel-synopsis {
  margin: 28px 0 8px;
  padding-top: 8px;
}

.xm-novel-section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px !important;
  padding-left: 10px;
  border-left: 3px solid var(--xm-novel-orange);
  line-height: 1.2;
}

.xm-novel-synopsis-text {
  font-size: 14px;
  line-height: 1.85;
  color: #444;
  white-space: pre-wrap;
}

.xm-novel-chapter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 12px;
}

.xm-novel-chapter-head h2,
.xm-novel-chapter-head .xm-novel-section-title {
  margin: 0 !important;
}

.xm-novel-chapter-count {
  font-size: 13px;
  color: var(--xm-novel-muted);
  font-weight: 400;
}

.xm-novel-volume-block {
  margin-bottom: 16px;
}

.xm-novel-volume-title {
  font-size: 14px;
  font-weight: 600;
  padding: 12px 4px 10px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 0;
}

.xm-novel-empty--sm {
  padding: 1rem;
  font-size: 13px;
}

.xm-novel-chapter-list {
  list-style: none !important;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  counter-reset: none;
}

@media (max-width: 900px) {
  .xm-novel-chapter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .xm-novel-book-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .xm-novel-book-header-cover {
    width: 140px;
  }

  .xm-novel-book-header-tags,
  .xm-novel-book-header-info .xm-novel-btn-primary {
    justify-content: center;
  }

  .xm-novel-book-header-info .xm-novel-btn-ghost {
    margin-left: 8px;
  }

  .xm-novel-author-row {
    justify-content: center;
  }

  .xm-novel-chapter-list {
    grid-template-columns: 1fr;
  }
}

.xm-novel-chapter-list li {
  margin: 0;
  padding: 0;
  list-style: none !important;
  border-bottom: 1px solid #f5f5f5;
}

.xm-novel-chapter-list li::marker,
.xm-novel-chapter-list li::before {
  content: none !important;
  display: none !important;
}

.xm-novel-chapter-item {
  display: block;
  padding: 12px 10px 12px 4px;
  text-decoration: none !important;
  color: #333 !important;
  transition: color 0.15s;
  font-size: 14px;
  line-height: 1.45;
}

.xm-novel-chapter-item:hover {
  color: var(--xm-novel-orange, #ff6740) !important;
  background: transparent;
}

.xm-novel-chapter-title {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== 阅读页（番茄 reader） ========== */
.xm-novel-reader {
  --xm-novel-accent: var(--theme-color, #ff6740);
  --xm-reader-bg: #f6f3eb;
  --xm-reader-fg: #1a1a1a;
  --xm-reader-muted: #888;
  --xm-reader-size: 18px;
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0;
  background: var(--xm-reader-bg);
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  color: var(--xm-reader-fg);
  transition: background 0.2s, color 0.2s;
}

.xm-novel-reader.is-night {
  --xm-reader-bg: #1c1c1c;
  --xm-reader-fg: #c8c8c8;
  --xm-reader-muted: #777;
}

.xm-novel-reader-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(246, 243, 235, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.xm-novel-reader.is-night .xm-novel-reader-bar {
  background: rgba(28, 28, 28, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.xm-novel-reader-back {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 22px;
  text-decoration: none !important;
  color: inherit !important;
  background: rgba(0, 0, 0, 0.05);
}

.xm-novel-reader.is-night .xm-novel-reader-back {
  background: rgba(255, 255, 255, 0.08);
}

.xm-novel-reader-bar-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  color: inherit !important;
  text-decoration: none !important;
}

.xm-novel-reader-bar-spacer {
  width: 36px;
  flex: 0 0 36px;
}

.xm-novel-reader-body {
  padding: 28px 36px 100px;
}

.xm-novel-reader-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px !important;
  text-align: center;
}

.xm-novel-reader-meta {
  text-align: center;
  font-size: 12px;
  color: var(--xm-reader-muted);
  margin-bottom: 28px;
}

.xm-novel-reader-content {
  font-size: var(--xm-reader-size);
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: var(--xm-reader-fg);
  max-width: 680px;
  margin: 0 auto;
}

.xm-novel-reader-content p {
  margin: 0 0 1.15em !important;
  text-indent: 2em;
}

.xm-novel-reader-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
}

.xm-novel-reader-copyright {
  max-width: 680px;
  margin: 2rem auto 0;
  padding: 1rem 1.1rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  color: var(--xm-reader-muted);
}

.xm-novel-reader-copyright p {
  margin: 0;
  text-indent: 0;
}

.xm-novel-reader-copyright p + p {
  margin-top: 0.25em;
}

.xm-novel-reader-copyright a {
  color: var(--xm-novel-accent, #ff6740) !important;
  text-decoration: none !important;
}

.xm-novel-reader-copyright a:hover {
  text-decoration: underline !important;
}

.xm-novel-reader.is-night .xm-novel-reader-copyright {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.xm-novel-reader-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 680px;
  margin: 2.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.xm-novel-reader.is-night .xm-novel-reader-nav {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.xm-novel-reader-nav-link {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  color: inherit !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
}

.xm-novel-reader.is-night .xm-novel-reader-nav-link {
  background: rgba(255, 255, 255, 0.06);
}

.xm-novel-reader-nav-link:not(.is-disabled):hover {
  background: var(--xm-novel-accent);
  color: #fff !important;
}

.xm-novel-reader-nav-link.is-disabled {
  opacity: 0.35;
  cursor: default;
}

/* 底部工具条（字号 / 夜间） */
.xm-novel-reader-toolbar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.xm-novel-reader.is-night .xm-novel-reader-toolbar {
  background: rgba(40, 40, 40, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
}

.xm-novel-reader-tool {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  color: inherit;
  white-space: nowrap;
}

.xm-novel-reader-tool:hover {
  background: rgba(255, 103, 64, 0.1);
  color: var(--xm-novel-orange);
}

.xm-novel-reader-tool.is-active {
  color: var(--xm-novel-orange);
  font-weight: 600;
}

/* 阅读页隐藏主题干扰 */
body.xm-novel-reader-view .sidebar,
body.xm-novel-reader-view .sidebar-container,
body.xm-novel-reader-full .sidebar,
body.xm-novel-reader-full .sidebar-container {
  display: none !important;
}

body.xm-novel-reader-view .content-wrap,
body.xm-novel-reader-view .container.container-fluid,
body.xm-novel-reader-full .content-wrap {
  max-width: 100%;
}

body.xm-novel-reader-view .article-header,
body.xm-novel-reader-view .article-title,
body.xm-novel-reader-view .entry-header,
body.xm-novel-reader-view .entry-title,
body.xm-novel-reader-view .breadcrumb,
body.xm-novel-reader-view .theme-box > .article-title,
body.xm-novel-reader-view .box-header,
body.xm-novel-reader-view .posts-nav,
body.xm-novel-book-view .article-header,
body.xm-novel-book-view .article-title,
body.xm-novel-book-view .entry-header,
body.xm-novel-book-view .entry-title,
body.xm-novel-book-view .breadcrumb,
body.xm-novel-book-view .theme-box > .article-title,
body.xm-novel-book-view .box-header {
  display: none !important;
}

body.xm-novel-reader-view .page-article,
body.xm-novel-reader-view .article.main-bg {
  background: transparent !important;
  box-shadow: none !important;
  padding: 12px 0 !important;
}

body.xm-novel-reader-view .wp-posts-content {
  padding: 0 !important;
}

body.xm-novel-reader-view {
  background: #ebe6da;
}

body.xm-novel-reader-view.xm-novel-night {
  background: #111;
}

@media (max-width: 576px) {
  .xm-novel-shell:not(.theme-box),
  .xm-novel-shell.theme-box {
    padding: 14px;
  }

  .xm-novel-reader-body {
    padding: 20px 16px 90px;
  }

  .xm-novel-reader-content {
    font-size: calc(var(--xm-reader-size) - 1px);
  }

  .xm-novel-book-header-title {
    font-size: 22px;
  }

  .xm-novel-reader-toolbar {
    bottom: 12px;
    max-width: calc(100% - 24px);
    overflow-x: auto;
  }
}

/* ===== 书架 ===== */
.xm-novel-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.xm-novel-hero-actions {
  flex-shrink: 0;
}

.xm-novel-btn-sm {
  padding: 6px 12px !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
}

.xm-shelf-toggle.is-active {
  color: var(--xm-novel-accent, #ff6740) !important;
  border-color: var(--xm-novel-accent, #ff6740) !important;
}

.xm-novel-reader-tool.xm-shelf-toggle.is-active {
  background: rgba(255, 103, 64, 0.12);
}

.xm-novel-shelf-page {
  padding: 8px 0 24px;
}

.xm-novel-shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.xm-novel-shelf-pick {
  color: var(--xm-novel-accent, #ff6740) !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
}

.xm-novel-shelf-empty {
  text-align: center;
  padding: 48px 16px;
  color: #888;
}

.xm-novel-shelf-empty p {
  margin: 0 0 16px;
}

.xm-novel-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.xm-novel-shelf-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #f0f0f0;
}

.xm-novel-shelf-cover-link {
  flex: 0 0 72px;
  width: 72px;
  height: 96px;
  border-radius: 6px;
  overflow: hidden;
  display: block;
  background: #f5f5f5;
}

.xm-novel-shelf-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xm-novel-shelf-cover--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ff8a65, #ff6740);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}

.xm-novel-shelf-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.xm-novel-shelf-title {
  font-size: 15px;
  font-weight: 600;
  color: #222 !important;
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xm-novel-shelf-progress,
.xm-novel-shelf-time {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xm-novel-shelf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.xm-shelf-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  box-sizing: border-box;
}

.xm-shelf-btn--primary {
  background: #ff6740 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(255, 103, 64, 0.35);
}

.xm-shelf-btn--primary:hover {
  opacity: 0.92;
  color: #fff !important;
}

.xm-shelf-btn--ghost {
  background: #fff3ef !important;
  color: #ff6740 !important;
}

.xm-shelf-btn--ghost:hover {
  color: #ff6740 !important;
}

.user-center .xm-novel-shelf-grid,
.xm-novel-user-shelf-tab .xm-novel-shelf-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .user-center .xm-novel-shelf-grid,
  .xm-novel-user-shelf-tab .xm-novel-shelf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.xm-novel-toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(12px);
  z-index: 10080;
  padding: 10px 18px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  max-width: 80vw;
  text-align: center;
}

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

.xm-novel-toast.is-err {
  background: rgba(180, 40, 40, 0.9);
}
