/* ============================================================
   anime-single.css — アニメ詳細ページ専用スタイル
   ============================================================ */

/* ── ページコンテナ（中央寄せ） ──────────────────────────── */
.anime-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}
.anime-single { width: 100%; }

/* ── 共通セクション ─────────────────────────────────────── */
.anime-section {
  margin: 1.25rem 0;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.anime-section__title {
  font-size: 1.2rem;
  font-weight: 700;
  border-left: 4px solid var(--brand-primary);
  padding-left: .6rem;
  margin-bottom: 1rem;
}
.anime-section__caption {
  margin-top: -.6rem;
  margin-bottom: 1rem;
  font-size: .8rem;
  color: #6b7280;
}

/* ── パンくず ──────────────────────────────────────────── */
.anime-breadcrumbs {
  font-size: .85rem;
  color: #6b7280;
  padding: .8rem 0 .2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}
.anime-breadcrumbs a {
  color: var(--brand-primary-dark);
  text-decoration: none;
}
.anime-breadcrumbs a:hover { text-decoration: underline; }
.anime-breadcrumbs__sep    { color: #9ca3af; }
.anime-breadcrumbs__current{ color: #111827; font-weight: 600; }

/* ── visually-hidden（スクリーンリーダー専用・C-6 見出し階層補完用） ── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── ① ヒーロー（2カラム） ────────────────────────────── */
.anime-hero--v2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
  margin: 1rem 0 1.5rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.anime-hero__main { min-width: 0; }
/* 修正2: 評価 details を PC で右カラムに配置（.anime-hero の直接の子として grid-column 指定） */
.anime-hero__eval-col {
  grid-column: 2;
  grid-row: 1;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.1rem;
  align-self: start;
}
/* 更新日: メインカラム冒頭に float right で配置。評価ブロックのすぐ左に並ぶ */
.anime-hero__updated {
  float: right;
  font-size: .8rem;
  color: #6b7280;
  white-space: nowrap;
  margin-left: .5rem;
}
.anime-hero__title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--brand-primary-darker);
  margin: 0 0 .25rem;
}
.anime-hero__kana {
  color: #6b7280;
  font-size: .85rem;
  margin: 0 0 .8rem;
}
.anime-hero__chips {
  list-style: none;
  margin: .8rem 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .85rem;
  color: #374151;
}
.anime-hero__chips li {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.chip-icon {
  width: 1.1rem;
  text-align: center;
  color: #6b7280;
}

.anime-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .9rem;
  margin: .4rem 0 1rem;
  font-size: .85rem;
}
.hero-link {
  color: var(--brand-primary-dark);
  text-decoration: none;
}
.hero-link:hover { text-decoration: underline; }

.anime-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1rem 0 .5rem;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .65rem 1.25rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-cta--primary {
  background: var(--brand-primary-dark);
  color: #fff;
}
.btn-cta--primary:hover { background: var(--brand-primary-darker); }
.btn-cta--ghost {
  background: #fff;
  border-color: #d1d5db;
  color: #374151;
}
.btn-cta--ghost:hover { border-color: #9ca3af; }

/* ジャンルタグ */
.anime-genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: .5rem 0 .2rem;
}
.genre-tag {
  background: var(--brand-primary-bg);
  color: var(--brand-primary-dark);
  font-size: .78rem;
  padding: .15rem .65rem;
  border-radius: 20px;
  border: 1px solid var(--brand-primary-border);
}

/* ── ヒーロー右：KPI（.anime-hero__side は削除済み。.anime-hero__eval-col に統合） ── */
.anime-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
}
.kpi-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: .7rem .5rem;
  text-align: center;
}
.kpi-card__icon {
  font-size: 1.05rem;
  color: #f59e0b;
  margin-bottom: .15rem;
}
.kpi-card__label {
  font-size: .72rem;
  color: #6b7280;
  margin-bottom: .25rem;
}
.kpi-card__value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-primary-darker);
  line-height: 1.1;
}
.kpi-card__unit {
  font-size: .7rem;
  color: #6b7280;
  font-weight: 600;
  margin-left: 2px;
}
.kpi-card__value--placeholder {
  color: #9ca3af;
  font-weight: 600;
}

/* 項目別評価ドット */
.score-axes-dot {
  margin-top: 1rem;
  padding: .8rem .9rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.score-axes-dot__title {
  font-size: .8rem;
  color: #6b7280;
  font-weight: 700;
  margin: 0 0 .55rem;
}
.axis-dot-row {
  display: grid;
  grid-template-columns: 3.5em 1fr 2.2em;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  margin-bottom: .35rem;
}
.axis-dot-row:last-child { margin-bottom: 0; }
.axis-dot-row__label { color: #374151; }
.axis-dot-row__val   { text-align: right; color: #111827; font-weight: 600; }
.axis-dots {
  display: inline-flex;
  gap: 3px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e5e7eb;
}
.dot--filled { background: var(--brand-primary); }

/* ── ③ VOD 配信状況 ─────────────────────────────────────── */
.anime-vod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .6rem;
}
.vod-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .8rem .5rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  text-align: center;
  min-height: 88px;
  box-sizing: border-box;
}
a.vod-item--linked {
  border-color: var(--brand-primary-border);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color .15s ease,
    border-color     .15s ease,
    color            .15s ease;
}
a.vod-item--linked:hover {
  background: var(--brand-primary-bg);
  border-color: var(--brand-primary);
  text-decoration: none;
}
a.vod-item--linked:hover .vod-item__name {
  color: var(--brand-primary-dark);
}
a.vod-item--linked:active {
  background: var(--brand-primary-soft);
  border-color: var(--brand-primary);
}
a.vod-item--linked:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}
a.vod-item--linked:focus:not(:focus-visible) {
  outline: none;
}
.vod-item__name {
  font-size: .85rem;
  font-weight: 700;
  color: #374151;
}
.vod-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: .12rem .55rem;
  border-radius: 4px;
  color: #fff;
  display: inline-block;
}
.badge--green  { background: #15803d; }
.badge--orange { background: #c2410c; }
.badge--blue   { background: var(--brand-primary-dark); }
.badge--grey   { background: #6b7280; }
/* badge--purple: vod_type=3（購入）用。anime-vod-types.php と対応 */
.badge--purple { background: #8e44ad; }
.vod-item--unavailable { opacity: .55; background: #f9fafb; }
.vod-item__schedule {
  font-size: .7rem;
  color: #6b7280;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vod-legend {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.4rem;
  font-size: .78rem;
  color: #6b7280;
  justify-content: center;
}
.vod-legend li {
  display: flex;
  align-items: center;
  gap: .35rem;
}

/* ── ④ あらすじ + 基本情報 (2カラム) ─────────────────── */
.anime-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1rem;
  margin: 1.25rem 0;
}
.anime-overview-grid > .anime-section { margin: 0; }
.anime-story {
  line-height: 1.8;
  color: #374151;
  font-size: .95rem;
}
.anime-story__citation {
  margin: .75rem 0 0;
  padding-top: .5rem;
  border-top: 1px dashed #e5e7eb;
  font-size: .8rem;
  color: #6b7280;
}
.anime-story__citation a {
  color: #6b7280;
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.anime-story__citation a:hover,
.anime-story__citation a:focus {
  color: var(--brand-primary-dark);
}

.anime-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.anime-info-table th,
.anime-info-table td {
  padding: .55rem .7rem;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
  vertical-align: top;
}
.anime-info-table th {
  /* L-3: 幅を可変にして長い項目名（「シリーズ」等）でも折り返しを防ぐ */
  width: 6em;
  min-width: 5em;
  max-width: 8em;
  color: #6b7280;
  font-weight: 600;
  white-space: nowrap;
}

/* ── ④-3 各話一覧 ───────────────────────────────────────── */
.anime-episodes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* minmax(0, 1fr): セル内コンテンツの min-content による潰れを防ぐ
     （日本語タイトルが1文字ずつ縦に折り返される現象を回避） */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .25rem 1.5rem;
  counter-reset: ep;
}
.episode-row {
  display: grid;
  /* 番号バッジは max-content、タイトルは minmax(0,1fr) で残り幅を取りきる */
  grid-template-columns: max-content minmax(0, 1fr) 1rem;
  align-items: center;
  gap: .5rem;
  padding: .55rem .4rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: .9rem;
  min-width: 0;
}
.episode-row__link {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) 1rem;
  align-items: center;
  gap: .5rem;
  width: 100%;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  transition: background-color .15s ease;
}
.episode-row__link:hover,
.episode-row__link:focus {
  background: #f9fafb;
  text-decoration: none;
}
.episode-row__link:hover .episode-row__title,
.episode-row__link:focus .episode-row__title { color: var(--brand-primary-dark); }
.episode-row:has(.episode-row__link) { padding: 0; }
.episode-row:has(.episode-row__link) .episode-row__link { padding: .55rem .4rem; }
.episode-row__num {
  display: inline-block;
  background: var(--brand-primary-bg);
  color: var(--brand-primary-dark);
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  padding: .2rem .45rem;
  border-radius: 4px;
  /* バッジ自身も「第12話」等を1行で表示する */
  white-space: nowrap;
}
.episode-row__title {
  color: #374151;
  /* 長いタイトルは単語境界で折り返す（1文字ずつ縦積みになるのを防ぐ） */
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.45;
}
.episode-row__chev {
  color: #9ca3af;
  font-size: 1rem;
  text-align: center;
}

/* ── ⑤ 声優・キャスト ───────────────────────────────────── */
.anime-cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .7rem;
}
.cast-card {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: .7rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fafafa;
}
.cast-card__role {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}
.cast-card__actor {
  font-size: 0.7rem;
  color: #6b7280;
}

/* ── ⑥ シリーズ一覧 ─────────────────────────────────────── */
.anime-series-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.anime-series-list__item a {
  display: block;
  padding: .5rem .8rem;
  border-radius: 5px;
  color: var(--brand-primary-dark);
  text-decoration: none;
  font-size: .9rem;
  transition: background .15s;
}
.anime-series-list__item a:hover { background: var(--brand-primary-bg); }
.anime-series-list__item.is-current a {
  background: var(--brand-primary-soft);
  color: var(--brand-primary-darker);
  font-weight: 700;
  pointer-events: none;
}

/* ── ⑨ 関連作品（横スクロール） ───────────────────────── */
.anime-related-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.anime-related-section__head .anime-section__title { margin-bottom: 0; }
.anime-related-section__more {
  font-size: .85rem;
  color: var(--brand-primary-dark);
  text-decoration: none;
}
.anime-related-section__more:hover { text-decoration: underline; }

.related-scroll-wrap {
  position: relative;
}
.related-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 180px;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: .5rem 2.5rem;
  margin: 0 -.5rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}
/* E-4: アニメーション低減設定でスムーズスクロールを無効化 */
@media (prefers-reduced-motion: reduce) {
  .related-scroll { scroll-behavior: auto; }
}
.related-scroll::-webkit-scrollbar       { height: 6px; }
.related-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
.related-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}
.related-card__thumb img,
.related-card__thumb--placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--brand-primary-border) 0%, var(--brand-primary-soft) 100%);
  border-radius: 6px;
  object-fit: cover;
}
.related-card__title {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
}
.related-card__meta {
  font-size: .72rem;
  color: #6b7280;
}

.related-scroll__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  /* A-2: WCAG 2.5.5 推奨タップ領域 44×44px に拡張。
     視覚サイズは 32px のままパディングで補う。 */
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5e7eb;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.related-scroll__nav:disabled { opacity: .35; cursor: not-allowed; }
.related-scroll__nav--prev { left: -8px; }
.related-scroll__nav--next { right: -8px; }

/* ── レビュー（既存系列を維持） ────────────────────────── */
.anime-review-summary .review-summary-wrap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.2rem;
  align-items: start;
}
.review-total-score {
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}
.review-total-score .score-big {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--brand-primary-darker);
}
.review-total-score .score-unit  { font-size: .85rem; color: #6b7280; }
.review-total-score .score-count { display: block; margin-top: .35rem; color: #6b7280; font-size: .8rem; }
/* B-1: レビュー0件時プレースホルダ */
.review-no-data { color: #9ca3af; font-size: .9rem; margin: .5rem 0 0; }

.review-axes { display: flex; flex-direction: column; gap: .35rem; }
.review-axis-row {
  display: grid;
  grid-template-columns: 6em 1fr 3em;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
}
.axis-bar-wrap {
  background: #e5e7eb;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}
.axis-bar {
  height: 100%;
  background: var(--brand-primary);
}
.axis-val { text-align: right; color: #111827; font-weight: 600; }

/* ── レスポンシブ ──────────────────────────────────────── */
@media (max-width: 899px) {
  .anime-hero--v2 { grid-template-columns: 1fr; }
  /* 1カラム化したら評価 details は通常フローに戻す */
  .anime-hero__eval-col {
    grid-column: auto;
    grid-row: auto;
  }
  .anime-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 699px) {
  .anime-episodes { grid-template-columns: 1fr; }
}
@media (max-width: 599px) {
  .anime-section { padding: 1rem; }
  .anime-hero--v2 { padding: 1rem; }
  .anime-hero__title { font-size: 1.45rem; }
  .anime-vod-grid { grid-template-columns: repeat(2, 1fr); }
  /* 凡例はモバイルで縦並びにして、バッジ列を揃える */
  .vod-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .vod-legend .vod-badge {
    min-width: 3.5rem;
    text-align: center;
    flex-shrink: 0;
  }
  .anime-cast-grid { grid-template-columns: repeat(2, 1fr); }
  .anime-kpi-grid { grid-template-columns: 1fr 1fr; }
  .anime-review-summary .review-summary-wrap { grid-template-columns: 1fr; }
  .related-scroll { grid-auto-columns: 150px; padding: .5rem 1rem; }
  .related-scroll__nav { display: none; }
  /* M-3: 右端フェードで横スクロール可能なことを示すヒント（案A） */
  .related-scroll-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3rem;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.85) 100%);
    pointer-events: none;
    border-radius: 0 8px 8px 0;
  }
  @media (prefers-reduced-motion: no-preference) {
    .related-scroll-wrap::after { transition: opacity .2s ease; }
  }
  .related-scroll-wrap.scroll-end::after { opacity: 0; }
}

/* ============================================================
   ⑧ レビュー投稿フォーム（水色テーマ・案A）
   ============================================================ */

/* 通知（成功・エラー・既レビュー済み） */
.review-notice {
  padding: .75rem 1rem;
  border-radius: 10px;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.review-notice.success { background:#ecfdf5; color:#047857; border:1px solid #a7f3d0; }
.review-notice.error   { background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; }
.review-notice.review-already { background:var(--brand-primary-bg); color:var(--brand-primary-dark); border:1px solid var(--brand-primary-border); }
.review-already__status { margin-top: .25rem; font-size: .85rem; opacity: .8; }

/* ソーシャルログイン提案 */
.review-login-suggest {
  background:var(--brand-primary-bg);
  border:1px solid var(--brand-primary-border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.review-login-suggest__lead {
  margin: 0 0 .75rem;
  font-size: .9rem;
  color: var(--brand-primary-dark);
}
.social-login-btns {
  display:flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .75rem;
}
.btn-social {
  display:inline-flex; align-items:center; gap: .5rem;
  padding: .55rem 1rem;
  border-radius: 10px;
  font-size: .9rem; font-weight: 600;
  text-decoration: none;
  border:1px solid #e5e7eb;
  background:#fff; color:#333;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-social:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.btn-social--line { background:#06C755; color:#fff; border-color: #06C755; }
.btn-social--line:hover { color:#fff; }
.social-icon { flex-shrink: 0; }
.btn-guest-toggle {
  background:transparent; border:0; color:var(--brand-primary-dark);
  font-size: .85rem; cursor: pointer; padding: .25rem .5rem;
}
.btn-guest-toggle:hover { text-decoration: underline; }
/* E-1: キーボードフォーカスリング */
.btn-guest-toggle:focus-visible {
  outline: 2px solid var(--brand-primary-dark);
  outline-offset: 2px;
  border-radius: 3px;
}

/* フォーム本体 */
#anime-review-form { display: block; }

.review-form__field { margin-bottom: 1.1rem; }
.review-form__field > label {
  display:block;
  font-size: .92rem; font-weight: 600;
  color: #1f2937;
  margin-bottom: .5rem;
}
.review-form__field .required { color:#ef4444; margin-left: .15rem; }

.review-form__user-info {
  font-size: .9rem; color:var(--brand-primary-dark);
  background:var(--brand-primary-bg);
  border:1px solid var(--brand-primary-border);
  border-radius: 10px;
  padding: .65rem .9rem;
}
.review-form__user-info strong { color:#0c4a6e; }

.review-form__field input[type="text"],
.review-form__field textarea {
  width: 100%;
  padding: .65rem .85rem;
  font-size: .95rem;
  font-family: inherit;
  color: #1f2937;
  background:#fff;
  border:1px solid #e3e6ee;
  border-radius: 10px;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.review-form__field input[type="text"]:focus,
.review-form__field textarea:focus {
  outline:0;
  border-color:var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}
.review-form__field textarea { resize: vertical; min-height: 6rem; }

/* スコア（5軸） */
.review-form__scores {
  display:grid; gap: .5rem; margin-bottom: 1.25rem;
}
.score-row {
  display:grid;
  grid-template-columns: 130px 1fr 56px;
  align-items:center; gap: .75rem;
  background:#f7fbfd;
  border:1px solid #e3eef5;
  border-radius: 12px;
  padding: .65rem .9rem;
}
.score-row__label { font-size: .92rem; font-weight: 600; color:#0f172a; }
.star-input { display:flex; gap: 4px; }
.star-input .star {
  font-size: 1.4rem;
  color:#dcdfe6;
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, color .12s ease;
  line-height: 1;
  /* C-4: radiogroup 内要素としてのスタイル補完 */
  outline: none; /* フォーカスリングは :focus-visible で別途提供 */
}
.star-input .star:hover { transform: scale(1.15); }
.star-input .star.active { color:#f5b301; }
/* C-4: キーボードフォーカスリング（WCAG 2.4.7 / 3.3.2） */
.star-input .star:focus-visible {
  outline: 2px solid var(--brand-primary-dark);
  outline-offset: 2px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .star-input .star { transition: none; }
}
.score-row__val {
  text-align:center;
  font-weight: 700; font-size: .82rem;
  background:var(--brand-primary-soft); color:var(--brand-primary-dark);
  padding: .2rem 0;
  border-radius: 999px;
}

/* タグ */
.selected-tags-wrap {
  display:flex; flex-wrap: wrap; gap: .35rem;
  margin-bottom: .5rem;
}
.selected-tag {
  display:inline-flex; align-items:center; gap: .35rem;
  background: linear-gradient(135deg, var(--brand-primary-dark), var(--brand-primary-darker));
  color:#fff;
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(3,105,161,.2);
}
.tag-remove-btn {
  background: rgba(255,255,255,.3);
  border: 0;
  color: #fff;
  width: 18px; height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.tag-remove-btn:hover { background: rgba(255,255,255,.5); }

.tag-suggestions-wrap {
  display:flex; flex-wrap: wrap; gap: .35rem;
  align-items: center;
  margin-bottom: .6rem;
}
.tag-suggestions-label {
  font-size: .78rem; color:#64748b;
}
.tag-suggestions-loading {
  font-size: .78rem; color:#94a3b8;
}
.suggest-tag-btn {
  background:#fff;
  border:1px solid #e3e6ee;
  color:#475569;
  padding: .3rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  cursor: pointer;
  transition: all .12s ease;
}
.suggest-tag-btn:hover {
  border-color:var(--brand-primary); color:var(--brand-primary-dark); background:var(--brand-primary-bg);
}
.text-muted { color:#94a3b8; font-size: .78rem; }

.tag-input-wrap {
  display:flex; gap: .5rem;
}
.tag-input-wrap input { flex: 1; }
.tag-input-wrap button {
  padding: 0 1rem;
  border: 0;
  border-radius: 10px;
  background:var(--brand-primary-soft);
  color:var(--brand-primary-dark);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .12s ease;
}
.tag-input-wrap button:hover { background:var(--brand-primary-border); }
.tag-input-wrap button:disabled { background:#f1f5f9; color:#94a3b8; cursor: not-allowed; }
.tag-input-hint {
  font-size: .75rem; color:#94a3b8; margin-top: .35rem;
}
/* F-1: タグ残数カウンタ */
.tag-count-remaining {
  font-size: .75rem;
  color: #64748b;
  margin: .25rem 0 .5rem;
}

/* 投稿ボタン */
.btn-review-submit {
  display:block;
  width: 100%;
  margin-top: .5rem;
  padding: .85rem 1rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(14,165,233,.3);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-review-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(14,165,233,.4);
}
.btn-review-submit:disabled {
  background:#cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .score-row { grid-template-columns: 90px 1fr 48px; gap: .5rem; padding: .55rem .7rem; }
  .score-row__label { font-size: .85rem; }
  .star-input .star { font-size: 1.25rem; }
  .review-form__field > label { font-size: .88rem; }
  .btn-review-submit { font-size: .95rem; padding: .75rem 1rem; }
}

/* ── シリーズ比較テーブルの軸略称凡例 ───────────────────── */
.series-cmp-note {
  font-size: .78rem;
  color: #6b7280;
  margin: .35rem 0;
  line-height: 1.5;
}
.series-cmp-note--top { margin-bottom: .5rem; }

/* ── ウォッチリスト操作のエラーメッセージ ─────────────────── */
.wl-message {
  flex-basis: 100%;
  margin-top: .5rem;
  font-size: .85rem;
  color: #6b7280;
}
.wl-message--error { color: #b91c1c; }

/* ── D-1: ウォッチリスト操作グループ見出し ────────────────── */
.wl-heading {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--brand-primary-dark);
}

/* ── H-4: ウォッチリスト3ボタン ────────────────────────────── */
.wl-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.wl-btn {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--brand-primary-border);
  background: #fff;
  color: var(--brand-primary-dark);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: center;
  line-height: 1.2;
}
.wl-btn:hover,
.wl-btn:focus-visible {
  background: var(--brand-primary-bg);
  color: var(--brand-primary-darker);
}
.wl-btn:focus-visible {
  outline: 2px solid var(--brand-primary-dark);
  outline-offset: 2px;
}
.wl-btn[aria-pressed="true"],
.wl-btn.wl-active {
  background: var(--brand-primary-soft);
  color: var(--brand-primary-darker);
  border-color: var(--brand-primary);
  font-weight: 600;
}
/* 既存 watchlist-wrap との競合を避ける: grid 化後は flex を解除 */
.watchlist-wrap.wl-buttons {
  display: grid;
}

/* ── H-2 / A-1: ヒーロー評価 details/summary ────────────── */
/* A-1: font-size:0/::after content 切替を廃止。
   テキストは <span class="anime-hero__eval-summary__label"> で保持し、
   JS の toggle イベントで「項目別評価」→「評価を閉じる」/「評価を見る」と切り替える。 */
.anime-hero__eval-details {
  /* PC ではボーダーなし・自然に展開 */
}
.anime-hero__eval-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.8rem;
  color: #6b7280;
  padding: 0.25rem 0 0.5rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}
.anime-hero__eval-summary::-webkit-details-marker { display: none; }
/* 開閉インジケータ（JS で transform 制御） */
.anime-hero__eval-summary__indicator {
  font-size: 0.65rem;
  transition: transform 0.2s ease;
  display: inline-block;
  flex-shrink: 0;
}
.anime-hero__eval-summary__label {
  /* テキスト表示は通常フォントサイズで */
}
.anime-hero__eval-summary:focus-visible {
  outline: 2px solid var(--brand-primary-dark);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .anime-hero__eval-summary__indicator {
    transition: none;
  }
}

/* ── H-2: SP（599px以下）ヒーロー表示順 order ──────────────── */
@media (max-width: 599px) {
  /* anime-hero--v2 を flex 縦積みにして order で並べ替え（修正2: details が直接の子になったため） */
  .anime-hero--v2 {
    display: flex;
    flex-direction: column;
  }
  /* anime-hero__main の中身も flex で order 制御 */
  .anime-hero__main {
    display: flex;
    flex-direction: column;
    order: 1; /* main ブロック全体を最初に */
  }
  /* 1: タイトル */
  .anime-hero__title  { order: 1; }
  .anime-hero__kana   { order: 1; }
  /* 2: ジャンルタグ・メタチップス・リンク */
  .anime-genre-tags   { order: 2; }
  .anime-hero__chips  { order: 2; }
  .anime-hero__links  { order: 2; }
  /* 3: 配信先CTA（最優先） */
  .anime-hero__cta    { order: 3; }
  /* 4: ウォッチリスト */
  .wl-buttons         { order: 4; }
  .anime-hero__cta-guest { order: 4; }
  /* 5: マイページリンク・SNSシェア */
  .mypage-link-wrap   { order: 5; }
  .share-btns         { order: 6; }

  /* 修正2: 評価 details を SP では .anime-hero の flex order で .anime-hero__main の直後に配置 */
  .anime-hero__eval-col {
    order: 2;
    grid-column: auto;
    grid-row: auto;
  }
  /* 修正7: visually-hidden h2（評価情報）は flex 順序に干渉させない */
  .anime-hero--v2 > .visually-hidden {
    order: 0;
  }

  /* H-5: パンくず現在ページ名 1行省略 */
  .anime-breadcrumbs__current {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50vw;
    display: inline-block;
    vertical-align: middle;
  }
}

