/*
 * anipedia プロトタイプ 2（デザイン刷新版）の CSS
 * 正本のデザイン: ../../renewal_design/Anipedia/*.html（PC 1280 / SP 375）
 * 値はデザインの指定をそのまま使う。スマホは 767px 以下。
 */

/* ------------------------------------------------------------ 色・寸法 */
:root {
  --c-ink: #1a1a1a;
  --c-text: #3c3c43;
  --c-sub: #6e6e76;
  --c-line: #e5e5ea;
  --c-line-strong: #c8c8cf;
  --c-soft: #f5f5f7;
  --c-accent: #de007a;
  --c-accent-hover: #b8005f;
  --c-accent-soft: #fdeaf3;
  --c-dark: #17161a;
  --c-star: #f0a020;
  --c-star-base: #e0e0e4;
  --grad: linear-gradient(112deg, #f53b50, #de0a5a);
  --grad-tile: linear-gradient(135deg, #f53b50, #de0a5a);
  --wrap: 1040px;
  --hs-gap: 16px;
}

/* ------------------------------------------------------------ 基本 */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--c-ink);
  font-family: 'Noto Sans JP', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-accent); }
a:hover { color: var(--c-accent-hover); }
img { max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* PC だけ・スマホだけの要素（本来の display を上書きしないよう、隠す側だけ指定する） */
@media (min-width: 768px) { .sp-only { display: none !important; } }
@media (max-width: 767px) { .pc-only { display: none !important; } }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

.l-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.l-main { max-width: var(--wrap); margin: 0 auto; padding: 36px 24px 56px; display: flex; flex-direction: column; gap: 44px; }
.l-main > * { min-width: 0; }

/* プロトタイプの注意書き（デザインにはない。ローカル確認用の表示） */
.proto-notice { background: var(--c-dark); color: rgba(255,255,255,.8); font-size: 11px; line-height: 1.5; padding: 4px 12px; text-align: center; }

/* ------------------------------------------------------------ ヘッダー（トップ以外） */
.hdr { background: #fff; border-bottom: 1px solid var(--c-line); }
.hdr__in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 28px; height: 68px; padding: 0 24px; }
.hdr__logo { display: block; height: 40px; flex: none; }
.hdr__logo img { height: 40px; width: auto; display: block; }
.hdr__nav { display: flex; gap: 2px; flex: 1; }
.hdr__nav a { font-size: 14px; font-weight: 500; color: var(--c-ink); text-decoration: none; padding: 10px 12px; border-radius: 8px; }
.hdr__nav a:hover, .hdr__nav a[aria-current] { background: var(--c-soft); color: var(--c-accent); }
.hdr__icons { display: none; gap: 2px; }
.icon-btn { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; border-radius: 10px; color: var(--c-ink); cursor: pointer; padding: 0; }
.hdr__chips { display: none; }

.pill-search { display: flex; align-items: center; width: 340px; height: 42px; border: 1.5px solid #d9d9de; border-radius: 999px; overflow: hidden; background: #fff; }
.pill-search input { flex: 1; min-width: 0; border: 0; outline: 0; height: 100%; padding: 0 16px; font-size: 14px; color: var(--c-ink); background: none; }
.pill-search button { flex: none; width: 52px; height: 100%; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; }
.pill-search:focus-within { border-color: var(--c-accent); }

/* スマホのメニュー（開閉） */
.drawer { display: none; }

/* ------------------------------------------------------------ フッター */
.ftr { background: var(--c-accent); color: #fff; padding: 40px 24px 28px; margin-top: 0; }
.ftr a { color: #fff; text-decoration: none; }
.ftr a:hover { text-decoration: underline; color: #fff; }
.ftr__grid { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; font-size: 13px; }
.ftr__logo { height: 56px; width: auto; display: block; }
.ftr__lead { margin: 14px 0 0; line-height: 1.8; font-size: 13px; color: rgba(255,255,255,.95); }
.ftr__cols { display: contents; }
.ftr__cap { display: block; margin-bottom: 10px; font-size: 14px; }
.ftr__links { display: flex; flex-direction: column; gap: 8px; }
.ftr__bottom { max-width: var(--wrap); margin: 32px auto 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.35); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: rgba(255,255,255,.95); }
.ftr__bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ------------------------------------------------------------ 見出し・リンク */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-head h2, .sec-title { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.4; }
.sec-head--lg h2 { font-size: 24px; }
.sec-head--md { margin-bottom: 12px; }
.sec-head--md h2 { font-size: 20px; }
.sec-head small, .sec-title small { font-size: 14px; color: var(--c-sub); font-weight: 500; margin-left: 6px; }
.sec-title { margin-bottom: 16px; }
.more { font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; flex: none; }
.sec-head--md .more { font-size: 13px; }

.btn-more { margin: 20px auto 0; display: block; height: 44px; padding: 0 28px; border-radius: 999px; border: 1.5px solid var(--c-line); background: #fff; color: var(--c-ink); font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 41px; text-align: center; }
.btn-more:hover { border-color: var(--c-accent); color: var(--c-accent); }
.btn-grad { height: 40px; padding: 0 20px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; white-space: nowrap; }
.btn-grad:hover { color: #fff; opacity: .9; }
.btn-dark { height: 40px; padding: 0 20px; border-radius: 999px; background: var(--c-ink); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.pr { font-size: 11px; font-weight: 700; color: var(--c-sub); border: 1px solid var(--c-line-strong); border-radius: 4px; padding: 0 5px; line-height: 1.5; flex: none; }

/* ------------------------------------------------------------ 星 */
.stars { position: relative; display: inline-block; line-height: 1; color: var(--c-star-base); letter-spacing: 1px; font-size: 12px; white-space: nowrap; }
.stars__on { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--c-star); }
.rating { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--c-sub); }
.rating b { color: var(--c-ink); }

/* ------------------------------------------------------------ 作品カード */
.wcard { display: block; text-decoration: none; color: var(--c-ink); min-width: 0; }
.wcard:hover { color: var(--c-ink); }
.wcard:hover .wcard__title { color: var(--c-accent); }
.wcard__img { position: relative; display: block; }
.wcard__img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; display: block; background: #a6a6a6; }
.badge-vod { position: absolute; left: 6px; bottom: 6px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(23,22,26,.85); border-radius: 4px; padding: 2px 6px; line-height: 1.5; }
.badge-rank { position: absolute; left: 6px; top: 6px; width: 28px; height: 28px; border-radius: 8px; background: var(--c-accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 900; }
.wcard__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.4; margin-top: 8px; }
.wcard__title--1 { display: block; white-space: nowrap; text-overflow: ellipsis; -webkit-line-clamp: unset; }
.wcard__meta { display: block; font-size: 12px; color: var(--c-sub); }
.wcard__meta b { color: var(--c-ink); }
.wcard .rating { font-size: 11px; gap: 5px; margin-top: 3px; }
.wcard .rating .stars { font-size: 11px; }

.grid-6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* 横スクロールの列 */
.rail { display: flex; gap: var(--hs-gap); overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: none; }
.rail--works > .wcard { width: 220px; }
.rail--works .wcard__title { font-size: 14px; }
.rail--wide > .wcard { width: 236px; }
.rail--wide .wcard__title { font-size: 14px; }

/* ------------------------------------------------------------ 人（丸い写真） */
.person { display: block; text-decoration: none; color: var(--c-ink); text-align: center; min-width: 0; }
.person:hover { color: var(--c-accent); }
.person img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #a6a6a6; display: block; margin: 0 auto 8px; }
.person__name { display: block; font-size: 13px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__sub { display: block; font-size: 11px; color: var(--c-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail--people { gap: 14px; }
.rail--people > .person { width: 104px; }

/* ------------------------------------------------------------ 語のチップ */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--c-line); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--c-ink); font-size: 14px; font-weight: 700; background: #fff; }
.chip:hover { border-color: var(--c-accent); color: var(--c-accent); }
.chip small { font-size: 11px; color: var(--c-sub); font-weight: 500; }
.chip--soft { border: 0; background: var(--c-soft); font-weight: 500; }
.chip--soft:hover { background: var(--c-accent-soft); color: var(--c-accent); }

.kana { display: flex; gap: 6px; flex-wrap: wrap; }
.kana a, .kana span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; font-size: 15px; font-weight: 700; color: var(--c-text); text-decoration: none; background: var(--c-soft); }
.kana a:hover, .kana a[aria-current] { background: var(--c-accent-soft); color: var(--c-accent); }
.kana span { opacity: .4; }

/* 制作会社のモノグラム */
.mono { width: 36px; height: 36px; border-radius: 10px; background: var(--grad-tile); color: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 900; flex: none; line-height: 1; }

/* ------------------------------------------------------------ 表・情報 */
.info { font-size: 13px; background: var(--c-soft); border-radius: 14px; padding: 6px 18px 8px; }
.info > div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.info > div:last-child { border-bottom: 0; }
.info dt { color: var(--c-sub); }
.info dd { line-height: 1.55; overflow-wrap: anywhere; }
.info dd a { color: var(--c-ink); text-decoration: none; }
.info dd a:hover { color: var(--c-accent); text-decoration: underline; }

.panel-soft { background: var(--c-soft); border-radius: 20px; padding: 28px; }
.box-line { border: 1px solid var(--c-line); border-radius: 16px; }

/* よくある質問 */
.faq { display: flex; flex-direction: column; gap: 6px; }
.faq details { background: #fff; border-radius: 10px; padding: 0 14px; }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary b { color: var(--c-accent); font-weight: 900; }
.faq p { margin: 0; padding: 0 0 12px 22px; font-size: 14px; line-height: 1.7; color: var(--c-text); }

/* ページ送り */
.pager { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 32px; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 10px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--c-text); background: var(--c-soft); }
.pager a { color: var(--c-ink); }
.pager a:hover { background: var(--c-accent-soft); color: var(--c-accent); }
@media (max-width: 767px) { .pager { margin-top: 24px; } .pager a, .pager span { min-width: 44px; height: 44px; } }
.pager .is-current { background: var(--c-accent); color: #fff; }
.pager .gap { background: none; min-width: 20px; padding: 0; }

/* パンくず（明るい背景のページ） */
.crumb { font-size: 12px; color: var(--c-sub); display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a { color: var(--c-sub); text-decoration: none; }
.crumb a:hover { color: var(--c-accent); }
.crumb [aria-current] { color: var(--c-ink); }

/* 無効にしたリンク（K6: 見た目だけ） */
.is-disabled { cursor: not-allowed; }

/* ------------------------------------------------------------ ページの頭（一覧・人・読みもの） */
.page-head { background: var(--c-soft); }
.page-head__in { max-width: var(--wrap); margin: 0 auto; padding: 22px 24px 30px; }
.page-head h1 { font-size: 32px; font-weight: 900; line-height: 1.3; margin: 14px 0 0; }
.page-head p { margin-top: 8px; font-size: 14px; color: var(--c-text); }

/* ------------------------------------------------------------ スマホ（767px 以下） */
@media (max-width: 767px) {
  body { font-size: 13px; }
  .l-wrap { padding: 0 16px; }
  .l-main { padding: 20px 16px 0; gap: 26px; }
  .l-main:last-child { padding-bottom: 26px; }

  .hdr__in { height: 56px; padding: 0 8px 0 14px; gap: 8px; justify-content: space-between; }
  .hdr__logo, .hdr__logo img { height: 30px; }
  .hdr__nav, .hdr__in > .pill-search { display: none; }
  .hdr__icons { display: flex; }
  .hdr__chips { display: flex; gap: 4px; padding: 0 10px 10px; overflow-x: auto; scrollbar-width: none; }
  .hdr__chips::-webkit-scrollbar { display: none; }
  .hdr__chips a { flex: none; font-size: 12px; font-weight: 500; color: var(--c-text); text-decoration: none; padding: 7px 10px; border-radius: 999px; background: var(--c-soft); }
  .hdr__search { padding: 0 12px 10px; }
  .hdr__search .pill-search { width: 100%; }

  .drawer { position: fixed; inset: 0; z-index: 50; background: rgba(23,22,26,.5); }
  .drawer[data-open] { display: block; }
  .drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(320px, 86vw); background: #fff; padding: 12px 16px 24px; overflow-y: auto; }
  .drawer__head { display: flex; justify-content: flex-end; }
  .drawer__cap { font-size: 12px; font-weight: 700; color: var(--c-sub); margin: 14px 0 6px; }
  .drawer a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--c-line); color: var(--c-ink); text-decoration: none; font-size: 14px; font-weight: 500; }

  .ftr { padding: 26px 16px 22px; font-size: 12px; }
  .ftr__grid { display: block; }
  .ftr__logo { height: 44px; margin-bottom: 12px; }
  .ftr__lead, .ftr__cap { display: none; }
  .ftr__cols { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 16px; }
  .ftr__col, .ftr__links { display: contents; }
  .ftr__links a { font-weight: 500; padding: 4px 0; }
  .ftr__bottom { margin-top: 0; padding-top: 12px; display: block; font-size: 11px; }
  .ftr__bottom nav { gap: 8px 14px; }
  .ftr__bottom nav a { color: rgba(255,255,255,.9); }
  .ftr__bottom span { display: block; margin-top: 12px; color: rgba(255,255,255,.9); }

  .sec-head { margin-bottom: 10px; }
  .sec-head h2, .sec-head--lg h2, .sec-head--md h2, .sec-title { font-size: 18px; }
  .sec-head small, .sec-title small { font-size: 12px; margin-left: 2px; }
  .sec-title { margin-bottom: 10px; }
  .more, .sec-head--md .more { font-size: 13px; }

  .btn-more { width: 100%; margin-top: 14px; }

  .grid-6, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .wcard__img img { border-radius: 8px; }
  .wcard__title { margin-top: 6px; }
  .badge-vod { left: 5px; bottom: 5px; }
  .badge-rank { left: 5px; top: 5px; width: 24px; height: 24px; border-radius: 6px; font-size: 12px; }

  .rail { gap: 10px; margin: 0 -16px; padding: 0 16px; }
  .rail--works > .wcard { width: 150px; }
  .rail--wide > .wcard { width: 160px; }
  .rail--works .wcard__title, .rail--wide .wcard__title { font-size: 13px; }
  .rail--works .wcard__img img, .rail--wide .wcard__img img { border-radius: 8px; }
  .rail--people { gap: 10px; }
  .rail--people > .person { width: 84px; }
  .person img { width: 76px; height: 76px; margin-bottom: 6px; }
  .person__name { font-size: 12px; }
  .person__sub { font-size: 10px; }

  .chips { gap: 6px; }
  .chip { padding: 0 12px; font-size: 13px; gap: 5px; }
  .chip small { font-size: 10px; }
  .kana { display: grid; grid-template-columns: repeat(5, 1fr); }
  .kana a, .kana span { width: auto; }

  .info { padding: 4px 16px 6px; }
  .info > div { grid-template-columns: 76px 1fr; gap: 8px; padding: 9px 0; }
  .panel-soft { border-radius: 0; padding: 20px 16px; }
  .faq details { padding: 0 12px; }
  .faq summary { font-size: 13px; gap: 8px; }
  .faq p { font-size: 13px; padding: 0 0 10px 20px; }

  .page-head__in { padding: 14px 16px 20px; }
  .page-head h1 { font-size: 24px; margin-top: 10px; }
  .page-head p { font-size: 13px; }
}

/* ------------------------------------------------------------ 暗い帯の見出し（一覧・検索: 02 / 03 など） */
.dhead { background: var(--c-dark); color: #fff; }
.dhead__in { max-width: 1200px; margin: 0 auto; padding: 18px 24px 20px; }
.dhead .crumb { color: rgba(255,255,255,.7); margin-bottom: 6px; }
.dhead .crumb a { color: rgba(255,255,255,.7); }
.dhead .crumb [aria-current] { color: rgba(255,255,255,.7); }
.dhead h1 { margin: 0; font-size: 24px; font-weight: 900; line-height: 1.4; }
.dhead h1 small { font-size: 14px; font-weight: 500; color: rgba(255,255,255,.75); margin-left: 8px; }
.l-page { max-width: 1200px; margin: 0 auto; padding: 20px 24px 56px; }
.count-note { text-align: center; font-size: 12px; color: var(--c-sub); margin-top: 10px; }

/* 切り替え（並び順・表示） */
.seg { display: inline-flex; background: var(--c-soft); border-radius: 999px; padding: 3px; flex: none; }
.seg a, .seg button { padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--c-sub); text-decoration: none; border: 0; background: none; cursor: pointer; line-height: 1.4; }
.seg [aria-current], .seg [aria-pressed="true"] { background: #fff; color: var(--c-ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.pill-select { position: relative; display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--c-line); border-radius: 999px; font-size: 13px; font-weight: 700; background: #fff; flex: none; }
.pill-select select { appearance: none; border: 0; background: none; height: 100%; padding: 0 30px 0 14px; font-size: inherit; font-weight: inherit; color: var(--c-ink); cursor: pointer; border-radius: 999px; }
.pill-select::after { content: '▾'; position: absolute; right: 12px; pointer-events: none; font-size: 12px; }

@media (max-width: 767px) {
  .dhead__in { padding: 14px 16px 16px; }
  .dhead .crumb { font-size: 11px; }
  .dhead h1 { font-size: 20px; }
  .dhead h1 small { font-size: 12px; margin-left: 4px; }
  .l-page { padding: 12px 16px 28px; }
  .count-note { font-size: 11px; margin-top: 8px; }
}

/* Wikimedia Commons のロゴ（2021 年以降の作品で公式の画像が無いとき）は切らずに収める */
img[src*="commons.wikimedia.org"] { object-fit: contain !important; background: #fff; }
