/* コンテンツプロデューサーコース 受講者向けスタイル
   配色: 濃い青のグラデーション＋淡い水色の背景＋白いカード、強調に黄色（NEW） */

:root {
  --blue-50: #f3f7ff;
  --blue-100: #e6efff;
  --blue-200: #cfe0fb;
  --blue-300: #a9c6f6;
  --blue-500: #2f74ee;
  --blue-600: #1a5fe0;
  --blue-700: #1652d8;
  --blue-800: #1043b5;
  --navy: #14254a;
  --text: #1c2b4b;
  --muted: #5a6a88;
  --bg: #eef4fe;
  --surface: #ffffff;
  --border: #d6e4fb;
  --yellow: #ffcb3d;
  --yellow-text: #3d2e00;
  --gradient: linear-gradient(135deg, #2b7ff7 0%, #1a5fe0 50%, #1043b5 100%);
  --shadow-sm: 0 1px 2px rgba(20, 60, 140, 0.06), 0 2px 8px rgba(20, 60, 140, 0.06);
  --shadow-md: 0 4px 14px rgba(20, 70, 170, 0.12);
  --shadow-lg: 0 10px 30px rgba(20, 70, 170, 0.18);
  --radius: 14px;
  --radius-sm: 10px;
  --max-width: 1180px;
  --lecture-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
}

a {
  color: var(--blue-700);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 2px;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: 8px;
}

.skip-link:focus {
  left: 8px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.container-lecture {
  max-width: var(--lecture-width);
}

.page-main {
  padding-top: 28px;
  padding-bottom: 24px;
}

/* -------------------------------------------------------------
   上部バー
   ------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
}

.brand-name {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
  flex: 0 0 auto;
}

.brand-mark-lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 1.05rem;
}

.topbar-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.nav-pill::-webkit-details-marker {
  display: none;
}

.nav-pill:hover,
.nav-dropdown[open] > .nav-pill {
  border-color: var(--blue-600);
  color: var(--blue-700);
}

.nav-pill-strong {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}

.nav-pill-strong:hover {
  color: #fff;
  box-shadow: var(--shadow-md);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: min(300px, calc(100vw - 32px));
  max-height: 70vh;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.nav-dropdown-link {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.5;
  text-decoration: none;
}

.nav-dropdown-link:hover {
  background: var(--blue-100);
  color: var(--blue-700);
}

.nav-dropdown-count {
  color: var(--muted);
  font-size: 0.8rem;
}

/* -------------------------------------------------------------
   トップのヒーロー（検索）
   ------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient);
  color: #fff;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: 420px;
  height: 420px;
  right: -120px;
  top: -180px;
  background: rgba(255, 255, 255, 0.08);
}

.hero::after {
  width: 220px;
  height: 220px;
  left: -60px;
  bottom: -120px;
  border: 28px solid rgba(255, 255, 255, 0.07);
}

.hero-inner {
  position: relative;
  padding-top: 44px;
  padding-bottom: 40px;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 2px 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 4.5vw, 2.3rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.hero-lead {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  padding: 6px 8px 6px 16px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  color: var(--muted);
}

.hero-search .icon {
  width: 20px;
  height: 20px;
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}

.search-input:focus {
  outline: none;
}

.hero-search:focus-within {
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(255, 255, 255, 0.45);
}

.search-clear {
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.search-status {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.hero-stats li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  font-size: 0.82rem;
}

.hero-stats strong {
  font-size: 1.3rem;
  line-height: 1.2;
}

/* -------------------------------------------------------------
   講義タイプのタブ（すべて／本講義／ミニ講義）
   ヒーローの下端に少し重ねて、つながったタブとして見せる
   ------------------------------------------------------------- */

.hero-inner {
  padding-bottom: 64px;
}

.type-tabs-wrap {
  position: relative;
  z-index: 5;
  margin-top: -30px;
}

.type-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  background: #e3ebf8;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.type-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 10px 8px;
  border: 0;
  border-top: 4px solid transparent;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.type-tab:first-child {
  border-left: 0;
}

.type-tab:hover {
  background: rgba(255, 255, 255, 0.3);
  color: var(--blue-700);
}

.type-tab.is-active {
  background: var(--surface);
  border-top-color: var(--blue-700);
  color: var(--blue-800);
}

.type-tab-count {
  min-width: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(20, 37, 74, 0.08);
  font-size: 0.75rem;
  line-height: 1.8;
}

.type-tab.is-active .type-tab-count {
  background: var(--blue-700);
  color: #fff;
}

/* -------------------------------------------------------------
   カテゴリのチップ（スマホ・タブレット）とサイドバー（PC）
   ------------------------------------------------------------- */

.chip-nav {
  position: sticky;
  top: 60px;
  z-index: 20;
  background: rgba(238, 244, 254, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.chip-list {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip-list::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.chip.is-current {
  background: var(--blue-700);
  border-color: var(--blue-700);
  color: #fff;
}

.chip-count {
  font-size: 0.75rem;
  opacity: 0.7;
}

.index-layout {
  display: block;
}

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

.sidebar {
  display: none;
}

.sidebar-nav {
  position: sticky;
  top: 84px;
  padding: 16px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.sidebar-title {
  margin: 0 0 8px 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
  text-decoration: none;
}

.sidebar-link:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}

.sidebar-link.is-current {
  background: var(--blue-100);
  color: var(--blue-800);
  font-weight: 700;
}

.sidebar-count {
  color: var(--muted);
  font-size: 0.75rem;
}

/* -------------------------------------------------------------
   講義カード
   装飾を減らし、文字の階層（カテゴリと種類 → タイトル → 講師と公開日）で見せる
   ------------------------------------------------------------- */

.category-section {
  margin-bottom: 44px;
  scroll-margin-top: 120px;
}

.category-section[hidden],
.card[hidden] {
  display: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  margin: 0;
  color: var(--navy);
  font-size: 1.1rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.section-count {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  background: var(--surface);
  border: 1px solid #dde6f3;
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: #b7cdf3;
  box-shadow: 0 10px 24px -14px rgba(16, 67, 181, 0.45);
}

.card {
  overflow: hidden;
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* サムネイル（画像、または画像がないときのタイトル入りの仮サムネイル） */

.card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--blue-100);
}

.card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card-link:hover .card-thumb img {
  transform: scale(1.03);
}

.thumb-generated {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 40px 18px 16px;
}

.card-thumb-main .thumb-generated,
.card-thumb-none .thumb-generated {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.14) 0 30%, transparent 30.5%),
    linear-gradient(135deg, #1d5fe0 0%, #123f9e 100%);
  color: #fff;
}

.card-thumb-mini .thumb-generated {
  background:
    radial-gradient(circle at 100% 0%, rgba(22, 82, 216, 0.08) 0 30%, transparent 30.5%),
    linear-gradient(135deg, #f1f6ff 0%, #dce8fd 100%);
  color: var(--navy);
}

.thumb-generated-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.thumb-generated-sub {
  font-size: 0.72rem;
  opacity: 0.8;
}

/* 区分（本講義／ミニ講義）のタグ。値札の形（左がとがり、穴が開いている）で、どの画面でも同じ見た目にする */

.kind-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px 0 18px;
  border-radius: 0 4px 4px 0;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 9px 100%, 0 50%);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.kind-badge::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 8px;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}

.kind-badge-main {
  background: var(--yellow);
  color: var(--yellow-text);
}

.kind-badge-mini {
  background: var(--blue-700);
  color: #fff;
}

/* サムネイルの右上に置くタグ（clip-path で影が消えるため、外側の要素に影を付ける） */

.thumb-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  filter: drop-shadow(0 2px 4px rgba(10, 30, 80, 0.3));
}

.thumb-new {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fff;
  color: #b45309;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 2px 6px rgba(10, 30, 80, 0.15);
}

.card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 14px 18px 16px;
}

.card-category {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
}

.card-title {
  flex: 1 1 auto;
  margin-bottom: 12px;
  color: var(--navy);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.55;
  transition: color 0.2s ease;
}

.card-link:hover .card-title {
  color: var(--blue-700);
}

.card-snippet {
  display: block;
  margin: -4px 0 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--blue-50);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.card-snippet[hidden] {
  display: none;
}

.card-snippet mark {
  padding: 0 1px;
  background: #ffeaa0;
  color: var(--navy);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.card-instructor {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.instructor-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-date {
  flex: 0 0 auto;
  color: #8a96ad;
  font-variant-numeric: tabular-nums;
}

/* 講義ページの見出しまわりで使うバッジ */

.tag {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.7;
}

.new-badge {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  background: #fff3c4;
  color: #7a5800;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

/* 講師アイコン */

.instructor-avatar {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--blue-50);
  border: 1px solid var(--border);
}

.instructor-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-100);
  border-color: var(--blue-100);
  color: var(--blue-800);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.instructor-avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 1rem;
}

/* お知らせ（ヒーローの中、タブの上の帯） */

.announcement {
  display: flex;
  align-items: baseline;
  gap: 14px;
  max-width: 880px;
  margin: 24px auto 0;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 10px;
  color: var(--text);
  box-shadow: 0 6px 18px rgba(8, 30, 90, 0.18);
}

.announcement-label {
  flex: 0 0 auto;
  padding-right: 14px;
  border-right: 1px solid var(--border);
  color: var(--blue-700);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.announcement-body {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.7;
}

.announcement-body p,
.announcement-body ul,
.announcement-body ol {
  margin: 0;
}

.announcement-body ul,
.announcement-body ol {
  padding-left: 1.2em;
}

.announcement-body a {
  color: var(--blue-700);
}

.announcement-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .announcement {
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 12px 14px;
  }

  .announcement-label {
    padding-right: 0;
    border-right: 0;
  }

  .announcement-date {
    order: 2;
  }

  .announcement-body {
    order: 3;
    flex-basis: 100%;
  }
}

/* X のシェアボタン（動画の下） */

.share-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.share-title {
  margin: 0;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 700;
}

.share-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.share-x {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 18px;
  border-radius: 999px;
  background: #0f1419;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease;
}

.share-x:hover {
  background: #272c30;
}

.share-x .icon {
  width: 16px;
  height: 16px;
}

@media (max-width: 600px) {
  .share-box {
    flex-direction: column;
    align-items: stretch;
  }

  .share-x {
    justify-content: center;
  }
}

/* 資料・参考リンク */

.resource-box {
  margin-bottom: 24px;
  padding: 14px 20px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.resource-heading {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 0.9rem;
}

.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resource-list li + li {
  border-top: 1px solid var(--border);
}

.resource-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px;
  color: var(--blue-700);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.resource-link:hover .resource-label {
  text-decoration: underline;
}

.resource-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.resource-host {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

/* 関連講義（カードのスライダー） */

.related {
  display: grid;
  /* 横に長いスライダーで列が広がらないよう、列幅を親に合わせる */
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.related-block {
  min-width: 0;
  padding: 18px 20px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.related-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.related-heading {
  margin: 0;
  color: var(--navy);
  font-size: 0.95rem;
}

.related-more {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
}

.slider-buttons {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.related-more + .slider-buttons {
  margin-left: 4px;
}

.slider-buttons[hidden] {
  display: none;
}

.slider-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue-700);
  cursor: pointer;
}

.slider-button:hover:not(:disabled) {
  border-color: var(--blue-300);
  background: var(--blue-50);
}

.slider-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.related-track {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0 -4px;
  padding: 4px 4px 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.related-track::-webkit-scrollbar {
  display: none;
}

.card-slide {
  flex: 0 0 236px;
  scroll-snap-align: start;
}

.card-slide .card-title {
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .slider-buttons {
    display: none;
  }

  .card-slide {
    flex-basis: 76%;
  }
}

.empty-message {
  padding: 32px 20px;
  margin-bottom: 32px;
  background: var(--surface);
  border: 1px dashed var(--blue-300);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-message p {
  margin: 0;
}

.empty-message .empty-hint {
  margin-top: 4px;
  font-size: 0.85rem;
}

.empty-message[hidden] {
  display: none;
}

/* -------------------------------------------------------------
   講義詳細・固定ページ
   ------------------------------------------------------------- */

.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 22px 0 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumb a {
  color: var(--blue-700);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.lecture-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.lecture-title {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(1.35rem, 3.6vw, 1.85rem);
  line-height: 1.45;
}

.page-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.lecture-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  color: var(--text);
  font-size: 0.9rem;
}

.lecture-instructor {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.lecture-date {
  line-height: 1.4;
}

.lecture-layout {
  display: block;
}

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

.lecture-aside {
  display: none;
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin-bottom: 24px;
  background: #0b1a3a;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.notice {
  padding: 16px;
  background: var(--surface);
  border: 1px dashed var(--blue-300);
  border-radius: var(--radius);
  color: var(--muted);
}

/* 目次 */

.toc[hidden] {
  display: none;
}

.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc-list a {
  display: block;
  padding: 5px 10px;
  border-left: 2px solid var(--border);
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.5;
  text-decoration: none;
}

.toc-list a:hover {
  color: var(--blue-700);
  border-left-color: var(--blue-300);
}

.toc-list a.is-current {
  color: var(--blue-800);
  font-weight: 700;
  border-left-color: var(--blue-700);
  background: var(--blue-50);
}

.toc-list .toc-sub a {
  padding-left: 22px;
  font-size: 0.8rem;
}

.toc-inline {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.toc-inline summary {
  color: var(--navy);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}

.toc-inline .toc-list {
  margin-top: 10px;
}

.toc-side {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding: 16px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.toc-title {
  margin: 0 0 8px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* 本文 */

.lecture-body {
  padding: 28px clamp(18px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.lecture-body p {
  margin: 0 0 1.3em;
}

.lecture-body .body-heading-1,
.lecture-body .body-heading-2 {
  margin: 2.2em 0 0.9em;
  padding: 10px 14px;
  background: var(--blue-50);
  border-left: 5px solid var(--blue-700);
  border-radius: 0 8px 8px 0;
  color: var(--navy);
  font-size: 1.2rem;
  line-height: 1.5;
  scroll-margin-top: 80px;
}

.lecture-body .body-heading-3 {
  margin: 1.8em 0 0.6em;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--blue-100);
  color: var(--navy);
  font-size: 1.05rem;
  scroll-margin-top: 80px;
}

.lecture-body h4 {
  margin: 1.6em 0 0.5em;
  color: var(--navy);
  font-size: 1rem;
}

/* 見出しの余白より後に書いて、本文先頭の要素の上余白を消す */
.lecture-body > :first-child {
  margin-top: 0;
}

.lecture-body strong {
  color: var(--navy);
  background: linear-gradient(transparent 62%, rgba(255, 203, 61, 0.45) 62%);
}

.lecture-body ul,
.lecture-body ol {
  margin: 0 0 1.3em;
  padding-left: 1.5em;
}

.lecture-body li {
  margin-bottom: 0.35em;
}

.lecture-body li::marker {
  color: var(--blue-600);
}

.lecture-body blockquote,
.callout {
  margin: 0 0 1.3em;
  padding: 14px 18px;
  background: var(--blue-50);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue-300);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}

.lecture-body blockquote p:last-child,
.callout p:last-child {
  margin-bottom: 0;
}

.lecture-body code {
  padding: 1px 6px;
  background: var(--blue-50);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9em;
}

.lecture-body pre {
  padding: 14px 16px;
  background: #0f1f42;
  color: #e7eeff;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}

.lecture-body pre code {
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
}

.lecture-body hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px dashed var(--blue-300);
}

.table-wrap {
  margin-bottom: 1.3em;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.body-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
}

.body-table th,
.body-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.body-table th {
  background: var(--blue-100);
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

.body-table tr:last-child td {
  border-bottom: 0;
}

.body-table tbody tr:nth-child(even) td {
  background: var(--blue-50);
}

.back-link {
  margin: 28px 0 0;
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--blue-300);
  border-radius: 999px;
  color: var(--blue-700);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.button-secondary:hover {
  background: var(--blue-50);
}

.static-body ul {
  padding-left: 1.5em;
}

/* プレビュー・下書きの帯 */

.preview-banner {
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--yellow-text);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
}

/* -------------------------------------------------------------
   フッター
   ------------------------------------------------------------- */

.site-footer {
  margin-top: 56px;
  padding: 32px 0 24px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
}

.footer-brand {
  margin: 0 0 4px;
  color: #fff;
  font-weight: 700;
}

.footer-org {
  margin: 0;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.footer-menu a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-note {
  max-width: var(--max-width);
  margin: 20px auto 0;
  padding: 16px 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
}

/* -------------------------------------------------------------
   ログイン
   ------------------------------------------------------------- */

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.12) 0 180px, transparent 181px),
    radial-gradient(circle at 10% 95%, rgba(255, 255, 255, 0.08) 0 140px, transparent 141px),
    var(--gradient);
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 32px 28px;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(8, 30, 90, 0.35);
  text-align: center;
}

.login-title {
  margin: 14px 0 6px;
  color: var(--navy);
  font-size: 1.2rem;
  line-height: 1.5;
}

.login-lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.88rem;
}

.login-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: #fdecea;
  border: 1px solid #f5c2bd;
  border-radius: 10px;
  color: #9b1c14;
  font-size: 0.9rem;
}

.login-form {
  margin: 0;
  text-align: left;
}

.login-label {
  display: block;
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
}

.login-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--blue-50);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}

.login-input:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px var(--blue-100);
  background: var(--surface);
}

.login-gap {
  height: 14px;
}

.login-button {
  width: 100%;
  margin-top: 20px;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.login-button:hover {
  filter: brightness(1.06);
}

.login-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* -------------------------------------------------------------
   画面幅ごとの調整
   ------------------------------------------------------------- */

@media (min-width: 960px) {
  .chip-nav {
    display: none;
  }

  .index-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
  }

  .sidebar {
    display: block;
  }

  .category-section {
    scroll-margin-top: 80px;
  }

  .lecture-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 28px;
    align-items: start;
  }

  .lecture-aside {
    display: block;
  }

  .lecture-layout.no-toc {
    grid-template-columns: minmax(0, 1fr);
  }

  .lecture-layout.no-toc .lecture-aside {
    display: none;
  }

  .toc-inline {
    display: none;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
    line-height: 1.8;
  }

  .brand-name {
    font-size: 0.85rem;
  }

  .nav-pill {
    padding: 5px 11px;
    font-size: 0.8rem;
  }

  .hero-inner {
    padding-top: 30px;
    padding-bottom: 52px;
  }

  .type-tab {
    flex-direction: column;
    gap: 2px;
    min-height: 60px;
    font-size: 0.9rem;
  }

  .chip-nav {
    margin-top: 12px;
  }

  .hero-stats li {
    padding: 6px 12px;
  }

  .card-list {
    grid-template-columns: 1fr;
  }

  .new-section {
    padding: 14px;
  }

}

@media (max-width: 420px) {
  .brand-name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .card:hover {
    transition: none;
    transform: none;
  }
}
