/* ===============================
   webinar.japha.jp 会員向け動画サイト / 共通スタイル
   基調 #036eb8 / 差し色 #fff100
   =============================== */

:root {
  --brand: #036eb8;
  --brand-weak: #e8f2fa;
  --accent: #fff100;
  --accent-weak: #fffde6;
  --ink: #111;
  --muted: #596068;
  --bg: #fff;
  --line: #e0e6ec;
  --line-strong: #d0d8e0;
  --focus: #036eb8;
  --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px; --s6: 48px; --s7: 64px; --s8: 80px;
  --wrap-max: 1200px;
  --wrap-hero: 1100px;
  --ff: "Noto Sans JP", system-ui, -apple-system, sans-serif;
  --fs-body: clamp(15px, 1.9vw, 17px);
  --lh-body: 1.85;
  --fs-h1: clamp(26px, 4.5vw, 36px);
  --fs-h2: clamp(20px, 3.2vw, 24px);
  --fs-h3: clamp(17px, 2.8vw, 20px);
  /* スマホで端にくっつかない余白・ノッチ対応 */
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --pad-mobile: 24px;
  --pad-mobile-lg: 28px;
}
/* 極小画面ではさらに余白を確保 */
@media (max-width: 480px) {
  :root {
    --pad-mobile: 28px;
    --pad-mobile-lg: 32px;
  }
}

* { box-sizing: border-box; }
html { font-family: var(--ff); color: var(--ink); background: var(--bg); overflow-x: hidden; }
body { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; object-fit: cover; }
a { color: var(--brand); text-decoration: none; }
a:hover { opacity: 0.9; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px;
}
.sr-only { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* SVGアイコン共通 */
.icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.icon use { pointer-events: none; }
.icon--sm { width: 18px; height: 18px; }
.icon--md { width: 22px; height: 22px; }
.icon--lg { width: 28px; height: 28px; }
.icon svg { width: 100%; height: 100%; display: block; color: currentColor; }
/* 塗りアイコン（play）のみ fill を指定、線アイコンは symbol の stroke="currentColor" を利用 */
.card-video .play-icon use { fill: currentColor; stroke: none; }
.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding-left: max(var(--pad-mobile), clamp(16px, 4vw, 32px), var(--safe-left));
  padding-right: max(var(--pad-mobile), clamp(16px, 4vw, 32px), var(--safe-right));
}
@media (min-width: 600px) {
  .wrap {
    padding-left: max(clamp(16px, 4vw, 32px), var(--safe-left));
    padding-right: max(clamp(16px, 4vw, 32px), var(--safe-right));
  }
}
.muted { color: var(--muted); }
.fine { font-size: 0.92em; }

/* ========== ヘッダー ========== */
header.site {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  background: var(--bg); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(120%) blur(8px);
  transform: translateY(0); transition: transform 0.4s ease;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}
header.site.hidden { transform: translateY(-100%); }
body {
  padding-top: calc(72px + var(--safe-top));
  padding-bottom: var(--safe-bottom);
}
.site-bar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: var(--s3); position: relative;
}
.header-japha-logo {
  display: flex; align-items: center; flex-shrink: 0;
  margin-right: clamp(8px, 1.2vw, 14px);
}
.header-japha-logo img {
  width: auto; height: 58px; display: block; object-fit: contain;
}
.header-japha-logo:hover { opacity: 0.9; }
.site-title-img {
  display: flex; align-items: center; flex-shrink: 0;
  max-width: min(300px, 42vw);
}
.site-title-img img {
  width: 100%; height: auto; max-height: 44px;
  object-fit: contain; object-position: left center;
}
.site-title-img:hover { opacity: 0.92; }
@media (max-width: 600px) {
  .site-title-img { max-width: 200px; }
  .site-title-img img { max-height: 36px; }
}

nav.main { display: flex; align-items: center; gap: clamp(6px, 1.2vw, 16px); }
.nav-item { position: relative; }
.nav-item > .nav-label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 8px; min-height: 44px;
  color: var(--ink); cursor: pointer; transition: background 0.18s ease;
  border: none; background: transparent; font-size: inherit; font-family: inherit;
}
.nav-item > .nav-label .nav-label-icon { color: var(--brand); flex-shrink: 0; }
.nav-item > .nav-label::after { content: "▾"; font-size: 0.85em; opacity: 0.6; margin-left: 2px; }
.nav-item:hover > .nav-label, .nav-item:focus-within > .nav-label { background: var(--brand-weak); }
.nav-item:hover > .nav-label::after, .nav-item:focus-within > .nav-label::after { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; top: 100%; left: 0; min-width: 260px; white-space: nowrap;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 200; padding: 8px 0;
}
.nav-item:nth-last-child(-n+2) .nav-dropdown { left: auto; right: 0; }
.nav-item:hover > .nav-dropdown, .nav-item:focus-within > .nav-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown a { display: block; padding: 10px 18px; color: var(--ink); font-size: 0.95em; transition: background 0.15s ease; }
.nav-dropdown a:hover { background: var(--brand-weak); }

.header-actions { display: flex; align-items: center; gap: var(--s3); }
.btn-login, .btn-logout {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 16px; min-height: 40px; border-radius: 8px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; text-decoration: none; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-login:hover, .btn-logout:hover { background: #025a9e; border-color: #025a9e; color: #fff; }
.btn-logout { background: transparent; color: var(--brand); }
.btn-logout:hover { background: var(--brand-weak); }

.menu-toggle {
  display: none; border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; padding: 10px; min-height: 44px; min-width: 44px; cursor: pointer;
}
.menu-toggle span[aria-hidden="true"] {
  display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  box-shadow: 0 -5px 0 0 var(--ink), 0 5px 0 0 var(--ink); font-size: 0; line-height: 0; color: transparent;
}
.menu-toggle[aria-expanded="true"] { background: var(--brand-weak); border-color: var(--brand); }
.menu-toggle:hover { background: var(--brand-weak); border-color: var(--brand); }

@media (max-width: 960px) {
  /* ハンバーガーを右上に：ロゴ左・ボタン右 */
  .site-bar { flex-wrap: nowrap; }
  .header-actions {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    max-height: 80vh; overflow-y: auto; z-index: 199;
  }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .menu-toggle[aria-expanded="true"] ~ .header-actions { display: flex; }
  .header-actions nav.main {
    flex-direction: column; align-items: stretch;
  }
  .nav-item { display: contents; }
  .nav-item > .nav-label {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px 14px 44px; border-bottom: 1px solid var(--line-strong);
    border-radius: 0; font-weight: 600; color: var(--brand); background: var(--brand-weak);
  }
  .nav-item > .nav-label::after { display: none; }
  .nav-dropdown {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0; min-width: auto;
  }
  .nav-dropdown a { padding: 12px 18px 12px 44px; border-bottom: 1px solid var(--line-strong); }
  .nav-dropdown a:last-child { border-bottom: 0; }
  /* ログインをメニュー内に（一番下） */
  .header-actions .btn-login,
  .header-actions .btn-logout,
  .header-actions .muted.fine {
    margin: 14px 18px; padding: 12px 18px; justify-content: center; border-radius: 8px;
    border-top: 1px solid var(--line-strong);
  }
  .header-actions .muted.fine { margin-bottom: 0; padding-bottom: 8px; border-top: none; }
  .header-actions .btn-logout { margin-top: 8px; }
}

/* ========== ヒーロー ========== */
.hero {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, var(--brand-weak) 100%);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; right: 24px; top: 0; bottom: 0; width: min(45%, 480px);
  background: url("../image/top-image.png") no-repeat right center; background-size: contain;
  pointer-events: none; opacity: 0.85;
}
.hero-inner { position: relative; z-index: 1; padding: var(--s7) 0 var(--s6); }
.hero-inner > .hero-title-wrap, .hero-inner > p, .hero-inner > form, .hero-inner > .result-count, .hero-inner > .tag-cloud-wrapper {
  max-width: var(--wrap-hero); margin-left: auto; margin-right: auto;
  padding-left: max(var(--pad-mobile-lg), clamp(16px, 4vw, 40px), var(--safe-left));
  padding-right: max(var(--pad-mobile-lg), clamp(16px, 4vw, 40px), var(--safe-right));
}
@media (min-width: 600px) {
  .hero-inner > .hero-title-wrap, .hero-inner > p, .hero-inner > form, .hero-inner > .result-count, .hero-inner > .tag-cloud-wrapper {
    padding-left: max(clamp(16px, 4vw, 40px), var(--safe-left));
    padding-right: max(clamp(16px, 4vw, 40px), var(--safe-right));
  }
}
.hero-title { margin: 1em 0 0.8em; text-align: left; line-height: 1.35; }
.hero-title-img {
  display: block; max-width: min(480px, 85vw); height: auto; margin: 0;
  opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease;
}
.hero-title.reveal .hero-title-img { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .hero-title-img { opacity: 1; transform: none; } }
.hero-inner > p.hero-desc { margin-top: var(--s4); }

.hero-inner > form.searchbox { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.searchbox input {
  -webkit-appearance: none; appearance: none; flex: 1 1 280px; min-width: 0;
  padding: 0 16px; height: 52px; line-height: 52px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; font-size: 1rem; font-family: var(--ff);
}
.searchbox input::placeholder { color: var(--muted); }
.searchbox button {
  -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 24px; height: 52px; border: 0; border-radius: 12px; background: var(--brand); color: #fff;
  font-weight: 700; font-size: 1rem; cursor: pointer; white-space: nowrap; transition: background 0.2s ease;
}
.searchbox button .icon { color: currentColor; }
.searchbox button:hover { background: #025a9e; }

.result-count { margin: var(--s2) auto 0; font-size: 0.95em; color: var(--muted); min-height: 24px; opacity: 0; transition: opacity 0.2s ease; }
.result-count.visible { opacity: 1; }
.result-count-number { color: var(--brand); font-size: 1.2em; font-weight: 700; margin: 0 4px; }

.tag-cloud-wrapper { margin: var(--s4) auto 0; }
.tag-cloud-label {
  display: flex; align-items: center; gap: 8px; font-size: 0.95em; color: var(--muted); margin: 0 0 var(--s2);
}
.tag-cloud-label .icon { color: var(--brand); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s2); }
.tag-cloud-wrapper .btn-clear {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 14px; min-height: 36px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--muted); font-size: 0.9em; cursor: pointer; transition: all 0.15s ease;
  white-space: nowrap; margin-top: var(--s2); font-family: var(--ff);
}
.tag-cloud-wrapper .btn-clear .icon { color: currentColor; }
.tag-cloud-wrapper .btn-clear:hover:not(:disabled) { background: var(--brand-weak); border-color: var(--brand); color: var(--brand); }
.tag-cloud-wrapper .btn-clear:disabled, .tag-cloud-wrapper .btn-clear.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.tag-btn {
  -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 14px; min-height: 36px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 0.9em; cursor: pointer; transition: all 0.15s ease;
  white-space: nowrap; font-family: var(--ff);
}
.tag-btn:hover { background: var(--brand-weak); border-color: var(--brand); color: var(--brand); }
.tag-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tag-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.tag-btn.active:hover { background: #025a9e; border-color: #025a9e; color: #fff; }

.result-count-main-wrap {
  padding-left: max(var(--pad-mobile), clamp(16px, 4vw, 40px), var(--safe-left));
  padding-right: max(var(--pad-mobile), clamp(16px, 4vw, 40px), var(--safe-right));
  padding-top: var(--s5);
  padding-bottom: var(--s4);
  background: #fff;
  scroll-margin-top: 88px;
}
@media (min-width: 600px) {
  .result-count-main-wrap {
    padding-left: max(clamp(16px, 4vw, 40px), var(--safe-left));
    padding-right: max(clamp(16px, 4vw, 40px), var(--safe-right));
  }
}
.result-count-main-wrap[hidden] { display: none !important; }
.search-criteria-wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px var(--s3);
  margin-top: var(--s4); padding-top: var(--s4); padding-bottom: var(--s4);
  border-top: 1px solid var(--line); margin-bottom: var(--s4);
}
.search-criteria-label { font-size: 0.95em; color: var(--muted); margin: 0; flex-shrink: 0; }
.search-criteria-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.search-criteria-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  background: var(--brand-weak); color: var(--brand); border-radius: 999px; font-size: 0.9em;
}
.search-criteria-chip .chip-remove {
  -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,0.08);
  color: inherit; cursor: pointer; font-size: 1.1em; line-height: 1; transition: background 0.15s;
}
.search-criteria-chip .chip-remove:hover { background: rgba(0,0,0,0.15); }
.btn-clear-inline {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; min-height: 36px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted);
  font-size: 0.9em; cursor: pointer; transition: all 0.15s ease; font-family: var(--ff);
}
.btn-clear-inline:hover { background: var(--brand-weak); border-color: var(--brand); color: var(--brand); }
.btn-clear-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; font-size: 1.2em; font-weight: 700; line-height: 1; }
.btn-clear .icon.btn-clear-icon { width: 16px; height: 16px; }

/* ========== カード一覧（動画一覧） ========== */
/* 参考：sample/ わかりやすい病気のはなし .card-thumb */
.video-cards-section { padding: var(--s6) 0 var(--s7); background: #fff; }
.video-cards-section .wrap {
  max-width: none;
  padding-left: max(var(--pad-mobile), clamp(16px, 4vw, 32px), var(--safe-left));
  padding-right: max(var(--pad-mobile), clamp(16px, 4vw, 32px), var(--safe-right));
}
@media (min-width: 600px) {
  .video-cards-section .wrap {
    padding-left: max(clamp(16px, 4vw, 32px), var(--safe-left));
    padding-right: max(clamp(16px, 4vw, 32px), var(--safe-right));
  }
}
.video-cards-section h2 { font-size: var(--fs-h2); margin: 0 0 var(--s5); }

/* トップページカード：間隔を広め・カード最大幅400px */
.grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  margin-left: auto;
  margin-right: auto;
}
.grid .card-video { max-width: 400px; margin-left: auto; margin-right: auto; }
@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 400px));
    max-width: calc(400px * 2 + 40px);
  }
  .grid .card-video { max-width: none; margin-left: 0; margin-right: 0; }
}
@media (min-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 400px));
    max-width: calc(400px * 3 + 40px * 2);
  }
}
@media (min-width: 1280px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 400px));
    max-width: calc(400px * 4 + 40px * 3);
  }
}
@media (min-width: 1520px) {
  .grid {
    grid-template-columns: repeat(5, minmax(0, 400px));
    max-width: calc(400px * 5 + 40px * 4);
  }
}

/* ---------- カード本体（sample .card .card-thumb に準拠） ---------- */
.card-video {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  line-height: 1.8;
  transition: transform 0.08s ease, box-shadow 0.16s ease;
}
.card-video:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}
.card-video:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* サムネイルエリア（sample 同様のグラデ背景 + 動画用 16:9・再生ボタン） */
.card-video .card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #f0f4f8 0%, #e2e8ee 50%, #d8e0e8 100%);
  overflow: hidden;
}
.card-video .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: box-shadow 0.3s ease;
}
.card-video:hover .card-image img {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.12);
}
/* サムネイル上：暗いグラデーション（動画用）・ホバーでマスクが少し明るく */
.card-video .card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.45) 100%);
  z-index: 1;
  pointer-events: none;
  transition: background 0.25s ease;
}
.card-video:hover .card-image::before {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.22) 100%);
}
/* 再生ボタン・外側の円（ホバー時も黄色にせず白のまま） */
.card-video .card-image::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 2;
  pointer-events: none;
  transition: box-shadow 0.2s ease;
}
.card-video:hover .card-image::after {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}
.card-video .play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  color: var(--brand);
  z-index: 3;
  pointer-events: none;
}
.card-video:hover .play-icon {
  color: var(--brand);
}
.card-video .play-icon svg { width: 100%; height: 100%; }
.card-video .play-icon use { fill: currentColor; }

/* テキストエリア（sample .card-thumb .card-content に準拠：padding var(--s3)、flex） */
.card-video .card-content {
  padding: var(--s3);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}
.card-video .card-title {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-video .card-speaker {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-video .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0;
}
.card-video .card-tag {
  display: inline-block;
  padding: 5px 11px;
  font-size: 0.75rem;
  border-radius: 999px;
  background: var(--brand-weak);
  color: var(--brand);
  line-height: 1.35;
  font-weight: 600;
}

/* 関連動画エリア：コンパクトに */
.related-grid .card-video .card-content {
  padding: var(--s2) var(--s3);
}
.related-grid .card-video .card-title {
  font-size: 1em;
  margin: 0 0 4px;
}
.related-grid .card-video .card-speaker {
  font-size: 0.8125rem;
  margin: 0 0 6px;
  -webkit-line-clamp: 1;
}
.related-grid .card-video .card-tags {
  display: none;
}

/* ========== 個別ページ（動画詳細） ========== */
.entry-video-wrap { padding: var(--s6) 0 var(--s8); }
@media (max-width: 600px) {
  .entry-video-wrap { padding-top: var(--s5); padding-bottom: var(--s7); }
}
/* 動画（または画像）の前後にゆったりスペース */
.entry-video-player {
  position: relative; width: 100%; max-width: 900px; margin: var(--s6) auto var(--s6);
  aspect-ratio: 16 / 9; background: #111; border-radius: 12px; overflow: hidden;
}
@media (max-width: 600px) {
  .entry-video-player { margin-top: var(--s5); margin-bottom: var(--s5); border-radius: 0; }
}
/* ログイン後：EntryMore（Vimeo埋め込み）表示時は黒マスクなし・高さは貼り付けたコードに従う */
.entry-video-player:has(.entry-video-embed) {
  aspect-ratio: auto;
}
.entry-video-player:has(.entry-video-embed)::before {
  display: none;
}
.entry-video-player img { width: 100%; height: 100%; object-fit: contain; }
.entry-video-player::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%); z-index: 1;
}
.entry-video-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.75); z-index: 2; padding: var(--s4); text-align: center;
}
.entry-video-overlay[hidden] { display: none !important; }
.entry-video-overlay .overlay-message { color: #fff; font-size: 1.15em; margin: 0 0 var(--s4); }
.entry-video-overlay .btn-login { min-height: 48px; padding: 0 24px; font-size: 1rem; }
/* ログイン後：VimeoからコピーしたHTMLをそのまま貼り付けて使う。領域からはみ出さないようにするだけ */
.entry-video-player .entry-video-embed {
  position: relative; width: 100%; max-width: 100%; z-index: 2; background: #000;
  overflow: hidden;
}
.entry-video-player .entry-video-embed[hidden] { display: none !important; }
/* 貼り付けたコードの div/iframe には一切手を加えない（Vimeoの padding:56.25% 等がそのまま効く） */

.entry-video-meta { max-width: 860px; margin: 0 auto; }
@media (max-width: 600px) {
  .entry-video-meta { padding-left: var(--s4); padding-right: var(--s4); }
}
.entry-video-meta h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  margin: 0 0 var(--s4);
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em;
}
.entry-video-meta h1::before {
  content: "TITLE: ";
  font-size: 0.45em;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brand);
  flex-shrink: 0;
}
.entry-video-meta .entry-speaker { font-size: 1em; color: var(--muted); margin: 0 0 var(--s4); line-height: 1.6; }
.entry-video-meta .entry-body { margin: 0 0 var(--s5); line-height: var(--lh-body); padding: 0; }
.entry-video-meta .entry-body p { margin: 0 0 1em; }
.entry-video-meta .entry-body p:last-child { margin-bottom: 0; }
.entry-video-meta .entry-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
@media (max-width: 600px) {
  .entry-video-meta h1 { margin-bottom: var(--s2); }
  .entry-video-meta .entry-speaker { margin-bottom: var(--s3); }
  .entry-video-meta .entry-body { margin-bottom: var(--s4); }
}
.entry-video-meta .entry-tag {
  display: inline-block; padding: 6px 12px; font-size: 0.85em; border-radius: 999px;
  background: var(--brand-weak); color: var(--brand); text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.entry-video-meta .entry-tag:hover { background: var(--brand); color: #fff; }

.related-section { padding: var(--s6) 0 var(--s7); background: var(--brand-weak); border-top: 1px solid var(--line); }
.related-section h2 { font-size: var(--fs-h2); margin: 0 0 var(--s5); }
@media (max-width: 600px) {
  .related-section { padding-top: var(--s5); padding-bottom: var(--s6); }
  .related-section h2 { margin-bottom: var(--s4); }
}
/* 関連動画：3件・3列・一定サイズで均等配置・角丸はシャープに */
.related-grid {
  display: grid;
  gap: var(--s4);
  grid-template-columns: repeat(3, 1fr);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
/* スマホ：横スワイプで3件表示（カード幅を保つ） */
@media (max-width: 768px) {
  .related-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--s4);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    max-width: none;
    margin-left: calc(-1 * max(var(--pad-mobile), var(--safe-left)));
    margin-right: calc(-1 * max(var(--pad-mobile), var(--safe-right)));
    padding-left: max(var(--pad-mobile), var(--safe-left));
    padding-right: max(var(--pad-mobile), var(--safe-right));
  }
  .related-grid .card-video {
    flex: 0 0 auto;
    width: min(280px, 85vw);
    scroll-snap-align: start;
  }
}
.related-grid .card-video {
  border-radius: 8px;
}
.related-grid .card-video .card-image { aspect-ratio: 16 / 9; }
.related-grid .card-video .card-content { padding: 0.875rem 1rem 1rem; }
.related-grid .card-video .card-title { font-size: 0.9375em; margin: 0 0 0.375rem; }
.related-grid .card-video .card-speaker { -webkit-line-clamp: 1; font-size: 0.8125rem; margin: 0; }
.related-grid .card-video .card-tags { display: none; }

/* ========== 固定ページ ========== */
.page-content { padding: var(--s6) 0 var(--s7); }
.page-content h1 { font-size: var(--fs-h1); margin: 0 0 var(--s4); }
.page-content h2 { font-size: var(--fs-h2); margin: var(--s5) 0 var(--s3); padding-bottom: 8px; border-bottom: 2px solid var(--brand); }
.page-content p { margin: 0 0 var(--s3); line-height: var(--lh-body); }
.page-content ul { padding-left: 1.5em; margin: 0 0 var(--s3); }
.page-content li { margin-bottom: 8px; }
.category-list { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.category-list li { margin: 0; }
.category-list a {
  display: flex; align-items: center; justify-content: space-between; padding: var(--s3);
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.category-list a:hover { background: var(--brand-weak); border-color: var(--brand); }
.category-list a::after { content: "›"; font-size: 1.2em; color: var(--muted); }

/* ========== フッター ========== */
.site-footer { background: var(--brand); color: #fff; margin-top: auto; }
.footer-inner {
  padding-top: var(--s6);
  padding-bottom: var(--s5);
  padding-left: max(var(--pad-mobile-lg), clamp(16px, 4vw, 40px), var(--safe-left));
  padding-right: max(var(--pad-mobile-lg), clamp(16px, 4vw, 40px), var(--safe-right));
}
@media (min-width: 600px) {
  .footer-inner {
    padding-left: max(clamp(16px, 4vw, 40px), var(--safe-left));
    padding-right: max(clamp(16px, 4vw, 40px), var(--safe-right));
  }
}
.footer-grid { display: grid; gap: var(--s5); grid-template-columns: 1fr; padding-bottom: var(--s5); border-bottom: 1px solid rgba(255,255,255,0.3); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-col.footer-org { text-align: center; }
.footer-col .footer-logo { max-width: 160px; height: auto; margin-bottom: var(--s3); }
.footer-col h4 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 var(--s3);
  font-size: 1.1rem; font-weight: 700; color: #fff;
}
.footer-col h4 .footer-col-icon { color: var(--accent); flex-shrink: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0 0 8px; }
.footer-links a { color: rgba(255,255,255,0.9); transition: opacity 0.2s ease; }
.footer-links a:hover { opacity: 1; color: var(--accent); }
.footer-bottom { display: flex; flex-direction: column; gap: 8px; padding-top: var(--s4); font-size: 0.9em; color: #fff; }
.site-footer .footer-bottom .muted { color: #fff; }
@media (min-width: 640px) { .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; } }

.breadcrumb { font-size: 0.9em; color: var(--muted); margin: 0 0 var(--s3); }
.breadcrumb a { color: var(--brand); }
@media (max-width: 600px) {
  .breadcrumb { margin-top: var(--s2); margin-bottom: var(--s4); }
}
@media (max-width: 720px) { .searchbox input { flex: 1 1 100%; } .searchbox button { width: 100%; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } html { scroll-behavior: auto !important; } }
