/* ============================================================
   インフルエンス図書館 — 本体スタイル
   ニュートラル背景 × 青アクセント × セリフ見出し
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #f7f6f3;
  --surface: #fcfbf9;
  --surface-strong: #ffffff;
  --ink: #211e18;
  --muted: #6f6759;
  --faint: #9c937f;
  --line: #e3e0d8;
  --line-soft: #edebe4;
  --accent: #3a4a6b;
  --accent-ink: color-mix(in oklab, var(--accent) 82%, #1a1813);
  --accent-soft: color-mix(in oklab, var(--accent) 9%, #fcfbf9);
  --accent-line: color-mix(in oklab, var(--accent) 26%, #f0eee8);
  --focus: var(--accent);
  --font-display: "Helvetica Neue", Helvetica, Arial, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --shadow-pop: 0 24px 60px -24px rgba(33, 30, 24, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  font-feature-settings: "palt";
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.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;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0;
}

p { margin: 0; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent-ink);
  font-weight: 600;
  margin: 0 0 10px;
  font-family: var(--font-body);
}

/* ------------------------------------------------------------
   ヘッダー
   ------------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-seal {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fdfcf7;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  border-radius: 8px;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  display: block;
  white-space: nowrap;
}

.brand-sub {
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.08em;
  display: block;
  line-height: 1.3;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 6px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  border-radius: 8px;
  position: relative;
  white-space: nowrap;
  background: none;
  border: 0;
}

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

.nav-link.is-active {
  color: var(--accent-ink);
  font-weight: 600;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.header-search-wrap {
  position: relative;
  flex: 1;
  max-width: 420px;
  margin-left: auto;
}

.header-search {
  display: flex;
  align-items: center;
  width: 100%;
  padding-left: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}

.header-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 14%, transparent);
}

.header-search .search-lead-icon {
  color: var(--faint);
  display: inline-flex;
  flex-shrink: 0;
  margin-right: 10px;
}

.header-search input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 0 4px 0 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  outline: none;
}

.header-search input::placeholder { color: var(--faint); }

.header-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear,
.search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  width: 42px;
  border: 0;
  background: transparent;
  color: var(--faint);
}

.search-clear:hover,
.search-submit:hover { color: var(--ink); }

.search-clear { display: none; }
.header-search.has-query .search-clear { display: inline-flex; }

.search-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  margin-left: auto;
}

/* ------------------------------------------------------------
   検索サジェスト
   ------------------------------------------------------------ */
.search-suggest {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(480px, calc(100vw - 40px));
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  z-index: 30;
}

.search-suggest[hidden] { display: none; }

.suggest-group { padding: 10px 0 4px; }
.suggest-group + .suggest-group { border-top: 1px solid var(--line-soft); }

.suggest-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--faint);
  font-weight: 600;
  padding: 4px 20px;
  margin: 0;
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 20px;
  font-size: 14px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--ink);
}

.suggest-item.is-active,
.suggest-item:hover { background: var(--accent-soft); }

.suggest-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  flex-shrink: 0;
  font-size: 12px;
  font-family: var(--font-display);
}

.suggest-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggest-text em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent-ink);
}

.suggest-sub { color: var(--faint); }

.suggest-meta {
  font-size: 11.5px;
  color: var(--faint);
  flex-shrink: 0;
}

.suggest-foot {
  display: flex;
  gap: 18px;
  padding: 10px 20px;
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--faint);
}

.kbd {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 5px;
  background: var(--surface);
  margin-right: 4px;
  font-family: var(--font-body);
}

/* ------------------------------------------------------------
   レイアウト共通
   ------------------------------------------------------------ */
main { display: block; }

.page-width {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* ヒーロー */
.home-hero { padding: 50px 0 6px; }

.home-hero h1 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.45;
}

.home-hero .lede {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14.5px;
  max-width: 580px;
  text-wrap: pretty;
}

/* ツールバー */
.feed-toolbar {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding: 30px 0 16px;
  border-bottom: 1px solid var(--line-soft);
}

.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  padding: 6px 13px;
  font-size: 12.5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
  font-family: var(--font-body);
}

.chip:hover { border-color: var(--accent-line); color: var(--ink); }

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fdfcf7;
  font-weight: 500;
}

.feed-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.result-count { font-size: 13px; color: var(--muted); margin: 0; white-space: nowrap; }
.result-count strong { color: var(--ink); font-weight: 600; }

.sort-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sort-control select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  padding-right: 18px;
  cursor: pointer;
}

.sort-control::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

/* アクティブフィルタ(検索中チップ) */
.active-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 0 0;
}

.active-filter[hidden] { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--accent-ink);
}

.filter-chip button {
  border: 0;
  background: transparent;
  color: var(--accent-ink);
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 999px;
}

.filter-chip button:hover { background: color-mix(in oklab, var(--accent) 16%, transparent); }

/* ------------------------------------------------------------
   表紙(タイポグラフィ・フォールバック付き)
   ------------------------------------------------------------ */
.cover {
  aspect-ratio: 128 / 182;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 13% 12%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: #ece8df;
}

.cover::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 7%;
  width: 1px;
  background: rgba(33, 30, 24, 0.1);
}

.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cover img.is-loaded { opacity: 1; }

.cover-title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  font-size: 11px;
}

.cover-author {
  margin-top: auto;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.tone-a { background: #efe9da; }
.tone-b { background: #e6ece6; }
.tone-c { background: #ece5dd; }
.tone-d { background: #e9e9e2; }
.tone-e { background: #f0e6d7; }
.tone-f { background: #e4e8e9; }

/* 検証バッジ */
.verified-badge,
.evidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-ink);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.verified-badge::before,
.evidence-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ------------------------------------------------------------
   フィード(2カラムのカード)
   ------------------------------------------------------------ */
.book-feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px 0 56px;
}

.book-feed > .empty-state { grid-column: 1 / -1; }

.book-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 4px 18px;
  align-items: start;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.book-row:hover {
  border-color: var(--accent-line);
  background: var(--surface-strong);
}

.book-row .cover { width: 72px; grid-row: 1 / span 2; }
.book-row .cover-title { font-size: 9px; }
.book-row .cover-author { display: none; }

.row-main { min-width: 0; }

.row-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.row-author {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

.row-rec { font-size: 13px; color: var(--muted); margin-top: 6px; }
.row-rec .rec-names { color: var(--ink); }

.row-side {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.row-cats { display: flex; gap: 6px; }

.tag,
.pill {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-block;
}

.row-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

/* 空状態 */
.empty-state {
  padding: 56px 24px;
  text-align: center;
}

.empty-state h3 { font-size: 19px; }

.empty-state > p { color: var(--muted); font-size: 13.5px; margin-top: 8px; }

.empty-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.empty-action {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  color: var(--ink);
}

.empty-action.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fdfcf7;
}

.empty-link-groups {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
  font-size: 13px;
}

.empty-link-groups strong {
  display: block;
  font-size: 12px;
  color: var(--faint);
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-link {
  display: inline-block;
  margin: 0 8px 6px 0;
  color: var(--accent-ink);
  border-bottom: 1px solid var(--accent-line);
}

/* ------------------------------------------------------------
   人物グリッド
   ------------------------------------------------------------ */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  padding: 28px 0 56px;
}

.person-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.person-card:hover { border-color: var(--accent-line); }

.person-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-card h3 { font-size: 15.5px; }

.person-card-meta p {
  font-size: 12px;
  color: var(--muted);
}

.person-card > p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-md { width: 40px; height: 40px; font-size: 16px; }
.avatar-xl { width: 72px; height: 72px; font-size: 28px; }

/* ------------------------------------------------------------
   テーマ(目的・職業・ジャンル統合)
   ------------------------------------------------------------ */
.theme-block { padding: 30px 0 0; }
.theme-block:last-of-type { padding-bottom: 56px; }

.theme-block h2 { font-size: 20px; }

.theme-block .block-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding-top: 18px;
}

.seo-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 22px;
}

.seo-card:hover { border-color: var(--accent-line); }

.seo-card h3 { font-size: 16px; }

.seo-card p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.8;
}

.facet-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 18px;
}

.facet-card {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
}

.facet-card:hover { border-color: var(--accent-line); }

.facet-card h3 {
  font-size: 13.5px;
  font-family: var(--font-body);
  font-weight: 500;
}

.facet-card p { font-size: 11.5px; color: var(--faint); }

.section-head h2 { font-size: 20px; }

/* ------------------------------------------------------------
   ページネーション
   ------------------------------------------------------------ */
[hidden] { display: none !important; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 28px 0 8px;
  scroll-margin-top: 96px;
}

.pagination button {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 13px;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--accent-line);
  color: var(--accent-ink);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

.pagination .is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.pagination .page-gap { color: var(--faint); padding: 0 2px; }

.panel,
[data-paginate] { scroll-margin-top: 96px; }

/* ------------------------------------------------------------
   フッター
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 24px;
  padding: 44px 0 32px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(0, 1fr));
  gap: 28px 36px;
  padding-bottom: 32px;
}

.footer-brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.footer-brand-sub {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.9;
  max-width: 280px;
}

.footer-col h3 {
  margin: 0 0 12px;
  font-size: 11px;
  font-family: var(--font-body);
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--faint);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-size: 13px;
  color: var(--muted);
}

.footer-col a:hover { color: var(--accent-ink); }

.footer-legal {
  border-top: 1px solid var(--line-soft);
  padding-top: 20px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.9;
}

.footer-legal p { margin: 0 0 4px; }

.footer-legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-legal a:hover { color: var(--accent-ink); }

.footer-copy { margin-top: 10px; }

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------
   法的ページ・運営情報ページ
   ------------------------------------------------------------ */
.legal-main {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0 72px;
}

.legal-article h1 {
  font-size: 28px;
  line-height: 1.4;
}

.legal-section { padding-top: 32px; }

.legal-section h2 { font-size: 18px; }

.legal-section p,
.legal-section li {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 2;
}

.legal-section ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.legal-section a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-updated {
  margin-top: 40px;
  color: var(--faint);
  font-size: 12px;
}

/* ------------------------------------------------------------
   下層ページ共通
   ------------------------------------------------------------ */
.page-back { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.back-link {
  display: inline-block;
  padding: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

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

.entity-main,
.topic-main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  padding: 20px 0 64px;
}

.entity-article,
.topic-article { min-width: 0; }

.topic-lead {
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
  max-width: 640px;
  line-height: 2;
  text-wrap: pretty;
}

/* 書籍ヒーロー */
.entity-hero {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 24px 0 8px;
}

.entity-hero .cover { width: 200px; }
.entity-hero .cover .cover-title { font-size: 15px; }
.entity-hero .cover .cover-author { font-size: 10px; }

.entity-hero h1 { font-size: 30px; line-height: 1.4; }

.book-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 2;
  margin-top: 16px;
  max-width: 600px;
  text-wrap: pretty;
}

.buy-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 26px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

.buy-button.buy-amazon {
  background: #ff9900;
  border-color: #e88b00;
  color: #131313;
}

.buy-button.buy-amazon:hover { background: #f08804; }

.buy-button.buy-rakuten {
  background: #bf0000;
  border-color: #bf0000;
  color: #fffdf8;
}

.buy-button.buy-rakuten:hover { background: #a50000; }

.book-isbn {
  font-size: 12px;
  color: var(--faint);
  margin-top: 16px;
}

/* セクション */
.topic-section { padding-top: 36px; }

.topic-section h2 { font-size: 21px; }

.topic-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 4px;
}

.topic-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 2;
}

/* 推薦の記録(カード) */
.entity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 18px;
}

.entity-row {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.entity-row:hover { border-color: var(--accent-line); }

.rec-row { grid-template-columns: 40px 1fr; }

.rec-row-body h3 { font-size: 14.5px; }
.rec-row-body h3 a:hover { color: var(--accent-ink); }

.rec-row-body .rec-role {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--muted);
  font-size: 12.5px;
}

.rec-quote {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  margin-top: 8px;
  text-wrap: pretty;
}

.source-line {
  margin-top: 10px;
  font-size: 12px;
  color: var(--faint);
}

.source-line a {
  color: var(--accent-ink);
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 1px;
}

/* 本の行(人物ページ・トピックページ) */
.book-row-lite { grid-template-columns: 88px 1fr; }

.book-row-lite .cover,
.book-row-lite > a:first-child { width: 88px; }

.book-row-lite h3 { font-size: 16.5px; }
.book-row-lite h3 a:hover { color: var(--accent-ink); }

.quote-source {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}

.recommendation-context {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.recommendation-line {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
}

.recommendation-line strong {
  color: var(--ink);
  font-weight: 600;
  margin-right: 8px;
}

.recommendation-line .source-line { display: inline; margin-left: 8px; }

/* 人物ヒーロー */
.person-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 36px 0 24px;
  border-bottom: 1px solid var(--line-soft);
}

.person-hero h1 { font-size: 28px; }

.person-bio {
  font-size: 14px;
  color: var(--muted);
  line-height: 2;
  padding: 20px 0 0;
  max-width: 640px;
  text-wrap: pretty;
}

/* サイド */
.topic-aside { padding-top: 36px; }

.topic-aside h2 { font-size: 16px; margin-bottom: 14px; }

.topic-link-list,
.aside-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aside-links { margin-top: 20px; }

.source-link {
  display: block;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 13px;
  color: var(--ink);
}

.source-link:hover { border-color: var(--accent-line); }

.source-link.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fdfcf7;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.related-item:hover { border-color: var(--accent-line); }

.related-item .cover {
  width: 44px;
  padding: 10% 12%;
  border-radius: 3px;
}

.related-item .cover .cover-title { font-size: 6px; }
.related-item .cover .cover-author { display: none; }

.related-rec {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.related-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.related-author {
  display: block;
  font-size: 11.5px;
  color: var(--faint);
}

.related-people {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-person {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.related-person:hover { border-color: var(--accent-line); }

/* ------------------------------------------------------------
   レスポンシブ
   ------------------------------------------------------------ */
@media (max-width: 960px) {
  .entity-main,
  .topic-main {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .brand-sub { display: none; }
}

@media (max-width: 760px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0 14px;
    padding-bottom: 4px;
  }

  .brand { flex: 1; min-width: 0; }
  .brand-name { font-size: 15px; }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: -14px;
  }

  .search-toggle { order: 2; }

  .header-search-wrap {
    position: static;
    display: none;
  }

  .topbar.is-search-open .header-search-wrap {
    display: block;
    position: absolute;
    left: 20px;
    right: 20px;
    top: calc(100% + 8px);
    max-width: none;
  }

  .topbar.is-search-open .header-search { box-shadow: var(--shadow-pop); }

  .search-toggle { display: inline-flex; }

  .search-suggest { width: 100%; }

  .home-hero { padding-top: 36px; }

  .feed-toolbar { flex-wrap: wrap; }

  .filter-chips {
    margin: 0 -24px;
    padding: 0 24px;
    flex: 1 1 100%;
  }

  .feed-meta { margin-left: 0; }

  .book-row {
    grid-template-columns: 56px 1fr;
    gap: 4px 14px;
    padding: 14px 16px;
  }

  .book-row .cover { width: 56px; }
  .book-row .cover-title { font-size: 7px; }

  .row-title { font-size: 15px; gap: 8px; }

  .row-cats { display: none; }

  .entity-hero {
    grid-template-columns: 120px 1fr;
    gap: 20px;
  }

  .entity-hero .cover { width: 120px; }
  .entity-hero .cover .cover-title { font-size: 10px; }
  .entity-hero h1 { font-size: 22px; }

  .buy-actions { flex-direction: column; }
  .buy-button { width: 100%; }

  .book-row-lite { grid-template-columns: 64px 1fr; }
  .book-row-lite .cover,
  .book-row-lite > a:first-child { width: 64px; }

  .person-hero { gap: 16px; }
  .person-hero .avatar-xl { width: 56px; height: 56px; font-size: 22px; }
  .person-hero h1 { font-size: 22px; }
}
