/*!
 * デブサミライブラリー共通スタイル
 *   対応ページ: /devsumi/library (index / event / session / events / search)
 *
 * 設計方針:
 *   - DZ (DeveloperZine) 系統色に準拠: --dl-primary=#8FB91F, --dl-accent=#6E9218
 *   - solid ボタンの hover は opacity 0.85 (CZ本体の .c-btn 準拠)
 *   - text link 系の hover は --dl-primary への color 切替
 *   - transition は全て --dl-transition (0.15s ease) に統一
 *   - ボタン padding は 3 種類 (sm / md / lg) の変数で管理
 */

/* ====================================================================
   1) CSS Variables — 全スタイルはここを参照
   ==================================================================== */
:root {
  /* Brand colors (--dl-primary / --dl-accent) は devsumi_base.css の :root で定義 (全 /devsumi ページ共通、ここでは再定義しない) */
  --dl-link: #008ccf; /* テキストリンク hover / 補助情報リンク */

  /* Neutrals */
  --dl-text: #333;
  --dl-text-muted: #666;
  --dl-text-lighter: #888;
  --dl-text-lightest: #aaa;

  --dl-bg: #fff;
  --dl-bg-soft: #fafafa;
  --dl-bg-cool: #f8f9fa;
  --dl-bg-pale-green: #f8faf5; /* サイドバーブロック */
  --dl-bg-session: #f7f7f7;

  --dl-border: #e5e5e5;
  --dl-border-soft: #eee;
  --dl-border-strong: #ccc;
  --dl-border-dashed: #d5dbd7;

  /* Radii */
  --dl-radius-sm: 3px; /* ボタン・入力・小バッジ */
  --dl-radius: 4px; /* カード・パネル */
  --dl-radius-pill: 12px; /* ピル (theme/tag) */
  --dl-radius-pill-lg: 20px; /* 年ジャンプなど大きめピル */

  /* Motion */
  --dl-transition: 0.15s ease;

  /* Button paddings (3種) */
  --dl-pad-btn-sm: 8px 16px;
  --dl-pad-btn: 10px 24px;
  --dl-pad-btn-lg: 12px 36px;

  --dl-hover-opacity: 0.85;

  /* カード浮き上がり hover 共通シャドウ — devsumi_base.css :root にも同じ変数を定義 */
}

/* ====================================================================
   2) Container & Layout
   ==================================================================== */

/* UX改善#1: 本文の幅を最大1200px */
.devsumi-library {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* UX改善#2: ページ見出し */
.devsumi-library h1 {
  margin-bottom: 20px;
  font-size: 28px;
  line-height: 1.4;
}
.devsumi-library h2 {
  margin: 30px 0 15px;
  padding-top: 0;
  font-size: 26px;
  line-height: 1.4;
  background: none;
} /* devsumi_base.css の h2 アイコン (h2.png) はライブラリーでは使わない */
.devsumi-library h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 8px auto 0;
  background: var(--dl-primary);
}
.devsumi-library h2 a {
  color: inherit;
  text-decoration: none;
}
.devsumi-library h2 a:hover {
  text-decoration: underline;
}
@media (max-width: 767.98px) {
  .devsumi-library h2 {
    margin: 12px 0 10px;
    font-size: 22px;
  }
}
/* メイン先頭セクションの h2 は上マージンなし */
.devsumi-library section:first-of-type h2 {
  margin-top: 0;
}
/* h3 共通: 薄グレー背景 + 左に緑の線 (年見出し / セッション詳細の各ブロック / 関連リンクの種別) */
.devsumi-library h3 {
  margin: 0 0 14px;
  padding: 8px 12px;
  font-size: 18px;
  font-weight: bold;
  line-height: 1.4;
  color: var(--dl-text);
  background: var(--dl-bg-session); /* .event-header と同じ薄グレー */
  border-left: 4px solid var(--dl-primary);
}

/* パンくず */
.devsumi-library .breadcrumb-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 20px;
  margin-bottom: 14px;
  font-size: 15px;
  color: var(--dl-text-muted);
}
/* 前の階層 (リンク): ノーマル + 少し薄い文字 */
.devsumi-library .breadcrumb-nav a {
  font-weight: normal;
  color: var(--dl-text-muted);
  text-decoration: none;
}
/* 現在のページはパンくずに出さない (直下の h1 が担う)。末尾が span になる場合の見た目だけ残す */
.devsumi-library .breadcrumb-nav > span {
  font-weight: bold;
  color: var(--dl-text);
}
/* 区切りは Font Awesome 5 (all.css) の fa-chevron-right */
.devsumi-library .breadcrumb-nav .bc-sep {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--dl-text-lightest);
}
.devsumi-library .breadcrumb-nav a:hover {
  text-decoration: underline;
}

/* UX改善#5-7: 2カラム (左サイドバー + メイン) */
.devsumi-library.dl-with-sidebar {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding-top: 20px;
}
.dl-sidebar {
  flex: 0 0 260px;
  padding-top: 20px;
}
.dl-main {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 20px;
}
/* dl-main の padding で先頭を揃えているため、breadcrumb 側 margin-top はゼロ */
.devsumi-library.dl-with-sidebar .breadcrumb-nav {
  margin-top: 0;
}

/* PC: サイドバーは sticky 追従 (nav 直下)。scrollbar は視覚的に非表示 */
@media (min-width: 901px) {
  .dl-with-sidebar > .dl-sidebar {
    position: sticky;
    top: calc(var(--nav-h, 66px) + 20px);
    align-self: flex-start;
    max-height: calc(100vh - var(--nav-h, 66px) - 32px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .dl-with-sidebar > .dl-sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  .dl-filter-toggle,
  .dl-sidebar-close {
    display: none;
  }
}

/* SP: サイドバーをモーダル化 (絞込ボタンで開閉) */
@media (max-width: 900px) {
  .devsumi-library.dl-with-sidebar {
    display: block;
  }
  /* 1カラム時は wrapper の padding-top (20px) だけにして、パンくず位置を session 詳細 (margin-top 20px) と揃える */
  .dl-main {
    padding-top: 0;
  }
  .dl-sidebar {
    display: none;
  }
  .dl-sidebar.is-open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    padding: 60px 16px 20px;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
  }
  .dl-sidebar.is-open .dl-side-block {
    background: var(--dl-bg);
  }
  .dl-sidebar-close {
    display: none;
  }
  .dl-sidebar.is-open .dl-sidebar-close {
    display: inline-flex;
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 1051;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--dl-bg);
    border: 1px solid var(--dl-border-strong);
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
  }
  /* SP用 絞込トグルボタン: 画面下に幅100%で固定 */
  .dl-filter-toggle {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040; /* サイドバーモーダル (1050) より下 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); /* iPhone のホームバー分 */
    font-size: 15px;
    font-weight: bold;
    color: var(--dl-text);
    background: var(
      --dl-bg-pale-green
    ); /* サイドバー (.dl-side-block) と同じ色 */
    border: 0;
    border-top: 1px solid var(--dl-border);
    border-radius: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
  }
  .dl-filter-toggle:hover {
    background: #eef3e6; /* pale-green を少し濃く */
  }
  body:has(.dl-filter-toggle) {
    padding-bottom: calc(52px + env(safe-area-inset-bottom));
  }
  body:has(.dl-filter-toggle) #page-top {
    bottom: calc(68px + env(safe-area-inset-bottom));
  }
}

/* ====================================================================
   3) Sidebar (左カラム: 検索フォーム + navigation)
   ==================================================================== */

/* 単一 block、内部を section で仕切り */
.dl-side-block {
  padding: 14px 16px;
  background: var(--dl-bg-pale-green);
  border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius);
}
.dl-side-section {
  padding: 12px 0;
  border-bottom: 1px dashed var(--dl-border-dashed);
}
.dl-side-section:first-child {
  padding-top: 0;
}
.dl-side-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 8px;
}
.dl-side-heading {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: bold;
  color: var(--dl-text);
}

/* キーワード検索 input */
.dl-side-searchbox {
  display: block;
}
.dl-side-searchbox input[type="search"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 15px;
  border: 1px solid var(--dl-border-strong);
  border-radius: var(--dl-radius-sm);
  background: var(--dl-bg);
  outline: none;
  box-sizing: border-box;
}
.dl-side-searchbox input[type="search"]:focus {
  border-color: var(--dl-primary);
}
/* select (イベントから探す) */
.dl-side-select {
  width: 100%;
  padding: 8px 10px;
  font-size: 15px;
  border: 1px solid var(--dl-border-strong);
  border-radius: var(--dl-radius-sm);
  background: var(--dl-bg);
  cursor: pointer;
}
/* チェックボックス列 */
.dl-side-check {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--dl-text);
  cursor: pointer;
  line-height: 1.4;
}
.dl-side-check input {
  margin-right: 6px;
  vertical-align: -1px;
}
/* 統合検索ボタン */
.dl-side-submit {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: var(--dl-pad-btn-sm);
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  background: var(--dl-primary);
  border: 0;
  border-radius: var(--dl-radius-sm);
  cursor: pointer;
  transition: opacity var(--dl-transition);
}
.dl-side-submit:hover {
  opacity: var(--dl-hover-opacity);
  color: #fff;
}

/* pill 型テーマ/タグ (checkbox で複数選択、選択で緑塗り) */
.dl-side-piles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.dl-side-piles-check .dl-pile-label {
  display: inline-block;
  padding: 3px 10px;
  font-size: 14px;
  color: #444;
  background: var(--dl-bg);
  border: 1px solid var(--dl-border-dashed);
  border-radius: var(--dl-radius-pill);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--dl-transition);
  user-select: none;
  margin: 0;
}
.dl-side-piles-check .dl-pile-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.dl-side-piles-check .dl-pile-label:hover {
  border-color: var(--dl-primary);
  color: var(--dl-primary);
}
.dl-side-piles-check .dl-pile-label.is-checked {
  background: var(--dl-primary);
  color: #fff;
  border-color: var(--dl-primary);
}
.dl-side-piles-check .dl-pile-label.is-checked:hover {
  opacity: var(--dl-hover-opacity);
}

/* ====================================================================
   4) Year navigation (events ページ)
   ==================================================================== */

.dl-year-nav .dl-year-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dl-year-nav .dl-year-list li {
  margin: 0;
}
.dl-year-nav .dl-year-list a {
  display: block;
  padding: 6px 0;
  font-size: 16px;
  color: var(--dl-text);
  text-decoration: none;
  border-bottom: 1px solid var(--dl-border-soft);
  transition: color var(--dl-transition);
}
.dl-year-nav .dl-year-list a:hover {
  color: var(--dl-primary);
}
.dl-year-nav .dl-year-list a.is-active {
  color: var(--dl-primary);
  font-weight: bold;
  border-bottom-color: var(--dl-primary);
}

/* SP: 年ジャンプ横スクロール (sticky で画面上部に張り付き) */
.dl-year-scroll {
  display: none;
}
@media (max-width: 900px) {
  /* タブ型: 枠なしテキスト + 選択中だけ緑の下線 */
  .dl-year-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 3px;
    margin: 0 -15px 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: sticky;
    top: var(--nav-h, 66px);
    z-index: 1020;
    background: var(--dl-bg);
    box-shadow: inset 0 -1px 0 var(--dl-border);
  }
  .dl-year-scroll::-webkit-scrollbar {
    display: none;
  }
  .dl-year-scroll a {
    flex: 0 0 auto;
    padding: 12px 12px 9px;
    font-size: 15px;
    font-weight: normal;
    color: var(--dl-text-muted);
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    text-decoration: none;
  }
  .dl-year-scroll a.is-active {
    font-weight: bold;
    color: var(--dl-text);
    border-bottom-color: var(--dl-primary);
  }
  /* :hover は hover 可能デバイス限定 (SP sticky hover 対策) */
  @media (hover: hover) {
    .dl-year-scroll a:hover {
      color: var(--dl-text);
      border-bottom-color: var(--dl-border-strong);
    }
    .dl-year-scroll a.is-active:hover {
      border-bottom-color: var(--dl-primary);
    }
  }
}

/* 年セクション */
.year-section {
  scroll-margin-top: calc(var(--nav-h, 66px) + 20px);
}

/* 直近年以外: 文字だけ 2列 */
.events-text-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}
.events-text-list li {
  margin: 0;
  display: flex; /* a を行の高さいっぱいに伸ばし、罫線を下に揃える */
}
.events-text-list a {
  flex: 1 1 auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 0;
  color: var(--dl-text);
  text-decoration: none;
  border-bottom: 1px solid var(--dl-border);
  font-size: 14px;
}
.events-text-list a:hover {
  color: var(--dl-primary);
}
.events-text-list .event-name {
  flex: 1 1 auto;
  min-width: 0;
}
.events-text-list .event-meta {
  flex: 0 0 auto;
  color: var(--dl-text-lighter);
  font-size: 12px;
}
.events-text-list .event-meta small {
  color: var(--dl-text-lightest);
  margin-left: 4px;
}
@media (max-width: 700px) {
  .events-text-list {
    grid-template-columns: 1fr;
  }
}
.events-lead {
  color: var(--dl-text-muted);
  margin-bottom: 20px;
  font-size: 16px;
}
/* 2012 年以前 (特設ページ) の注記: 最初の特設ページ年の見出し直前。本文より一段小さく */
.legacy-note {
  color: var(--dl-text-muted);
  font-size: 13px;
  margin: 0 0 10px;
}

/* ====================================================================
   5) Library ヒーロー (index)
   ==================================================================== */
.library-hero {
  position: relative;
  height: 320px;
  background-image: url("/static/devsumi/images/library_hero.jpg");   /* Developers Summit 2025 会場写真 (3000x2000) */
  background-size: cover;
  /* 縦位置 70%: PC の横長帯では上端にスクリーンの下辺を少し残しつつ登壇者と客席を見せ、タイトルがスクリーンの白地に重ならないようにする
     (数字を小さくすると上寄り = スクリーンが多く入る。64% を切るとタイトルに近づく)。
     SP は帯が写真の比率に近いのでほぼ全体 (上にスクリーン、下に客席) が入る */
  background-position: center 70%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.library-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.library-hero h1 {
  position: relative;
  margin: 0;
  color: #fff;
  font-size: 36px;
  font-weight: bold;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
@media (max-width: 700px) {
  .library-hero {
    height: 220px;
  }
  .library-hero h1 {
    font-size: 24px;
  }
}

/* ====================================================================
   6) Session card (index / event / search 共通)
   ==================================================================== */
.session-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
@media (max-width: 900px) {
  .session-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .session-grid {
    grid-template-columns: 1fr;
  }
}

.session-card {
  border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius);
  background: var(--dl-bg);
  transition: box-shadow var(--dl-transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.session-card:hover {
  box-shadow: var(--dl-shadow-hover);
}
.session-card a {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.session-card-image {
  aspect-ratio: 16 / 9;
  background: #f0f0f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.session-card-image img {
  object-fit: cover;
  display: block;
  width: 100%;
  height: 100%;
}
/* 画像あり: fallback は隠す。404 (library.js が .is-broken 付与) で入れ替える */
.session-card-image img + .session-card-image-fallback {
  display: none;
}
.session-card-image.is-broken img {
  display: none;
}
.session-card-image.is-broken .session-card-image-fallback {
  display: flex;
}
/* 画像未設定時: 無地SVG背景 + タイトルオーバーレイ (白ふち) */
.session-card-image-fallback {
  width: 100%;
  height: 100%;
  padding: 10px 14px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #000;
  font-weight: bold;
  font-size: 15px;
  line-height: 1.4;
  background: url("/static/devsumi/images/session_default_bg.webp") center/cover
    no-repeat;
  overflow: hidden;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 -1px 0 #fff,
    0 1px 0 #fff,
    -1px 0 0 #fff,
    1px 0 0 #fff;
}
.session-card-image-fallback span {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.session-card > a > .date,
.session-card > a > .title,
.session-card > a > .tags,
.session-card > a > .speaker,
.session-card > a > .archive-badges {
  padding-left: 12px;
  padding-right: 12px;
}
.session-card > a > .date {
  margin: 8px;
}
.session-card > a > .archive-badges {
  padding-bottom: 12px;
}
.session-card .date {
  color: #fff;
  font-size: 14px;
  margin-bottom: 4px;
}
.session-card .title {
  font-size: 18px;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.session-card .tags {
  margin-bottom: 8px;
}
.session-card .tags span {
  display: inline-block;
  padding: 5px 12px 4px;
  margin: 0 4px 4px 0;
  font-size: 13px;
  line-height: 1;
  color: #fff;
  background: var(--tag-color, var(--dl-text-lighter));
  border-radius: var(--dl-radius-sm);
} /* --tag-color は twig がタグ個別色を style 属性で渡す */
.session-card .speaker {
  color: #555;
  font-size: 15px;
  line-height: 1.5;
}
.session-card .speaker small {
  color: var(--dl-text-lighter);
}
/* archive-badges を下端へ押し出す */
.session-card .archive-badges {
  margin-top: auto;
  padding-top: 12px;
}
.archive-badges span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 1px 8px 0;
  margin-right: 3px;
  font-size: 13px;
  line-height: 1;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: var(--dl-radius-sm);
}
.archive-badges .ab-material,
.archive-badges .ab-video,
.archive-badges .ab-article {
  color: var(--dl-text-muted);
}
/* アイコン: Font Awesome 5 (all.css) */
.archive-badges .ab-material::before,
.archive-badges .ab-video::before,
.archive-badges .ab-article::before {
  display: inline-block;
  margin-right: 4px;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  line-height: 1;
}
.archive-badges .ab-material::before {
  content: "\f15c"; /* fa-file-alt（資料） */
}
.archive-badges .ab-video::before {
  content: "\f03d"; /* fa-video（動画） */
}
.archive-badges .ab-article::before {
  content: "\f1ea"; /* fa-newspaper（記事） */
}

/* ====================================================================
   7) 注目セッション カルーセル (index)
   ==================================================================== */
.carousel-wrapper {
  position: relative;
}
.carousel-viewport {
  overflow: hidden;
  margin: 0 auto;
}
.session-carousel {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.session-carousel::-webkit-scrollbar {
  display: none;
}
.session-carousel .session-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
}

.carousel-nav {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #333;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-size: 0; /* ‹ › の文字は隠して ::before のシェブロンで描画 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    background var(--dl-transition),
    box-shadow var(--dl-transition),
    color var(--dl-transition);
}
.carousel-nav::before {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.carousel-nav.prev::before {
  transform: translateX(1px) rotate(-135deg);
}
.carousel-nav.next::before {
  transform: translateX(-1px) rotate(45deg);
}
.carousel-nav:hover {
  background: #f7f7f7;
  color: var(--dl-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.carousel-nav.prev {
  left: -5px;
}
.carousel-nav.next {
  right: -5px;
}
.carousel-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background var(--dl-transition);
}
.carousel-dots button.is-active {
  background: var(--dl-primary);
}
.carousel-dots button:hover {
  background: #999;
}
/* カードが表示枠に収まるとき (library.js が .is-static 付与) はナビとドットを出さない */
.carousel-wrapper.is-static .carousel-nav,
.carousel-wrapper.is-static .carousel-dots {
  display: none;
}

@media (max-width: 767px) {
  .carousel-nav {
    display: none !important;
  }
  .carousel-viewport {
    max-width: 100% !important;
    overflow: hidden;
  }
  .session-carousel .session-card {
    scroll-snap-align: start;
  }
}

/* ====================================================================
   8) Event sections (index) — devboost 見出し / dl-btn-outline / key visual
   ==================================================================== */
/* イベントセクション全体の縦余白 (base section の 2rem 0 を上書き) */
.event-section {
  padding: 0 0 4rem;
}
.event-section .no-sessions {
  color: var(--dl-text-lighter);
}
/* (旧) devboost イベントの h2 だけ円形アイコン (bt-circle.png) に差し替えていたが、ライブラリーの h2 はアイコン無しに統一 (2026-10-30) */
/* 一覧遷移ボタン (白地 + 緑枠、hover で緑塗り)。index のセクション下 + event ページの「特設サイトを見る」で共用 */
.devsumi-library .dl-btn-outline {
  margin-top: 20px;
  text-align: center;
}
.devsumi-library .dl-btn-outline a {
  display: block;
  box-sizing: border-box;
  padding: var(--dl-pad-btn);
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  color: var(--dl-accent);
  background: #fff;
  border: 1px solid var(--dl-primary);
  border-radius: var(--dl-radius-sm);
  text-decoration: none;
  transition:
    color var(--dl-transition),
    background-color var(--dl-transition);
}
.devsumi-library .dl-btn-outline a:hover {
  color: #fff;
  background: var(--dl-primary);
  text-decoration: none;
}

/* イベントキービジュアル 3列並び */
.key-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px; /* .session-grid と揃える */
}
@media (max-width: 900px) {
  .key-visual-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .key-visual-grid {
    grid-template-columns: 1fr;
  }
}
.key-visual-item {
  display: block;
  border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius);
  overflow: hidden;
  transition: box-shadow var(--dl-transition);
  background: var(--dl-bg);
  color: var(--dl-text);
  text-decoration: none;
}
.key-visual-item:hover {
  box-shadow: var(--dl-shadow-hover);
  color: var(--dl-text);
  text-decoration: none;
}
.key-visual-item img {
  width: 100%;
  height: auto;
  display: block;
}
.key-visual-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: var(--dl-text-muted);
  padding: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: bold;
}
/* 画像下の文字エリア (イベント名 + 開催日・会場) */
.key-visual-body {
  padding: 10px 12px 12px;
}
.key-visual-name {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.4;
  margin-bottom: 4px;
}
.key-visual-meta {
  font-size: 13px;
  color: var(--dl-text-muted);
}
.key-visual-meta span + span::before {
  content: "｜";
  color: var(--dl-text-lightest);
}

/* ====================================================================
   9) Events archive list (events ページ)
   ==================================================================== */
.events-archive-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.event-archive-item {
  display: flex;
  gap: 16px;
  background: var(--dl-bg);
  border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius);
  overflow: hidden; /* サムネを角丸に沿わせる */
  text-decoration: none;
  color: inherit;
  transition:
    box-shadow var(--dl-transition),
    border-color var(--dl-transition);
}
.event-archive-item:hover {
  box-shadow: var(--dl-shadow-hover);
  border-color: var(--dl-border);
  text-decoration: none;
  color: inherit;
}
.event-archive-thumb {
  flex: 0 0 240px;
}
.event-archive-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630; /* OGP 比率。高さ固定だとバナーの文字が上下で切れるため */
  object-fit: cover;
  background: #f0f0f0;
}
.event-archive-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.event-archive-body .conference-name {
  color: var(--dl-text-lighter);
  font-size: 12px;
  margin-bottom: 4px;
}
.event-archive-body .event-name {
  font-weight: bold;
  font-size: 16px;
  color: #222;
  line-height: 1.4;
  margin-bottom: 6px;
}
.event-archive-item:hover .event-name {
  color: var(--dl-link);
}
.event-archive-body .event-meta {
  color: var(--dl-text-muted);
  font-size: 13px;
}
.event-archive-body .event-meta span {
  margin-right: 15px;
}
@media (max-width: 500px) {
  .event-archive-item {
    gap: 12px;
    padding: 12px;
  }
  .event-archive-thumb {
    flex: 0 0 120px;
  }
  .event-archive-body .event-name {
    font-size: 14px;
  }
  .event-archive-body .event-meta {
    font-size: 12px;
  }
  .event-archive-body .event-meta span {
    margin-right: 10px;
    display: inline-block;
  }
}

/* ====================================================================
   10) Event page (event.twig)
   ==================================================================== */
.event-header {
  padding: 20px;
  margin-bottom: 25px;
  background: var(--dl-bg-session); /* 薄グレー */
  border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius);
  text-align: center;
}
/* ページ概要 (ヘッダー内の補足 1 行) */
.event-header .event-lead {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--dl-text-muted);
}
.event-header .conference-name {
  color: var(
    --dl-text-muted
  ); /* ヘッダー内の補足テキストは --dl-text-muted に統一 */
  font-size: 13px;
  margin-bottom: 4px;
}
.event-header h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.4;
}
.event-header .event-meta {
  color: var(--dl-text-muted);
  font-size: 13px;
  margin-bottom: 8px;
}
.event-header .event-meta > span {
  margin: 0 8px;
  white-space: nowrap;
}
/* 開催日 / 会場 / セッション数のアイコン (絵文字から Font Awesome へ。色は文字と同じ muted) */
.event-header .event-meta .meta-icon {
  margin-right: 4px;
  font-size: 12px;
  opacity: 0.85;
}
/* 「特設サイトを見る」(.dl-btn-outline): 上余白だけヘッダー用に詰める */
.event-header .dl-btn-outline {
  margin-top: 12px;
}
/* 概要 expand/collapse */
.event-header .event-desc-wrap {
  position: relative;
  margin-top: 14px;
  text-align: left;
}
.event-header .event-desc {
  color: #000;
  font-size: 0.9rem;
  line-height: 1.7;
  overflow: hidden;
}
.event-header .event-desc-wrap.is-collapsed .event-desc {
  max-height: 4.8em;
}
.event-header .event-desc-wrap.is-collapsed .event-desc::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3.3em;
  height: 1.5em;
  background: linear-gradient(
    180deg,
    rgba(247, 247, 247, 0),
    rgba(247, 247, 247, 1)
  ); /* --dl-bg-session (#f7f7f7) に合わせたフェード */
  pointer-events: none;
}
.event-header .event-desc-toggle {
  display: block;
  margin: 8px auto 0; /* 「続きを読む」「閉じる」ともセンター */
  padding: 4px 14px;
  font-size: 12px;
  color: var(--dl-text-muted);
  background: transparent;
  border: 1px solid var(--dl-border-strong);
  border-radius: var(--dl-radius-sm);
  cursor: pointer;
}
.event-header .event-desc-toggle:hover {
  background: #eef;
  color: var(--dl-link);
  border-color: var(--dl-link);
}
.event-header .event-desc-toggle[hidden] {
  display: none;
} /* 概要が収まっているとき library.js が hidden を付与 (display:block より優先) */
.event-header .event-desc-toggle i {
  margin-left: 4px;
  font-size: 10px;
}
.event-header .event-desc-wrap .toggle-less,
.event-header .event-desc-wrap.is-collapsed .toggle-more {
  display: inline;
}
.event-header .event-desc-wrap.is-collapsed .toggle-less,
.event-header .event-desc-wrap .toggle-more {
  display: none;
}

/* ページ概要リード文 */
.page-lead {
  margin: 0 0 20px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--dl-text);
  text-align: center;
  background: #f2f9fc;
  border: 1px solid #cfe6f2;
  border-radius: var(--dl-radius);
}

/* view toggle (セッション一覧 / タイムテーブル) */
.view-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--dl-border);
}
.view-toggle button {
  padding: 10px 20px;
  font-size: 14px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px; /* 親の border-bottom に下線を重ねる */
  cursor: pointer;
}
.view-toggle button.is-active {
  color: var(--dl-primary);
  border-bottom-color: var(--dl-primary);
  font-weight: bold;
}
.view-toggle button:hover {
  color: var(--dl-primary);
}
.view-section {
  display: none;
}
.view-section.is-active {
  display: block;
}

/* ─── タイムテーブル ─── */
/* 読み込み中 / 失敗 (タブを開いたときに library.js がフラグメントを取り込む) */
.tt-loading {
  padding: 24px 0;
  text-align: center;
  color: #666;
  font-size: 14px;
}
.tt-loading .tt-retry {
  margin-left: 8px;
  padding: 2px 10px;
  border: 1px solid #999;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.timetable {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
/* 日付見出し: 見た目は .devsumi-library h2 共通 (中央 + 緑の下線)。縦余白は .timetable の gap があるので詰める */
.timetable > h2 {
  margin: 12px 0 0;
}
/* 時間は 1 行 (13:00〜13:40) でカードの上に置き、カードは全幅を使う */
.timetable .tt-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px 0;
}
.timetable .tt-time {
  font-size: 16px;
  font-weight: bold;
  color: var(--dl-accent);
  line-height: 1.4;
}
/* 時計アイコン: Font Awesome 5 (all.css) の far fa-clock */
.timetable .tt-time .fa-clock {
  margin-right: 2px;
}
.timetable .tt-sessions {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.timetable .tt-session {
  border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius);
  padding: 12px;
  background: var(--dl-bg);
  transition: box-shadow var(--dl-transition);
}
.timetable .tt-session:hover {
  box-shadow: var(--dl-shadow-hover);
}
.timetable .tt-session a {
  color: inherit;
  text-decoration: none;
  display: block;
}
.timetable .tt-session .tt-no {
  font-size: 14px;
  color: var(--dl-text-lighter);
  margin-bottom: 4px;
}
.timetable .tt-session .tt-title {
  font-weight: bold;
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 8px;
}
.timetable .tt-session .tt-tags {
  margin-bottom: 8px;
}
.timetable .tt-session .tt-tags span {
  display: inline-block;
  padding: 5px 12px 4px;
  margin: 0 4px 4px 0;
  font-size: 13px;
  line-height: 1;
  color: #fff;
  background: var(--tag-color, var(--dl-text-muted));
  border-radius: var(--dl-radius-sm);
}
.timetable .tt-session .tt-badges {
  margin-top: 6px;
}
.timetable .tt-session .tt-speaker {
  color: #555;
  font-size: 15px;
  line-height: 1.5;
}

/* 関連リンク (event 詳細下部)。セッションページの「外部リンク」(ul.ext-links-list) も同じ箇条書き */
.ext-links-a {
  margin-top: 2rem;
  background: var(--dl-bg);
}
.ext-links-a-block {
  margin-bottom: 24px;
}
.ext-links-a-block:last-child {
  margin-bottom: 0;
}
ul.ext-links-list,
.ext-links-a ul {
  list-style: disc;
  margin: 0;
  padding-left: 24px;
  font-size: 15px;
  line-height: 1.7;
}
ul.ext-links-list li,
.ext-links-a ul li {
  padding: 3px 0;
}
/* 本文のテキストリンクは hover で下線 (base の a:hover { text-decoration: none } を上書き) */
ul.ext-links-list a:hover,
.ext-links-a ul a:hover {
  text-decoration: underline;
}
.ext-links-a small {
  color: var(--dl-text-lighter);
  margin-left: 6px;
  font-size: 13px;
}

/* ====================================================================
   11) Session detail (session.twig)
   ==================================================================== */
/* ワンカラムなので 1200px だと本文の1行が長すぎる → パンくず以外を 960px に絞る */
.devsumi-library.session-detail > :not(.breadcrumb-nav) {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.session-header {
  padding: 0 0 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--dl-border);
}
.session-header .meta-top {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.session-header .badge-no {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--dl-primary);
  background: #fff;
  color: var(--dl-accent);
  font-size: 14px;
  font-weight: bold;
  line-height: 1.4;
  text-align: center;
  border-radius: 999px;
}
.session-header h1 {
  margin: 0 0 16px;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--dl-text);
}
.session-header h1 .session-title-speakers {
  display: block;
  margin-top: 10px;
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 0;
  color: var(--dl-text-muted);
}
@media (max-width: 767px) {
  .session-header h1 {
    font-size: 22px;
  }
}
.session-header .tag-list a {
  display: inline-block;
  padding: 5px 12px 4px;
  margin: 0 4px 4px 0;
  font-size: 13px;
  line-height: 1;
  color: #fff;
  background: var(--tag-color, var(--dl-text-muted));
  border-radius: var(--dl-radius-sm);
  text-decoration: none;
  transition: opacity var(--dl-transition);
}
.session-header .tag-list a:hover {
  opacity: 0.8;
  color: #fff;
  text-decoration: none;
}

/* セッション詳細の各ブロック (講演資料 / 動画 / 概要 等) は素の <section>。
   箱なし、縦余白は devsumi_base.css の section { padding: 2rem 0 } に任せる */

.speaker-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--dl-border-soft);
}
.speaker-item:last-child {
  border-bottom: none;
}
.speaker-item .avatar {
  flex: 0 0 80px;
}
.speaker-item .avatar img {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  background: #f0f0f0;
}
.speaker-item .info {
  flex: 1;
  min-width: 0;
}
.speaker-item .name {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 4px;
}
.speaker-item .name .kana {
  color: var(--dl-text-lighter);
  font-weight: normal;
}
.speaker-item .affiliation {
  color: var(--dl-text-muted);
  font-size: 14px;
  margin-bottom: 6px;
}
.speaker-item .profile {
  color: #444;
  font-size: 14px;
  line-height: 1.6;
}
/* SNS 行 (プロフィール末尾) */
.speaker-item .profile .sns {
  margin: 8px 0 0;
  font-size: 26px;
}
.speaker-item .profile .sns a {
  color: #555;
  margin-right: 10px;
  text-decoration: none;
}
.speaker-item .profile .sns a:hover {
  color: var(--dl-primary);
}
@media (max-width: 500px) {
  .speaker-item {
    gap: 12px;
  }
  .speaker-item .avatar {
    flex: 0 0 60px;
  }
  .speaker-item .avatar img {
    width: 60px;
    height: 60px;
  }
}

/* 資料/動画セクション (中央寄せ) */
.material-item,
.video-item {
  padding: 30px 0;
  border-bottom: 1px solid var(--dl-border-soft);
  text-align: center;
}
.material-item:last-child,
.video-item:last-child {
  border-bottom: none;
}
.material-item .title,
.video-item .title,
.material-title,
.video-title {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--dl-text);
}
.embed-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 10px auto;
  background: #000;
}
.embed-wrap iframe,
.embed-wrap embed,
.embed-wrap object,
.embed-wrap video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
/* 会員限定動画の設置タグ <div class="embed-responsive member-video videowrapper"> (intra が生成)。
   Bootstrap 4 の .embed-responsive は比率クラス無しだと高さ 0 で、.embed-responsive video は position:absolute; height:100% になるため
   動画の高さも 0 になり、.embed-wrap の黒い 16:9 枠だけが見える。.member-video を .embed-wrap いっぱいに広げて動画をその中に敷く */
.embed-wrap .member-video {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
}
.embed-wrap .member-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
}
.embed-wrap .member-video .member-video-error {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  text-align: center;
  color: #fff;
  margin: 0;
}

/* セッション詳細下部: 戻るリンク */
.session-back {
  text-align: center;
  margin: 40px 0 20px;
  font-size: 15px;
  font-weight: bold;
}
.session-back a {
  color: var(--dl-text);
  text-decoration: none;
}
.session-back a:hover {
  text-decoration: underline;
}
.session-back a i {
  margin-right: 6px;
  font-size: 12px;
}

/* DL ボタン (公開/会員限定) */
.dl-button {
  display: block;
  max-width: 720px;
  padding: var(--dl-pad-btn);
  margin: 10px auto;
  color: #fff;
  background: var(--dl-primary);
  border-radius: var(--dl-radius-sm);
  text-decoration: none;
  font-size: 15px;
  font-weight: bold;
  transition: opacity var(--dl-transition);
}
.dl-button:hover {
  opacity: var(--dl-hover-opacity);
  color: #fff;
  text-decoration: none;
}
.dl-button::before {
  content: "\f019";
  display: inline-block;
  margin-right: 8px;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}
/* 1ページ目プレビュー */
.dl-preview {
  margin: 8px auto;
}
.dl-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--dl-border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.dl-preview.is-hidden {
  display: none;
} /* プレビュー画像が 404 のとき library.js が付与 */
/* リンクのみ掲載 (外部スライド・記事など): DL と同じボタン型。アイコンだけ外部リンクに */
.dl-button.dl-button-link::before {
  content: "\f35d";
}
a.material-link-preview {
  display: block;
}

/* リード同意ダウンロード (details/summary) */
.lead-consent {
  margin: 10px auto;
  max-width: 720px;
  text-align: center;
}
.lead-consent-toggle {
  display: block;
  padding: var(--dl-pad-btn);
  background: var(--dl-primary);
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  border-radius: var(--dl-radius-sm);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: opacity var(--dl-transition);
}
.lead-consent-toggle::-webkit-details-marker {
  display: none;
}

.lead-consent-toggle::after {
  content: "\f078";
  display: inline-block;
  margin-left: 10px;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 13px;
  transition: transform var(--dl-transition);
}
.lead-consent[open] .lead-consent-toggle::after {
  transform: rotate(180deg);
}
.lead-consent-toggle:hover {
  opacity: var(--dl-hover-opacity);
}
/* 開いたら見出しと本体をつなげる (アコーディオン) */
.lead-consent[open] .lead-consent-toggle {
  border-radius: var(--dl-radius) var(--dl-radius) 0 0;
}
.lead-consent[open] .lead-consent-body {
  margin-top: 0;
  border-top: none;
  border-radius: 0 0 var(--dl-radius) var(--dl-radius);
  animation: lead-consent-open 0.2s ease-out;
}
@keyframes lead-consent-open {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.lead-consent-body {
  padding: 16px 20px;
  margin-top: 10px;
  background: var(--dl-bg);
  border: 1px solid #e0e0e0;
  border-radius: var(--dl-radius);
}
.lead-consent-provider {
  margin: 0 0 10px;
  text-align: right;
  font-size: 13px;
  color: var(--dl-text-muted);
}
.lead-consent-body h4 {
  margin: 0 0 12px;
  padding: 0 16px 8px;
  font-size: 16px;
  color: var(--dl-text);
  text-align: center;
  border-bottom: 2px solid var(--dl-border);
}
.lead-consent-notice {
  padding: 0 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 14px;
  text-align: left;
}
.lead-consent-notice p {
  margin: 0 0 10px;
}
.lead-consent-notice p:last-child {
  margin-bottom: 0;
}
.lead-consent-notice a {
  color: var(--dl-link);
}
.lead-consent-action {
  padding: 14px 16px;
  background: #fff5cc;
  border-radius: var(--dl-radius-sm);
  text-align: center;
}
.lead-error {
  margin: 0 0 14px;
  padding: 10px 14px;
  font-size: 14px;
  color: #b02a37;
  background: #fbe9eb;
  border-radius: var(--dl-radius-sm);
  text-align: left;
}
/* アンケート (selectbox 設定時のみ) */
.lead-questions {
  margin: 0 0 20px;
  padding: 0 16px;
  text-align: left;
}
.lead-question {
  margin-bottom: 18px;
}
.lead-question-body {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: bold;
  color: var(--dl-text);
}
.lead-required {
  margin-left: 8px;
  font-size: 12px;
  color: #c00;
}
.lead-option {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  cursor: pointer;
}
.lead-option input {
  margin-right: 6px;
}
.lead-select,
.lead-text {
  width: 100%;
  max-width: 420px;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: var(--dl-radius-sm);
}
.lead-question-error {
  margin: 6px 0 0;
  font-size: 13px;
  color: #c00;
}
.lead-agreement {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
.lead-agreement input {
  margin-right: 6px;
}
.lead-submit-btn {
  padding: var(--dl-pad-btn);
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  background: #dc3545;
  border: 0;
  border-radius: var(--dl-radius-sm);
  cursor: pointer;
  transition: opacity var(--dl-transition);
}
.lead-submit-btn:hover:not(:disabled) {
  opacity: 0.8;
}
.lead-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* レポート記事カード — PC 2列 / SP 1列 (session detail 内で横長になりすぎないよう) */
.article-card-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 700px) {
  .article-card-list {
    grid-template-columns: 1fr;
  }
}
.article-card {
  display: flex;
  background: var(--dl-bg);
  border: 1px solid var(--dl-border);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    box-shadow var(--dl-transition),
    border-color var(--dl-transition);
}
.article-card:hover {
  box-shadow: var(--dl-shadow-hover);
  border-color: var(--dl-border);
  text-decoration: none;
  color: inherit;
}
.article-card-thumb {
  flex: 0 0 160px;
}
.article-card-thumb img,
.article-card-thumb .thumb-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 98px;
  object-fit: contain; /* 比率を保ったまま画像全体を表示 (余った部分は背景色) */
  background: #f0f0f0;
}
.article-card-body {
  flex: 1;
  min-width: 0;
  padding: 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.article-card-title {
  font-weight: 600;
  font-size: 16px;
  color: #222;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card:hover .article-card-title {
  color: var(--dl-link);
}
.article-card-summary {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-date {
  font-size: 13px;
  color: var(--dl-text-lighter);
  line-height: 1.2;
}
@media (max-width: 500px) {
  .article-card-thumb {
    flex: 0 0 90px;
  }
  .article-card-thumb img,
  .article-card-thumb .thumb-placeholder {
    min-height: 68px;
  }
  .article-card-body {
    padding: 6px 12px;
  }
  .article-card-title {
    font-size: 13px;
    margin-bottom: 3px;
  }
  .article-card-summary {
    display: none;
  }
}

/* ====================================================================
   12) 会員限定壁 (資料DL 未ログイン用、_member_wall.twig)
   ==================================================================== */
.dl-member-wall {
  max-width: 480px;
  margin: 12px auto;
  padding: 20px 24px;
  background: var(--dl-bg);
  border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius);
  text-align: center;
}
.dl-member-wall-notice {
  margin: 0 0 12px;
  font-size: 12px;
  color: #c33;
}
.dl-member-wall-logo {
  margin: 0 0 12px;
}
.dl-member-wall-logo img {
  max-width: 160px;
  height: auto;
}
.dl-member-wall-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.dl-member-wall-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 160px;
  padding: var(--dl-pad-btn);
  font-size: 13px;
  font-weight: bold;
  color: #fff !important;
  text-decoration: none !important;
  border: 0;
  border-radius: var(--dl-radius-sm);
  cursor: pointer;
  transition: opacity var(--dl-transition);
  box-sizing: border-box;
}
.dl-member-wall-btn:hover {
  opacity: var(--dl-hover-opacity);
  color: #fff !important;
}
.dl-member-wall-btn.-regist {
  background: var(--dl-accent);
}
.dl-member-wall-btn.-login {
  background: var(--dl-primary);
}
.dl-member-wall-btn .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.dl-member-wall-btn-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 0.05em 0.5em;
  background: #fff;
  color: var(--dl-accent);
  font-size: 0.75em;
  font-style: normal;
  border-radius: 2px;
  font-weight: bold;
}

/* ====================================================================
   13) Search results (search.twig)
   ==================================================================== */
.search-results-meta {
  font-size: 13px;
  color: var(--dl-text-muted);
  margin-bottom: 16px;
}
.search-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--dl-text-lighter);
  background: var(--dl-bg-soft);
  border-radius: var(--dl-radius);
}

/* pagination (search.twig でのみ利用)
   隣接ボタン間は隙間なし・共通ボーダー (segmented control 風)、primary カラーで統一 */
.pagination-nav {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}
.pagination-nav a,
.pagination-nav span {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--dl-text);
  border: 1px solid var(--dl-border);
  border-right: 0;
  text-decoration: none;
  background: var(--dl-bg);
}
.pagination-nav > *:last-child {
  border-right: 1px solid var(--dl-border);
}
.pagination-nav > *:first-child {
  border-top-left-radius: var(--dl-radius-sm);
  border-bottom-left-radius: var(--dl-radius-sm);
}
.pagination-nav > *:last-child {
  border-top-right-radius: var(--dl-radius-sm);
  border-bottom-right-radius: var(--dl-radius-sm);
}
.pagination-nav a:hover {
  background: #f4f8ea;
  color: var(--dl-primary);
  text-decoration: none;
}
.pagination-nav .current {
  background: var(--dl-primary);
  color: #fff;
  border-color: var(--dl-primary);
}
.pagination-nav .current + a,
.pagination-nav .current + span {
  border-left: 0;
} /* .current の右ボーダーを .current 自身の色で担当 */
.pagination-nav .disabled {
  color: #ccc;
  background: var(--dl-bg-soft);
}

