/* ============================================================
   anime-streaming-schedule.css — 配信開始・終了スケジュール専用スタイル
   anime-season.css と同じデザイントークンに準拠
   （max-width 1120px / body bg #f7fbfd / primary #0ea5e9 ほか）
   自己完結型: 他ページの CSS には依存しない
   ============================================================ */

/* ブランド色は style.css の --brand-* が正本（フォールバックは同値） */
:root {
  --sts-primary:        var(--brand-primary,        #0ea5e9);
  --sts-primary-dark:   var(--brand-primary-dark,   #0369a1);
  --sts-primary-soft:   var(--brand-primary-soft,   #e0f2fe);
  --sts-primary-border: var(--brand-primary-border, #bae6fd);
  --sts-ink:            #1f2937;
  --sts-ink-mute:       #6b7280;
  --sts-line:           #e5e7eb;
  --sts-bg:             #f7fbfd;
  --sts-card-bg:        #fff;
  --sts-start:          #059669; /* 配信開始（緑） */
  --sts-start-soft:     #ecfdf5;
  --sts-start-border:   #a7f3d0;
  --sts-end:            #dc2626; /* 配信終了（赤） */
  --sts-end-soft:       #fef2f2;
  --sts-end-border:     #fecaca;
}

/* body 全体の背景（archive / season と揃える） */
body.anime-stsched-page {
  background: var(--sts-bg);
}

/* parent theme (AFFINGER) のフロントページ用レイアウト打ち消し
   （anime-season.css と同じ対処） */
body.anime-stsched-page #content-w,
body.anime-stsched-page #main.stsched-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  float: none;
  display: block;
  box-sizing: border-box;
  background: var(--sts-bg);
}

/* ── ヘッダー ───────────────────────────────────────── */
.stsched-header {
  background: #fff;
  border-bottom: 1px solid var(--sts-line);
}
.stsched-header__inner {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: .85rem 1rem;
  box-sizing: border-box;
}

/* パンくず（archive / season 共通スタイルと同等） */
.anime-stsched-page .anime-breadcrumbs {
  font-size: .78rem;
  color: var(--sts-ink-mute);
  margin-bottom: .25rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.anime-stsched-page .anime-breadcrumbs a {
  color: var(--sts-primary);
  text-decoration: none;
}
.anime-stsched-page .anime-breadcrumbs a:hover { text-decoration: underline; }
.anime-stsched-page .anime-breadcrumbs__sep    { color: #9ca3af; }
.anime-stsched-page .anime-breadcrumbs__current{ color: #111827; font-weight: 600; }

.stsched-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  border-left: 4px solid var(--sts-primary);
  padding-left: .55rem;
  color: var(--sts-ink);
  line-height: 1.4;
}
.stsched-lead {
  font-size: .85rem;
  color: var(--sts-ink-mute);
  margin: .5rem 0 0;
  line-height: 1.7;
}

/* ── メイン ─────────────────────────────────────────── */
.stsched-main__inner {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

.anime-stsched-page .anime-section {
  background: var(--sts-card-bg);
  border: 1px solid var(--sts-line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
  box-sizing: border-box;
}

.anime-stsched-page .anime-section-count {
  font-size: .75rem;
  font-weight: 600;
  color: var(--sts-ink-mute);
  background: #f3f4f6;
  border-radius: 999px;
  padding: .1rem .6rem;
}

/* ── サマリー ───────────────────────────────────────── */
.stsched-summary__counts {
  margin: 0 0 .5rem;
  font-size: .9rem;
  color: var(--sts-ink);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.stsched-summary__num {
  font-weight: 700;
  border-radius: 999px;
  padding: .15rem .7rem;
  font-size: .82rem;
}
.stsched-summary__num--start {
  color: var(--sts-start);
  background: var(--sts-start-soft);
  border: 1px solid var(--sts-start-border);
}
.stsched-summary__num--end {
  color: var(--sts-end);
  background: var(--sts-end-soft);
  border: 1px solid var(--sts-end-border);
}
.stsched-note {
  font-size: .78rem;
  color: var(--sts-ink-mute);
  line-height: 1.7;
  margin: 0 0 .6rem;
}

/* 週ジャンプナビ */
.stsched-week-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.stsched-week-nav__link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--sts-primary-dark);
  background: var(--sts-primary-soft);
  border: 1px solid var(--sts-primary-border);
  border-radius: 999px;
  padding: .2rem .7rem;
  text-decoration: none;
}
.stsched-week-nav__link:hover {
  background: var(--sts-primary-border);
}
.stsched-week-nav__link.is-empty {
  color: var(--sts-ink-mute);
  background: #f3f4f6;
  border-color: var(--sts-line);
}
.stsched-week-nav__link.is-current {
  color: #fff;
  background: var(--sts-primary);
  border-color: var(--sts-primary);
}
.stsched-week-nav__now {
  font-size: .68rem;
  background: rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: 0 .4rem;
}

/* ── 週セクション ───────────────────────────────────── */
.stsched-week {
  scroll-margin-top: 4.5rem; /* 追従ナビ分。アンカー着地時に見出しが隠れない */
}
.stsched-week--current {
  border-color: var(--sts-primary-border);
  box-shadow: 0 0 0 2px var(--sts-primary-soft);
}
.stsched-week__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--sts-ink);
  border-left: 4px solid var(--sts-primary);
  padding-left: .55rem;
  margin: 0 0 .8rem;
  line-height: 1.4;
}
.stsched-week__now-badge {
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  background: var(--sts-primary);
  border-radius: 999px;
  padding: .1rem .55rem;
}

.stsched-empty {
  font-size: .85rem;
  color: var(--sts-ink-mute);
  margin: 0;
}

/* ── サービスごとのブロック ─────────────────────────── */
.stsched-service {
  border-top: 1px solid var(--sts-line);
  padding-top: .7rem;
  margin-top: .7rem;
}
.stsched-service:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.stsched-service__name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--sts-ink);
  margin: 0 0 .5rem;
}
.stsched-service__name a {
  color: var(--sts-primary-dark);
  text-decoration: none;
}
.stsched-service__name a:hover { text-decoration: underline; }

/* 開始/終了の2カラム（モバイルは縦積み） */
.stsched-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}
@media (max-width: 640px) {
  .stsched-cols { grid-template-columns: 1fr; }
}
.stsched-col {
  border-radius: 8px;
  padding: .6rem .7rem;
  box-sizing: border-box;
}
/* 開始/終了どちらかしか無い週はカラムを全幅にする */
.stsched-col:only-child { grid-column: 1 / -1; }
.stsched-col--start {
  background: var(--sts-start-soft);
  border: 1px solid var(--sts-start-border);
}
.stsched-col--end {
  background: var(--sts-end-soft);
  border: 1px solid var(--sts-end-border);
}
.stsched-col__title {
  font-size: .78rem;
  font-weight: 700;
  margin: 0 0 .4rem;
}
.stsched-col--start .stsched-col__title { color: var(--sts-start); }
.stsched-col--end   .stsched-col__title { color: var(--sts-end); }
.stsched-col--start .stsched-col__title::before { content: "▶ "; }
.stsched-col--end   .stsched-col__title::before { content: "⏳ "; }

/* ── 作品 1 行 ──────────────────────────────────────── */
.stsched-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stsched-item {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: .85rem;
  padding: .25rem 0;
  margin: 0;
}
.stsched-item + .stsched-item {
  border-top: 1px dashed rgba(0, 0, 0, .08);
}
.stsched-item__date {
  flex-shrink: 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--sts-ink);
  font-size: .8rem;
}
.stsched-item__time {
  font-weight: 400;
  color: var(--sts-ink-mute);
  font-size: .75rem;
  margin-left: .2rem;
}
.stsched-item__title {
  color: var(--sts-primary-dark);
  text-decoration: none;
  line-height: 1.5;
}
a.stsched-item__title:hover { text-decoration: underline; }
span.stsched-item__title    { color: var(--sts-ink); }

/* vod_type バッジ（anime-single.css の badge--* と同系色） */
.stsched-badge {
  flex-shrink: 0;
  font-size: .68rem;
  font-weight: 700;
  border-radius: 4px;
  padding: .05rem .4rem;
  color: #fff;
}
.stsched-badge--type1 { background: #10b981; } /* 見放題（緑） */
.stsched-badge--type2 { background: #f59e0b; } /* レンタル（橙） */
.stsched-badge--type3 { background: #8b5cf6; } /* 購入（紫） */

/* ── ハブ: 今月・来月の導線 ─────────────────────────── */
.stsched-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin-bottom: .8rem;
}
@media (max-width: 640px) {
  .stsched-featured { grid-template-columns: 1fr; }
}
.stsched-featured__link {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--sts-primary-dark);
  background: var(--sts-primary-soft);
  border: 1px solid var(--sts-primary-border);
  border-radius: 10px;
  padding: .8rem 1rem;
  text-decoration: none;
}
.stsched-featured__link:hover {
  background: var(--sts-primary-border);
}
.stsched-featured__badge {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  background: var(--sts-primary);
  border-radius: 999px;
  padding: .15rem .6rem;
}
.stsched-featured__badge--next {
  background: var(--sts-primary-dark);
}

/* ── ハブ: 月別アーカイブ一覧 ───────────────────────── */
.stsched-month-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stsched-month-list__item {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  flex-wrap: wrap;
  padding: .45rem 0;
  margin: 0;
}
.stsched-month-list__item + .stsched-month-list__item {
  border-top: 1px dashed rgba(0, 0, 0, .08);
}
.stsched-month-list__link {
  font-size: .92rem;
  font-weight: 700;
  color: var(--sts-primary-dark);
  text-decoration: none;
}
.stsched-month-list__link:hover { text-decoration: underline; }
.stsched-month-list__counts {
  display: inline-flex;
  gap: .35rem;
}
.stsched-month-list__count {
  font-size: .72rem;
  font-weight: 600;
  border-radius: 999px;
  padding: .05rem .5rem;
}
.stsched-month-list__count--start {
  color: var(--sts-start);
  background: var(--sts-start-soft);
  border: 1px solid var(--sts-start-border);
}
.stsched-month-list__count--end {
  color: var(--sts-end);
  background: var(--sts-end-soft);
  border: 1px solid var(--sts-end-border);
}

/* ── 月別ページ: 前後の月ナビ ───────────────────────── */
.stsched-adjacent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1rem;
}
.stsched-adjacent__link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--sts-primary-dark);
  background: #fff;
  border: 1px solid var(--sts-line);
  border-radius: 999px;
  padding: .35rem .9rem;
  text-decoration: none;
}
.stsched-adjacent__link:hover {
  background: var(--sts-primary-soft);
  border-color: var(--sts-primary-border);
}

/* ── レスポンシブ ───────────────────────────────────── */
@media (max-width: 640px) {
  .stsched-header__inner,
  .stsched-main__inner {
    padding-left: .8rem;
    padding-right: .8rem;
  }
  .anime-stsched-page .anime-section {
    padding: .8rem .8rem;
  }
  .stsched-title {
    font-size: 1.15rem;
  }
}
