/* まとめページの見た目。2ちゃんねるのまとめサイト・YouTube・X のような「白地に青い太字のリンク、赤い印、灰色の補足」。
   このファイルはまとめページでしか読まないので、style.css の色（黒地・ピンク）をここで上書きしても、声優DB のページは変わらない */
:root {
  --bg: #ececec;
  --surface: #fff;
  --surface-2: #f7f7f7;
  --line: #d9d9d9;
  --line-2: #c4c4c4;
  --text: #1f1f1f;
  --text-2: #333;
  --muted: #606060;
  --faint: #8a8a8a;
  --link: #0b4ea2;
  --accent: #0b4ea2;
  --accent-2: #0b4ea2;
  --on-accent: #fff;
  --red: #d9001b;
  --navy: #26344d;
  --x-blue: #1d9bf0;
  --radius: 0;
}
body { background: var(--bg); color: var(--text); }
a { color: var(--link); }
a:hover { color: #073574; }

/* ヘッダー・フッター（まとめページだけ白に） */
.site-header { background: #fff; border-top: 3px solid var(--red); border-bottom: 1px solid var(--line); }
.logo { color: var(--text); }
.site-nav a { color: var(--link); font-weight: 700; }
.pr { color: var(--faint); padding-bottom: 6px; }
.site-footer { background: #fff; border-top: 1px solid var(--line); margin-top: 24px; }
main.wrap { gap: 12px; padding-top: 0; }
.fine { color: var(--muted); }
.empty { margin: 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.filter-empty[hidden] { display: none; }

/* まとめの中の切り替え（X のタブのように、選んでいるものに青い下線）。画面の上に貼りつく */
.d-nav { position: sticky; top: 0; z-index: 5; display: flex; margin: 0 -16px; background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--line); }
.d-nav a { flex: 1; display: flex; justify-content: center; padding-top: 12px; color: var(--muted); font-size: 15px; font-weight: 700; text-decoration: none; }
.d-nav a span { padding-bottom: 9px; border-bottom: 4px solid transparent; border-radius: 2px; }
.d-nav a[aria-current="page"] { color: var(--text); }
.d-nav a[aria-current="page"] span { border-bottom-color: var(--x-blue); }
.d-nav a:hover { background: #f5f5f5; }

.d-layout { display: flex; flex-direction: column; gap: 20px; }
.d-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.d-head h1 { margin: 10px 0 2px; font-size: 20px; }
.d-sub { margin: 0; font-size: 12px; color: var(--muted); }
.d-filter { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.d-filter button { padding: 4px 4px; border: 0; background: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.d-filter button[aria-pressed="true"] { color: var(--text); font-weight: 700; text-decoration: none; }

/* 見出しの帯 */
.d-band { margin: 0; padding: 7px 12px; background: var(--navy); color: #fff; font-size: 16px; line-height: 1.4; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.d-band small { font-size: 12px; font-weight: 400; color: #c5cedd; }

/* 並べ替え（YouTube の上に並ぶボタンのような、灰色の四角） */
.d-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; }
.d-chips [role="tab"] { flex: none; height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: #dcdcdc; color: #0f0f0f; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.d-chips [role="tab"][aria-selected="true"] { background: #0f0f0f; color: #fff; }
.d-chips [role="tab"]:focus-visible { outline: 2px solid var(--x-blue); outline-offset: 2px; }

/* 作品の一覧（まとめサイトの記事一覧のように、左に画像・右に青い太字のタイトル） */
.d-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-top: 0; }
.d-item { position: relative; display: flex; gap: 10px; padding: 10px; border-top: 1px solid var(--line); }
.d-item:first-child { border-top: 0; }
.d-item[hidden] { display: none; }
.d-item:hover { background: #f8f8f8; }
.d-thumb { flex: none; align-self: flex-start; width: 116px; aspect-ratio: 4 / 3; background: #f0f0f0; border: 1px solid #e3e3e3; }
.d-thumb img { width: 100%; height: 100%; object-fit: contain; }  /* 公式画像は切り抜かない（DLsite の規約：縦横比を保った拡大縮小のみ） */
.d-thumb .noimg { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 11px; color: var(--faint); }
.d-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.d-labels { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 11px; line-height: 1; }
.d-labels > span { padding: 3px 4px; }
.d-rank { padding-left: 0 !important; font-size: 12px; font-weight: 700; color: var(--muted); }
.d-item.top .d-rank { padding-left: 5px !important; background: var(--text); color: #fff; }
.d-new { border: 1px solid var(--red); color: var(--red); font-weight: 700; padding: 2px 4px !important; }
.d-off { background: var(--red); color: #fff; font-weight: 700; }
.d-tag { border: 1px solid var(--line-2); color: var(--muted); padding: 2px 4px !important; }
.d-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.d-title a.stretch { color: var(--link); }
.d-item:hover .d-title a { text-decoration: underline; }
.d-price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; font-size: 12px; color: var(--muted); }
.d-price s { color: var(--faint); }
.d-price b { font-size: 17px; color: var(--red); }
.d-price .d-arrow { color: var(--faint); }
.d-price .d-wish { font-size: 14px; font-weight: 700; color: var(--text); }
.d-until { color: var(--red); }
.d-meta { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-meta.cast a { position: relative; z-index: 1; }  /* カード全体のリンクの上に出す */

.d-more { display: block; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-top: 0; text-align: center; font-size: 14px; font-weight: 700; text-decoration: none; }
.d-more:hover { background: #f5f5f5; text-decoration: underline; }

/* 箱（キャンペーン・右側のリンク）。まとめサイトのリンク集のように、行ごとに › */
.d-box { background: var(--surface); border: 1px solid var(--line); }
.d-box h2 { margin: 0; padding: 7px 10px; background: var(--navy); color: #fff; font-size: 14px; }
.d-links { list-style: none; margin: 0; padding: 0; }
.d-links li { position: relative; border-top: 1px solid var(--line); }
.d-links li:first-child { border-top: 0; }
.d-links a { display: block; padding: 9px 30px 9px 10px; font-size: 14px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.d-links a::after { content: "›"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 20px; font-weight: 400; }
.d-links a:hover { background: #f5f5f5; text-decoration: underline; }
.d-links small { display: block; font-size: 12px; font-weight: 400; color: var(--red); }
.d-links small.gray { color: var(--muted); }

/* 右側はスマホでは下に回す。キャンペーンだけは、スマホでは一覧の上（.d-sp）に出す */
.d-pc { display: none; }
@media (min-width: 960px) {
  .d-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
  .d-sp { display: none; }
  .d-side { position: sticky; top: 56px; display: flex; flex-direction: column; gap: 16px; }
  .d-pc { display: block; }
  .d-head h1 { font-size: 24px; margin-top: 14px; }
  .d-thumb { width: 160px; }
  .d-title { font-size: 16px; }
  /* 入口の TOP5 は、YouTube の一覧のように横に5つ（画像の下にタイトル） */
  .d-list.grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .d-list.grid5 .d-item { flex-direction: column; gap: 6px; border-top: 0; border-left: 1px solid var(--line); }
  .d-list.grid5 .d-item:first-child { border-left: 0; }
  .d-list.grid5 .d-thumb { width: 100%; }
  .d-list.grid5 .d-title { font-size: 13px; -webkit-line-clamp: 3; }
  .d-list.grid5 .d-price b { font-size: 15px; }
  .d-list.grid5 .d-price .d-wish { font-size: 13px; }
  .d-list.grid5 .d-meta.cast, .d-list.grid5 .d-meta.sub { display: none; }
}
@media (max-width: 959px) {
  .d-side { display: flex; flex-direction: column; gap: 16px; }
}
