   5b. CATEGORY / TAG PAGES
   ========================================================================== */

/* Sort bar */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.sort-label {
  font-size: 12px;
  color: var(--text-tertiary);
}
.sort-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: var(--transition);
}
a.sort-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.sort-btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Category list — simple rows */
.cat-list-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.cat-row:last-child { border-bottom: none; }
.cat-row:hover {
  background: var(--accent-50);
  text-decoration: none;
}
.cat-name {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}
.cat-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cat-likes {
  color: #E05A6D;
  background: #FBEEF0;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}
.cat-date {
  color: var(--text-tertiary);
}

@media (max-width: 520px) {
  .cat-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cat-stats { justify-content: flex-start; }
}

/* ==========================================================================
   5c. WORK TOC PAGE (作品目次)
   ========================================================================== */

/* Meta bar */
.toc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

/* Description */
.toc-desc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Episode list */
.toc-list-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.toc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.toc-row:last-child { border-bottom: none; }
.toc-row:hover {
  background: var(--accent-50);
  text-decoration: none;
}
.toc-num {
  width: 36px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-light);
  padding: 2px 0;
  border-radius: var(--radius);
  flex-shrink: 0;
}
.toc-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.toc-row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-tertiary);
}
.toc-pv { white-space: nowrap; }
.toc-date { white-space: nowrap; }
.toc-likes {
  color: #E05A6D;
  background: #FBEEF0;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Empty state */
.toc-empty {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
}
.toc-back-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-link);
  font-weight: 500;
}

/* Bookmark — last read indicator */
.toc-row--lastread {
  background: #FFF8E1;
  border-left: 3px solid #F5A623;
  position: relative;
}
.toc-row--lastread:hover {
  background: #FFF3CC;
}
.toc-bookmark {
  position: absolute;
  top: -1px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  color: #8B6914;
  background: #FFE082;
  padding: 2px 10px;
  border-radius: 0 0 var(--radius) var(--radius);
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 640px) {
  .toc-row { flex-wrap: wrap; }
  .toc-row-meta { width: 100%; padding-left: 48px; }
}

/* ==========================================================================
   5d. FAVORITES PAGE (お気に入り一覧)
   ========================================================================== */

/* Clear all button */
.fav-clear-btn {
  appearance: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--red);
  background: var(--red-light);
  border: 1px solid var(--red);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  cursor: pointer;
  transition: var(--transition);
}
.fav-clear-btn:hover {
  background: var(--red);
  color: #fff;
}

/* Empty state */
.fav-empty {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-tertiary);
}
.fav-empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.fav-empty-hint {
  font-size: 12px;
  margin-top: 6px;
}

/* Group (per category) */
.fav-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 12px;
}
.fav-group[open] {
  border-color: var(--accent);
}
.fav-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: var(--transition);
}
.fav-summary::-webkit-details-marker { display: none; }
.fav-summary::marker { content: ''; }
.fav-summary:hover { background: var(--accent-50); }
.fav-group-name {
  font-size: 14px;
  font-weight: 600;
}
.fav-group-count {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Items inside group */
.fav-group-body {
  border-top: 1px solid var(--border-light);
}
.fav-item {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
}
.fav-item:last-of-type { border-bottom: none; }
.fav-item-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.5;
}
.fav-item-link:hover { color: var(--accent); }
.fav-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
}
.fav-item-likes {
  color: #E05A6D;
  background: #FBEEF0;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
}
.fav-remove-btn {
  appearance: none;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-tertiary);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1px 8px;
  cursor: pointer;
  transition: var(--transition);
  margin-left: auto;
}
.fav-remove-btn:hover {
  color: var(--red);
  border-color: var(--red);
}

/* Group footer */
.fav-group-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
  text-align: right;
  background: var(--accent-50);
  font-size: 12px;
}
.fav-group-footer a {
  color: var(--text-link);
  font-weight: 500;
}

/* ==========================================================================
   5e. PAGE WITH COMMENTS (コメント付き固定ページ)
   ========================================================================== */
.page-article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.page-head {
  padding: 24px 32px 16px;
  border-bottom: 1px solid var(--border-light);
}
.page-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}
.page-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  gap: 10px;
}
.page-body {
  padding: 24px 32px;
  font-size: 16px;
  line-height: 18px;
  font-family: "ＭＳ Ｐゴシック","MS PGothic",IPAMonaPGothic,Mona,Monapo,Saitamaar,sans-serif;
  white-space: pre;
  font-variant-ligatures: none;
  color: var(--text-primary);
  min-width: 1024px;
  overflow-x: auto;
}
.page-body p + p { margin-top: 12px; }
.page-body a { color: var(--text-link); }
.page-body ul, .page-body ol {
  margin: 10px 0;
  padding-left: 24px;
}
.page-body li { margin: 4px 0; list-style: revert; }
.no-comments {
  padding: 20px 32px;
  color: var(--text-tertiary);
  font-size: 13px;
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   5f. SEARCH RESULTS
   ========================================================================== */
.search-cat-section { margin-bottom: 20px; }
.search-sub-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Post results list */
.search-results {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}
.search-row:last-child { border-bottom: none; }
.search-row:hover {
  background: var(--accent-50);
  text-decoration: none;
}
.search-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
.search-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.search-cat-label {
  font-weight: 500;
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-accent);
  color: var(--text-secondary);
  white-space: nowrap;
}
.search-likes {
  color: #E05A6D;
  background: #FBEEF0;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Empty state */
.search-empty {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
}
.search-empty-hint {
  font-size: 12px;
  margin-top: 6px;
}

/* Pagination */
.search-pagination {
  margin-top: 16px;
  text-align: center;
}
.search-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.search-pagination .page-numbers {
  display: inline-block;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  background: var(--bg-card);
  text-decoration: none;
  transition: var(--transition);
}
.search-pagination .page-numbers:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.search-pagination .page-numbers.current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

@media (max-width: 520px) {
  .search-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .search-meta { justify-content: flex-start; }
}

/* ==========================================================================
   5g. AUTHOR LIST (作者一覧)
   ========================================================================== */
.author-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.author-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.author-group[open] {
  border-color: var(--accent);
}
.author-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: var(--transition);
}
.author-summary::-webkit-details-marker { display: none; }
.author-summary::marker { content: ''; }
.author-summary:hover { background: var(--accent-50); }
.author-name {
  font-size: 14px;
  font-weight: 600;
}
.author-count {
  font-size: 12px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* Works inside author group */
.author-works {
  list-style: none;
  border-top: 1px solid var(--border-light);
}
.author-works li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border-bottom: 1px solid var(--border-light);
}
.author-works li:last-child { border-bottom: none; }
.author-works a {
  flex: 1;
  min-width: 0;
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.5;
  transition: var(--transition);
}
.author-works a:hover {
  color: var(--accent);
  background: var(--accent-50);
  text-decoration: none;
}
.author-work-count {
  font-size: 11px;
  color: var(--text-tertiary);
  padding-right: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}
