.rd-content-z { position: relative; z-index: 1; }

.rd-topbar {
  background: #141414; border-bottom: 1px solid rgba(255,255,255,0.08);
  position: fixed; top: 76px; left: 0; right: 0; z-index: 150;
}
.rd-topbar-spacer { height: 86px; }
.rd-progress-rail { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.06); z-index: 1; }
.rd-progress-rail-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #7fa8d9, #3dd6b8); transition: width 0.2s linear; }
.rd-topbar-inner {
  padding: 0.75rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  position: relative;
}
.rd-topbar-left { display: flex; align-items: center; gap: 1.25rem; min-width: 0; }
.rd-topbar-divider { width: 1px; height: 30px; background: rgba(255,255,255,0.14); flex-shrink: 0; }
.rd-topbar-book {
  display: flex; align-items: center; gap: 0.85rem; min-width: 0; position: relative;
  background: none; border: none; padding: 0 1.75rem 0 0; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.rd-topbar-book-arrow {
  position: absolute; right: 0; top: 50%;
  display: flex; align-items: center; justify-content: center;
  transform: translateY(-50%) rotate(-90deg); color: #999;
  transition: color 0.15s, transform 0.15s;
}
.rd-topbar-book-arrow.open { transform: translateY(-50%) rotate(90deg); }
.rd-topbar-book:hover .rd-topbar-book-arrow { color: #7fa8d9; }
.rd-topbar-cover {
  width: 42px; height: 62px; object-fit: cover; border-radius: 4px; flex-shrink: 0;
  background: #222; border: 1px solid rgba(255,255,255,0.12);
}
.rd-topbar-cover.wiki-generated-cover { background: #6b3fa0; }
.rd-topbar-cover .wiki-generated-cover-title { font-size: 0.4rem; line-height: 1.1; padding: 0 0.15rem; }
.rd-topbar-book-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.rd-topbar-title {
  font-family: 'Fredoka', 'Lato', cursive; font-size: 1.1rem; color: #f0f0f0; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px;
}
.rd-topbar-by { font-family: 'Lato', sans-serif; font-size: 0.85rem; color: #999; }
.rd-topbar-by span { color: #ccc; font-weight: 600; }
.rd-toc-dropdown {
  position: absolute; top: 100%; left: 2rem; margin-top: 0.4rem; z-index: 40;
  background: #1a1a1a; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
  max-height: 60vh; overflow-y: auto; min-width: 280px; box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}
.rd-toc-item {
  display: block; padding: 0.65rem 1rem; text-decoration: none; color: #ddd;
  font-family: 'Lato', sans-serif; font-size: 0.92rem; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.rd-toc-item:last-child { border-bottom: none; }
.rd-toc-item:hover { background: rgba(127,168,217,0.1); color: #a8c6e8; }
.rd-toc-item.active { color: #7fa8d9; font-weight: 700; }
.rd-toc-item-draft { color: #f0c060; font-size: 0.75rem; font-weight: 700; margin-left: 0.4rem; }
.rd-toc-story-title {
  display: block; padding: 0.9rem 1rem 0.4rem; text-decoration: none;
  font-family: 'Fredoka', 'Lato', cursive; font-size: 1rem; font-weight: 700; color: #f0f0f0;
}
.rd-toc-story-title:hover { color: #7fa8d9; }
.rd-toc-index-label {
  display: block; padding: 0 1rem 0.6rem; font-family: 'Lato', sans-serif; font-size: 0.7rem;
  font-weight: 700; color: #888; text-transform: capitalize;
  border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 0.3rem;
}

.rd-topbar-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.rd-edit-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: 'Lato', sans-serif; font-size: 0.88rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3d6fa8, #7fa8d9); border: none; border-radius: 18px;
  padding: 0.5em 1.2em; text-decoration: none; white-space: nowrap;
   transition: box-shadow 0.15s, transform 0.15s;
}
.rd-edit-btn:hover { box-shadow: 0 0 0 1px rgba(127,168,217,0.65); transform: translateY(-1px); }
.rd-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  width: 40px; height: 40px; border-radius: 50%; box-sizing: border-box;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
  color: #ccc; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.rd-icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; }
.rd-icon-btn .btw-bm, .rd-icon-btn .btw-heart { width: 19px; height: 19px; }
.rd-icon-btn.bookmarked { color: #7fa8d9; border-color: #7fa8d9; background: rgba(127,168,217,0.16); }
.rd-icon-btn.rd-like-btn { width: auto; padding: 0 0.4rem; background: none; border: none; font-family: 'Lato', sans-serif; font-size: 0.85rem; font-weight: 700; }
.rd-icon-btn.rd-like-btn:hover { color: #7fa8d9; }

.rd-side-panel {
  position: fixed; left: 0; top: 178px; bottom: 1.5rem; z-index: 30;
  width: 300px; box-sizing: border-box;
  background: rgba(10,10,10,0.80); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 1.5rem 1.1rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
  overflow-y: auto;
}
.rd-author-avatar {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(127,168,217,0.5);
}
.rd-author-avatar-fallback {
  width: 76px; height: 76px; border-radius: 50%; border: 2px solid rgba(127,168,217,0.5);
  background: linear-gradient(135deg, #7fa8d9, #d97a72);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Lato', sans-serif; font-weight: 700; font-size: 1.7rem; color: #fff;
}
.rd-author-card-name { font-family: 'Lato', sans-serif; font-size: 0.92rem; font-weight: 700; color: #ccc; text-align: center; text-decoration: none; }
.rd-author-card-name:hover { color: #7fa8d9; }
.rd-follow-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; width: 100%; justify-content: center;
  background: none; border: 1px solid rgba(255,255,255,0.3); color: #ddd; border-radius: 18px;
  padding: 0.45em 0.8em; font-family: 'Lato', sans-serif; font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.rd-follow-btn:hover { border-color: #7fa8d9; color: #a8c6e8; }
.rd-follow-btn.following { border-color: #7fa8d9; color: #7fa8d9; background: rgba(127,168,217,0.1); }
.rd-side-hr { width: 100%; height: 1px; background: rgba(255,255,255,0.1); }
.rd-side-section { width: 100%; display: flex; flex-direction: column; align-items: center; }
.rd-side-label { font-family: 'Lato', sans-serif; font-size: 0.7rem; font-weight: 700; color: #888; text-transform: capitalize; margin: 0 0 0.6rem; }
.rd-font-row { display: flex; gap: 0.6rem; }
.rd-font-btn {
  width: 42px; height: 38px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); color: #ddd;
  font-family: 'Lato', sans-serif; font-weight: 700; font-size: 1rem;
}
.rd-font-btn:hover { border-color: #7fa8d9; color: #a8c6e8; }
.rd-side-links-list { width: 100%; display: flex; flex-direction: column; gap: 0.5rem; }
.rd-side-link {
  display: flex; align-items: center; gap: 0.4rem; width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px;
  padding: 0.45rem 0.6rem; text-decoration: none; color: #ccc;
  font-family: 'Lato', sans-serif; font-size: 0.78rem; font-weight: 600;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.rd-side-link:hover { border-color: #7fa8d9; color: #a8c6e8; background: rgba(127,168,217,0.08); }

.rd-layout {
  padding: 3rem 3rem 6rem 21.25rem;
  display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start;
  transition: padding-left 0.55s cubic-bezier(0.4, 0, 0.2, 1), grid-template-columns 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: padding-left, grid-template-columns;
}
body.rd-left-collapsed .rd-layout { padding-left: 3rem; }
body.rd-right-collapsed .rd-layout { grid-template-columns: 1fr 0px; }
.rd-side-panel { transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1); }
.rd-recs { transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1); }
body.rd-left-collapsed .rd-side-panel { transform: translateX(-110%); opacity: 0; pointer-events: none; }
body.rd-right-collapsed .rd-recs { opacity: 0; pointer-events: none; }
body.rd-left-collapsed .rd-article { margin-left: auto; margin-right: auto; }
.rd-rail-fab {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; z-index: 40;
  background: #14121a; border: 1px solid rgba(255,255,255,0.28);
  color: #ccc; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 22px rgba(0,0,0,0.55);
  transition: left 0.55s cubic-bezier(0.4, 0, 0.2, 1), right 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.rd-rail-fab:hover { color: #fff; border-color: rgba(127,168,217,0.6); box-shadow: 0 4px 26px rgba(127,168,217,0.4); }
.rd-rail-fab--left, .rd-rail-fab--right { transform: translateY(-50%) rotate(180deg); }
.rd-rail-fab--left.rd-rail-fab--collapsed, .rd-rail-fab--right.rd-rail-fab--collapsed { transform: translateY(-50%) rotate(0deg); }
.rd-rail-fab--left { left: 278px; }
.rd-rail-fab--left.rd-rail-fab--collapsed { left: 4px; }
.rd-rail-fab--right { right: 326px; }
.rd-rail-fab--right.rd-rail-fab--collapsed { right: 4px; }
@media (max-width: 1100px) { .rd-rail-fab { display: none; } }
.rd-article { max-width: 1220px; width: 100%; }

.rd-meta-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
  padding: 1.5rem 1.75rem; margin-bottom: 2.5rem; font-family: 'Lato', sans-serif; font-size: 0.9rem;
}
.rd-meta-row { display: flex; gap: 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.rd-meta-row:last-child { border-bottom: none; }
.rd-meta-row-label { flex-shrink: 0; width: 110px; color: #888; font-weight: 700; }
.rd-meta-row-value { color: #ddd; }
.rd-meta-tag {
  display: inline-block; background: rgba(127,168,217,0.12); color: #a8c6e8; border-radius: 12px;
  padding: 0.2em 0.7em; font-size: 0.82rem; margin: 0.1rem 0.3rem 0.1rem 0;
}
.rd-meta-tag-link { text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.rd-meta-tag-link:hover { background: rgba(127,168,217,0.25); color: #cfe0f5; }
.rd-meta-jump { color: inherit; text-decoration: none; transition: color 0.2s; }
.rd-meta-jump:hover { color: #7fa8d9; text-decoration: underline; }
.rd-meta-stats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.rd-meta-stats span { color: #aaa; }
.rd-meta-stats strong { color: #ddd; }

.rd-chapter-image-wrap { margin-bottom: 2rem; border-radius: 14px; overflow: hidden; }
.rd-chapter-image-wrap img, .rd-chapter-image-wrap iframe { width: 100%; display: block; border: none; aspect-ratio: 16/9; object-fit: cover; }
.rd-chapter-title {
  font-family: 'Fredoka', 'Lato', cursive; font-size: 2.2rem; color: #f0f0f0; text-align: center; margin: 0 0 1.25rem;
}
.rd-title-rule { width: 100%; height: 1px; background: rgba(255,255,255,0.15); margin: 0 0 2.5rem; }
.rd-chapter-body {
  font-family: Georgia, 'Times New Roman', serif; color: #e8e8e8; line-height: 1.9;
  font-size: calc(1.15rem * var(--rd-font-scale, 1));
}
.rd-chapter-body p, .rd-chapter-body div, .rd-chapter-body li,
.rd-chapter-body span, .rd-chapter-body a, .rd-chapter-body strong,
.rd-chapter-body b, .rd-chapter-body em, .rd-chapter-body i, .rd-chapter-body u,
.rd-chapter-body blockquote, .rd-chapter-body h1, .rd-chapter-body h2,
.rd-chapter-body h3, .rd-chapter-body h4, .rd-chapter-body h5, .rd-chapter-body h6 {
  font-family: inherit !important; font-size: inherit !important;
  line-height: inherit !important; color: inherit !important;
}
.rd-chapter-body a.btw-mention { color: #7fa8d9 !important; text-decoration: none; }
.rd-chapter-body a.btw-mention:hover { text-decoration: underline; }
.rd-chapter-body p { margin: 0 0 1.2em; }
.rd-chapter-body img { max-width: 100%; border-radius: 10px; display: block; margin: 0 auto 1.2em; }
.rd-chapter-empty { color: #888; font-style: italic; }
.rd-chapter-body .ce-img-controls { display: none; }
.rd-chapter-body .ce-hr-block { margin: 1.6em 0; padding: 0; }
.rd-chapter-body .ce-hr-block hr { border: none; border-top: 1px solid rgba(255,255,255,0.35); margin: 0; }

.rd-chapter-nav { margin-top: 3.5rem; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.rd-nav-continue {
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
  background: transparent; border: 1px solid #7fa8d9; color: #fff; border-radius: 12px;
  padding: 0.85em 2.2em; font-family: 'Lato', sans-serif; font-size: 1.02rem; font-weight: 700;
  transition: background-color 0.2s;
}
.rd-nav-continue:hover { background: rgba(127,168,217,0.16); }
.rd-nav-last-updated { color: #888; font-family: 'Lato', sans-serif; font-size: 0.9rem; }

.rd-recs {
  display: flex; flex-direction: column;
  position: sticky; top: 178px;
  margin-right: -3rem;
  background: rgba(10,10,10,0.80); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 1.4rem 1.1rem;
  max-height: calc(100vh - 200px); overflow-y: auto;
}
.rd-recs-title {
  display: flex; align-items: center; gap: 0.4rem;
  font-family: 'Fredoka', 'Lato', cursive; font-size: 1.1rem; color: #cfe0f5; margin: 0 0 1.1rem;
}
.rd-recs .rd-recs-title { color: #cfd3eb; }
.rd-recs { scrollbar-width: thin; scrollbar-color: rgba(127,168,217,0.45) transparent; }
.rd-recs::-webkit-scrollbar { width: 7px; }
.rd-recs::-webkit-scrollbar-track { background: transparent; }
.rd-recs::-webkit-scrollbar-thumb { background: rgba(127,168,217,0.45); border-radius: 6px; }
.rd-recs::-webkit-scrollbar-thumb:hover { background: rgba(127,168,217,0.7); }
.rd-recs-list { display: flex; flex-direction: column; gap: 1.1rem; }
.rd-rec-card {
  display: flex; gap: 0.85rem; text-decoration: none; color: inherit;
  padding: 0.6rem; border-radius: 12px; border: 1px solid transparent; transition: border-color 0.15s, background 0.15s;
}
.rd-rec-card:hover { border-color: rgba(240,192,96,0.4); background: rgba(255,255,255,0.03); }
.rd-rec-cover { width: 76px; height: 108px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1); }
.rd-rec-info { min-width: 0; display: flex; flex-direction: column; }
.rd-rec-title {
  font-family: 'Fredoka', 'Lato', cursive; font-size: 0.98rem; font-weight: 600; color: #cfe0f5; margin: 0 0 0.25rem; line-height: 1.25;
}
.rd-rec-card:hover .rd-rec-title {  }
.rd-rec-author { font-family: 'Lato', sans-serif; font-size: 0.72rem; color: #999; margin: 0 0 0.35rem; }
.rd-rec-author span { color: #bbb; font-weight: 600; }
.rd-rec-teaser { font-size: 0.76rem; color: #999; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rd-rec-reason { font-size: 0.68rem; color: #7fa8d9; font-weight: 600; margin-top: auto; padding-top: 0.35rem; }

.rd-para { position: relative; }
.rd-para-room { padding-left: 2.4rem; }
.rd-para-centered { padding-left: 2.4rem; }
.rd-para-comment-btn {
  position: absolute; right: 0; z-index: 5; user-select: none;
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); color: #ccc; cursor: pointer;
  opacity: 0; transition: opacity 0.15s, background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  font-size: 0.85rem; gap: 0.25rem; padding: 0;
}
.rd-para:hover .rd-para-comment-btn { opacity: 1; }
.rd-para-comment-btn:hover { background: rgba(127,168,217,0.2); border-color: #7fa8d9; color: #a8c6e8; transform: scale(1.12); }
.rd-para-comment-btn.has-comments {
  opacity: 1; width: auto; padding: 0.15rem 0.7rem 0.15rem 0.55rem; border-radius: 16px;
  background: rgba(127,168,217,0.16); border-color: rgba(127,168,217,0.5); color: #a8c6e8;
  font-family: 'Lato', sans-serif; font-size: 0.88rem; font-weight: 700; display: inline-flex;
}
.rd-para-comment-btn.has-comments:hover { transform: scale(1.06); }
.rd-para-comment-btn.active { background: #7fa8d9; border-color: #7fa8d9; color: #0d0d0d; opacity: 1; }

.rd-cp-drawer {
  position: fixed; top: 162px; right: 0; bottom: 0; width: 520px; max-width: 90vw; z-index: 160;
  background: #121214; border-left: 1px solid rgba(255,255,255,0.1); box-shadow: -12px 0 40px rgba(0,0,0,0.5);
  padding: 1.5rem 1.75rem; overflow-y: auto;
}

.rd-cp-back {
  background: none; border: none; color: #999; cursor: pointer; font-family: 'Lato', sans-serif;
  font-size: 0.82rem; font-weight: 700; padding: 0; margin-bottom: 0.75rem;
}
.rd-cp-back:hover { color: #7fa8d9; }
.rd-cp-context {
  position: relative;
  margin: 0 0 1.75rem; padding: 1.4rem 1.5rem 1.4rem 2.5rem;
  background: linear-gradient(160deg, rgba(127,168,217,0.16), rgba(127,168,217,0.03));
  border: 1px solid rgba(127,168,217,0.35); border-radius: 14px;

  font-family: Georgia, 'Times New Roman', serif; font-size: 1.08rem; color: #eee; line-height: 1.75; font-style: italic;
  max-height: 240px; overflow-y: auto;
}
.rd-cp-context::before {
  content: '“'; position: absolute; top: 0.5rem; left: 0.75rem;
  font-family: Georgia, serif; font-size: 2.6rem; font-style: normal; color: rgba(127,168,217,0.55); line-height: 1;
}
.rd-cp-compose { margin-bottom: 1.5rem; }
.rd-cp-compose .cc-compose-box { background: #0a0c0d; border-color: rgba(255,255,255,0.16); }
.rd-cp-textarea {
  width: 100%; box-sizing: border-box; background: #0a0c0d; border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px; color: #f0f0f0; font-family: 'Lato', sans-serif; font-weight: 600; font-size: 0.92rem;
  padding: 0.75rem 0.9rem; resize: vertical; min-height: 70px; transition: border-color 0.15s;
}
.rd-cp-textarea:focus { outline: none; border-color: #7fa8d9; }
.rd-cp-compose-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.rd-cp-gif-preview-wrap { position: relative; display: inline-block; margin-top: 0.6rem; }
.rd-cp-gif-preview-wrap img { max-width: 140px; border-radius: 8px; display: block; }
.rd-cp-gif-remove {
  position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%;
  background: #0d0d0d; border: 1px solid rgba(255,255,255,0.3); color: #fff; cursor: pointer; font-size: 0.7rem;
}

.dm-gif-btn {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); border-radius: 6px;
  color: #999; font-family: 'Lato', sans-serif; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.05em; padding: 0.32rem 0.6rem; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.dm-gif-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.dm-gif-picker {
  position: fixed; z-index: 400; width: 260px;
  background: rgba(15,15,20,0.97); border: 1px solid rgba(255,255,255,0.13); border-radius: 14px;
  box-shadow: 0 14px 48px rgba(0,0,0,0.75); overflow: hidden; display: flex; flex-direction: column;
}
.dm-gif-picker-top { padding: 0.6rem 0.7rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.07); }
.dm-gif-search {
  width: 100%; box-sizing: border-box; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.11);
  border-radius: 8px; color: #f0f0f0; font-family: inherit; font-size: 0.85rem; padding: 0.4rem 0.7rem; outline: none;
}
.dm-gif-search:focus { border-color: #7fa8d9; }
.dm-gif-label { font-size: 0.68rem; font-weight: 700; text-transform: capitalize; color: #888; padding: 0.4rem 0.7rem 0.2rem; }
.dm-gif-results { display: grid; grid-template-columns: repeat(3, 1fr); align-content: start; gap: 3px; max-height: 264px; overflow-y: auto; padding: 3px; }
.dm-gif-item { width: 100%; aspect-ratio: 1; object-fit: contain; background: rgba(255,255,255,0.04); cursor: pointer; border-radius: 4px; display: block; }
.dm-gif-item:hover { opacity: 0.8; }
.dm-gif-loading { grid-column: 1 / -1; text-align: center; color: #777; font-size: 0.78rem; padding: 1.5rem; }

.rd-cp-comment-gif { max-width: 180px; border-radius: 8px; display: block; margin-top: 0.4rem; }
#rd-cp-list.cc-list, #rd-bc-list.cc-list { gap: 0; }
#rd-cp-list .cc-item, #rd-bc-list .cc-item { gap: 0.9rem; padding: 0.95rem 0.2rem; border-bottom: 1px solid rgba(255,255,255,0.14); }
#rd-cp-list > .cc-item:first-child, #rd-bc-list > .cc-item:first-child { padding-top: 0.2rem; }
#rd-cp-list > .cc-item:last-child, #rd-bc-list > .cc-item:last-child { border-bottom: none; }
#rd-cp-list .cc-avatar, #rd-cp-list .cc-avatar-fallback, #rd-bc-list .cc-avatar, #rd-bc-list .cc-avatar-fallback { width: 64px; height: 64px; border-radius: 12px; }
#rd-cp-list .cc-avatar-fallback, #rd-bc-list .cc-avatar-fallback { font-size: 1.3rem; }
#rd-cp-list .cc-bubble, #rd-bc-list .cc-bubble { background: none; border: none; border-radius: 0; padding: 0; }
#rd-cp-list .cc-name, #rd-bc-list .cc-name { font-size: 1.05rem; line-height: 1.2; }
#rd-cp-list .cc-time, #rd-bc-list .cc-time { font-size: 0.8rem; margin-left: 0.6rem; color: #8a8a93; }
#rd-cp-list .cc-text, #rd-bc-list .cc-text { font-size: 1rem; line-height: 1.35; color: #f0f0f0; margin-top: 0.25rem; }
#rd-cp-list .cc-actions, #rd-bc-list .cc-actions { padding-left: 0; margin-top: 0.5rem; }
#rd-cp-list .cc-replies, #rd-bc-list .cc-replies { gap: 0; margin-top: 0.4rem; padding-left: 1rem; }
#rd-cp-list .cc-replies .cc-item, #rd-bc-list .cc-replies .cc-item { padding: 0.7rem 0; border-bottom: none; }
#rd-cp-list .cc-replies .cc-avatar, #rd-cp-list .cc-replies .cc-avatar-fallback, #rd-bc-list .cc-replies .cc-avatar, #rd-bc-list .cc-replies .cc-avatar-fallback { width: 44px; height: 44px; border-radius: 9px; }
#rd-cp-list .cc-action-btn, #rd-bc-list .cc-action-btn {
  color: #7fa8d9;  transition: color 0.15s, text-shadow 0.15s;
}
#rd-cp-list .cc-action-btn:hover, #rd-bc-list .cc-action-btn:hover {
  color: #a8c6e8; 
}
.rd-cp-reply-form { display: none; margin-top: 0.6rem; }
.rd-cp-reply-form.open { display: block; }

.rd-bottom-comments { scroll-margin-top: 170px; margin-top: 4rem; padding-top: 2.5rem; border-top: 1px solid rgba(255,255,255,0.1); }
.rd-cp-replies-toggle {
  background: none; border: none; color: #7fa8d9; cursor: pointer; font-family: 'Lato', sans-serif;
  font-size: 0.8rem; font-weight: 700; padding: 0; margin-top: 0.75rem;
}
.rd-cp-replies-toggle:hover { color: #a8c6e8; }
.rd-cp-replies-hidden { display: none; }
.rd-cp-para-tag {
  display: inline-block; font-size: 0.72rem; color: #888; margin-top: 0.4rem;
  background: rgba(255,255,255,0.05); border-radius: 8px; padding: 0.1em 0.5em;
}

@media (max-width: 1100px) {
  .rd-side-panel { display: none; }
  .rd-layout { grid-template-columns: 1fr; padding-left: 3rem; }
  .rd-recs { display: none; }
}

@media (min-width: 721px) and (max-width: 1360px) and (pointer: coarse) {
  #fanpages-topbar-root { height: 76px; }
  .fpnav-bar { position: fixed; }
}

@media (max-width: 720px) {
  .rd-topbar { position: relative; top: 0; }
  .rd-topbar-spacer { display: none; }
  .rd-topbar-inner { padding: 0.55rem 0.85rem; gap: 0.6rem; }
  .rd-topbar-left { gap: 0.7rem; }
  .rd-topbar-divider { display: none; }
  .rd-topbar-book { gap: 0.6rem; padding-right: 1.2rem; }
  .rd-topbar-cover { width: 34px; height: 50px; }
  .rd-topbar-title { font-size: 0.92rem; max-width: 34vw; }
  .rd-topbar-by { font-size: 0.72rem; }
  .rd-topbar-book-arrow svg { width: 18px; height: 18px; }
  .rd-topbar-actions { gap: 0.4rem; }
  .rd-edit-btn { font-size: 0.78rem; padding: 0.45em 0.8em; }
  .rd-icon-btn { width: 34px; height: 34px; }
  .rd-icon-btn svg, .rd-icon-btn .btw-bm, .rd-icon-btn .btw-heart { width: 16px; height: 16px; }
  .rd-like-btn span#rd-like-count { font-size: 0.85rem; }
  .rd-toc-dropdown { left: 0.85rem; right: 0.85rem; min-width: 0; max-height: 70vh; }

  .rd-layout { display: block; padding: 1.25rem 1.1rem 3.5rem; }
  .rd-article { max-width: 100%; }
  .rd-meta-card {
    background: none; border: none; border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding: 0 0 1rem; margin-bottom: 1.5rem; font-size: 0.78rem;
  }
  .rd-meta-row { flex-direction: column; gap: 0.1rem; padding: 0.3rem 0; }
  .rd-meta-row-label { width: auto; }
  .rd-meta-tag {
    background: none; border-radius: 0; color: #a8c6e8; text-decoration: underline;
    padding: 0; margin: 0 0.5rem 0.15rem 0; font-size: 0.78rem;
  }
  .rd-meta-stats { gap: 0.25rem 0.9rem; }
  .rd-chapter-title { font-size: 1.55rem; margin-bottom: 1rem; }
  .rd-title-rule { margin-bottom: 1.75rem; }
  .rd-chapter-body { font-size: calc(1.02rem * var(--rd-font-scale, 1)); }
  .rd-nav-continue { padding: 0.8em 1.7em; font-size: 0.95rem; }

  .rd-para-comment-btn { display: none; opacity: 1; }
  .rd-para-comment-btn.has-comments, .rd-para-comment-btn.rd-selected { display: inline-flex; }

  .rd-cp-drawer { top: 0; right: 0; left: 0; width: 100%; max-width: 100%; padding: 1.2rem 1.1rem; }
}

@media (max-width: 720px), (max-width: 1360px) and (pointer: coarse) {
  .rd-layout { padding-bottom: 1rem; }
  .rd-bottom-comments .cc-empty { padding-bottom: 0; }
}

@media (max-width: 720px), (max-width: 1360px) and (pointer: coarse) {
  .rd-toc-dropdown { max-height: max(6rem, calc(100dvh - 15rem)); overscroll-behavior: contain; }
}

@media (max-height: 500px) and (pointer: coarse) {
  .rd-toc-dropdown { position: fixed; top: 4.75rem; bottom: calc(58px + 0.4rem); max-height: none; margin-top: 0; z-index: 250; }
}
