.case-detail-card {
  width: 100%;
  margin: 0.5em 0;
  padding: 1.75em;
  background: #fff;
  border: 1px solid #e3edf7;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(16, 108, 192, 0.08);
}

.case-detail-title {
  margin: 0 0 1em;
  padding: 0;
  width: auto;
  color: #106CC0;
}

.case-detail-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 1.5em;
}

/* 縦長・小さめの図用（AI活用事例など） */
.case-detail-image--narrow {
  width: 60%;
  margin-left: auto;
  margin-right: auto;
}

.case-detail-block {
  margin-bottom: 1.5em;
}

.case-detail-label {
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-weight: bold;
  font-size: 0.9em;
  letter-spacing: 0.05em;
  margin: 0 0 0.4em;
}

.case-detail-label .material-symbols-outlined {
  font-size: 1.2em;
}

.case-detail-block--challenge .case-detail-label {
  color: #e08a2c;
}

.case-detail-block--outcome .case-detail-label {
  color: #106CC0;
}

.case-detail-text {
  margin: 0;
  line-height: 1.8;
  color: #333;
}

.case-detail-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5em;
  padding-top: 1.5em;
  border-top: 1px solid #eef3f8;
}

.case-detail-spec-label {
  display: block;
  font-size: 0.8em;
  color: #8a97a6;
  letter-spacing: 0.05em;
  margin-bottom: 0.4em;
}

.case-detail-spec-value {
  display: block;
  color: #222;
  line-height: 1.6;
  font-size: 0.95em;
}

.case-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.case-detail-tag {
  display: inline-block;
  background: #e4f0fa;
  color: #106CC0;
  border-radius: 999px;
  padding: 0.25em 0.8em;
  font-size: 0.85em;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .case-detail-card {
    padding: 1.25em;
    border-radius: 12px;
  }

  .case-detail-image--narrow {
    width: 100%;
  }

  .case-detail-specs {
    grid-template-columns: 1fr;
    gap: 1em;
  }
}

/* =========================================================
   事例一覧（コンパクトカード）と「詳しく見る」ポップアップ
   ポップアップの中身は上の .case-detail-* を使用
   ========================================================= */
/* ==== 一覧: 横長コンパクトカード ==== */
.cs-list { margin: 0; }
.cs-card { display: flex; gap: 1.2em; margin: 0 0 1em; padding: 1em; background: #fff; border: 1px solid #e3edf7; border-radius: 10px; box-shadow: 0 2px 10px rgba(16, 108, 192, 0.05); }
.cs-thumb-btn { flex: 0 0 220px; width: 220px; min-width: 0; height: 140px; padding: 0; border: 1px solid #eef3f8; border-radius: 6px; background: #fff; cursor: zoom-in; overflow: hidden; }
.cs-thumb-btn img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cs-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cs-industry { margin: 0 0 0.3em; color: #8a97a6; font-size: 0.8em; }
.cs-title { margin: 0 0 0.3em; padding: 0; width: auto; color: #106CC0; font-size: 1.05em; }
.cs-text { margin: 0 0 0.25em; font-size: 0.88em; line-height: 1.6; color: #333; }
.cs-label { font-weight: bold; margin: 0 0.3em 0 0; }
.cs-label--c { color: #e08a2c; }
.cs-label--o { color: #106CC0; }
.cs-foot { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-top: auto; padding-top: 0.5em; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 0.35em; margin: 0; padding: 0; list-style: none; }
.cs-tag { background: #e4f0fa; color: #106CC0; border-radius: 999px; padding: 0.15em 0.7em; font-size: 0.78em; white-space: nowrap; }
.cs-more { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.2em; padding: 0.35em 0.9em; border: 1px solid #106CC0; border-radius: 999px; background: #fff; color: #106CC0; font-size: 0.85em; font-weight: bold; cursor: pointer; }
.cs-more:hover, .cs-more:focus-visible { background: #106CC0; color: #fff; }
.cs-more .material-symbols-outlined { font-size: 1.2em; }
.cs-noimg { display: flex; align-items: center; justify-content: center; background: #eef3f8; color: #9aa8b6; font-size: 0.85em; }

/* ==== ポップアップ (どこをクリックしても閉じる / スクロールせずに全体を表示) ==== */
.cs-modal { width: min(1000px, 94vw); max-width: none; max-height: none; padding: 0; border: none; border-radius: 16px; background: transparent; overflow: visible; cursor: pointer; }
.cs-modal::backdrop { background: rgba(11, 31, 58, 0.55); cursor: pointer; }
.cs-modal .case-detail-card { display: flex; flex-direction: column; margin: 0; padding: 1.25em 1.6em 1em; max-height: 94vh; box-sizing: border-box; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); }
.cs-modal .case-detail-card > * { flex: 0 0 auto; }
.cs-modal .case-detail-title { margin-bottom: 0.6em; }
/* 図は残りの高さに合わせて縮む */
.cs-modal .case-detail-image { flex: 0 1 auto; min-height: 120px; height: auto; object-fit: contain; margin-bottom: 0.9em; }
.cs-modal .case-detail-block { margin-bottom: 0.8em; }
.cs-modal .case-detail-text { line-height: 1.7; }
.cs-modal .case-detail-specs { gap: 1.2em; padding-top: 0.9em; }
.cs-modal .cs-noimg { flex: 0 1 240px; min-height: 120px; border-radius: 10px; margin-bottom: 0.9em; }
.cs-modal-hint { margin: 0.8em 0 0; text-align: center; color: #8a97a6; font-size: 0.78em; }
/* 背景のスクロールを止める。スクロールバー分の幅を確保して、背景が横にずれないようにする */
html.cs-modal-open { overflow: hidden; scrollbar-gutter: stable; }
/* 開く・閉じるエフェクト */
.cs-modal[open] { animation: cs-modal-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }
.cs-modal[open]::backdrop { animation: cs-backdrop-in 0.5s ease-out both; }
.cs-modal.is-closing { animation: cs-modal-out 0.4s cubic-bezier(0.4, 0, 0.9, 0.6) both; }
.cs-modal.is-closing::backdrop { animation: cs-backdrop-out 0.4s ease-in both; }
@keyframes cs-modal-in { from { opacity: 0; transform: translateY(24px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes cs-modal-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(12px) scale(0.94); } }
@keyframes cs-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cs-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
/* 動きを減らす設定の利用者にはアニメーションしない */
@media (prefers-reduced-motion: reduce) {
  .cs-modal[open], .cs-modal[open]::backdrop, .cs-modal.is-closing, .cs-modal.is-closing::backdrop { animation: none; }
}
/* 画面が非常に小さく収まらない場合だけ、スクロールバーを出さずにスクロールさせる */
@media (max-height: 560px), (max-width: 600px) {
  .cs-modal .case-detail-card { overflow-y: auto; scrollbar-width: none; }
  .cs-modal .case-detail-card::-webkit-scrollbar { display: none; }
  .cs-modal .case-detail-image { flex-shrink: 0; }
}

@media (max-width: 600px) {
  .cs-card { flex-direction: column; }
  .cs-thumb-btn { flex-basis: auto; width: 100%; height: 160px; }
  .cs-foot { flex-direction: column; align-items: flex-start; }
}

/* =========================================================
   ページ内リンク（ヘッダー下のメニュー）: テキストリンク＋区切り線
   ========================================================= */
.sf-nav { max-width: 1000px; margin: 0 auto; }
.sf-nav ul { list-style: none; margin: 0; padding: 0; }
.sf-nav a { text-decoration: none; }
.sf-nav .material-symbols-outlined { line-height: 1; }
.sf-nav span { margin-left: 0; margin-right: 0; } /* サイト共通 CSS の span の左余白を打ち消す */
.sf-nav--A ul { display: flex; justify-content: center; border-top: 1px solid #dbe6f2; border-bottom: 1px solid #dbe6f2; }
.sf-nav--A li { flex: 1 1 0; }
.sf-nav--A li + li { border-left: 1px solid #e6edf5; }
.sf-nav--A a { position: relative; display: flex; align-items: center; justify-content: center; gap: 0.15em; padding: 0.95em 0.4em; color: #1f2d3d; font-size: 15px; font-weight: bold; transition: color 0.2s; }
.sf-nav--A a .material-symbols-outlined { font-size: 20px; color: #469ff0; transition: transform 0.2s; }
.sf-nav--A a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -1px; height: 3px; background: #106CC0; transition: left 0.25s, right 0.25s; }
.sf-nav--A a:hover, .sf-nav--A a:focus-visible { color: #106CC0; }
.sf-nav--A a:hover::after, .sf-nav--A a:focus-visible::after { left: 15%; right: 15%; }
.sf-nav--A a:hover .material-symbols-outlined { transform: translateY(2px); }

@media (max-width: 760px) {
  .sf-nav--A ul { flex-wrap: wrap; }
  .sf-nav--A li { flex: 1 1 33%; }
  .sf-nav--A li + li { border-left: none; }
}
