/* 全体・レイアウト */
/* * { box-sizing: border-box; margin: 0; padding: 0; font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif; } */
/* body { background-color: #FFFFFF; color: #333; font-size: 13px; padding: 30px 20px; min-height: 100vh; } */

/* ヘッダーエリア */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; max-width: 1600px; margin-left: auto; margin-right: auto; }
/* .logo-area { display: flex; align-items: center; gap: 12px; } */
.logo-title { font-size: 22px; font-weight: bold; color: #111E38; }
/* .logo-sub { font-size: 12px; color: #666; margin-top: 2px; } */
.header-tools { display: flex; gap: 15px; align-items: flex-end; justify-content: flex-end; margin-bottom: 10px;}
.tool-btn { background: #FFF; border: 1px solid #E2E8F0; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 5px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.search-bar { display: flex; align-items: center; background: #FFF; border: 1px solid #E2E8F0; border-radius: 20px; padding: 4px 12px; width: 240px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.search-input { border: none; outline: none; width: 100%; font-size: 13px; padding: 4px; }

/* マトリックスグリッド構造 */
.matrix-container { display: grid; grid-template-columns: 80px 280px repeat(4, minmax(160px, 1fr)); background: #FFF; border-radius: 12px; border: 1px solid #E2E8F0; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.05); max-width: 1150px; margin: 0 auto; }

/* 横軸ヘッダー行 */
.axis-label-row { background-color: #FFFDF4; grid-column: 1 / -1; display: grid; grid-template-columns: 80px 280px repeat(4, minmax(160px, 1fr)); border-bottom: 2px solid #D9E2EC; }
.axis-origin-cell { grid-column: 1 / 3; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; color: #718096; background: #F7FAFC; border-right: 1px solid #E2E8F0; text-align: center; padding: 10px; }

/* 上段ターゲットセル */
.target-header-cell { padding: 20px 12px; text-align: center; border-right: 1px solid #E2E8F0; display: flex; align-items: center; justify-content: center; gap: 12px; }
.target-header-cell:last-child { border-right: none; }
.target-icon-wrap { width: 64px; height: 44px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.target-icon-wrap svg { width: 100%; height: 100%; }
.target-text-wrap { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; }
.target-title { font-weight: bold; font-size: 14px; }
.target-en { font-size: 9px; font-weight: bold; letter-spacing: 0.5px; }

/* 上段ターゲット別カラー・グラデーション背景 */
.target-header-cell.green-t { background: linear-gradient(to bottom, #F2FAF4, #FFFFFF); color: #1E6B43; }
.target-header-cell.blue-t { background: linear-gradient(to bottom, #EDF4FA, #FFFFFF); color: #1A5296; }
.target-header-cell.purple-t { background: linear-gradient(to bottom, #F4EDFA, #FFFFFF); color: #553C9A; }
.target-header-cell.orange-t { background: linear-gradient(to bottom, #FAF0EB, #FFFFFF); color: #A6461A; }

/* データ行共通 */
.matrix-row { grid-column: 2 / -1; display: grid; grid-template-columns: 280px repeat(4, minmax(160px, 1fr)); border-bottom: 1px solid #E2E8F0; }
.matrix-row.border-heavy { border-bottom: 3px solid #111E38; }
.matrix-row:last-child { border-bottom: none; }

/* 大カテゴリ（縦書き区画） */
.main-category-cell { grid-column: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: bold; color: #FFF; text-align: center; padding: 20px 5px; border-right: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; gap: 15px; }
.main-category-cell.blue-m { background-color: #112240; grid-row: span 6; }
.main-category-cell.red-m { background-color: #4A121A; grid-row: span 5; }
.main-category-cell.green-m { background-color: #0F2A1D; grid-row: span 5; border-bottom: none; }
.cat-vertical-text { writing-mode: vertical-rl; letter-spacing: 4px; font-size: 15px; }
.phase-vertical-text { writing-mode: vertical-rl; letter-spacing: 2px; font-size: 11px; color: #CBD5E0; font-weight: normal; background: rgba(255,255,255,0.1); padding: 8px 4px; border-radius: 4px; }

/* 中カテゴリ（絶対に折り返さない設定） */
.category-cell { padding: 15px; border-right: 1px solid #E2E8F0; background-color: #F8FAFC; display: flex; align-items: center; gap: 12px; text-align: left; white-space: nowrap; overflow: hidden; }
.category-icon-wrap { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #FFF; box-shadow: 0 2px 5px rgba(0,0,0,0.05); flex-shrink: 0; }
.category-icon-wrap svg { width: 22px; height: 22px; }
.category-text-wrap { display: flex; flex-direction: column; gap: 2px; }
.category-title { font-weight: bold; font-size: 13px; color: #1E293B; }

/* カードセル（施策マス） */
.card-cell { padding: 15px; border-right: 1px solid #E2E8F0; display: flex; flex-direction: column; justify-content: space-between; background: #FFF; gap: 12px; font-size: 12px; line-height: 1.5; cursor: pointer; transition: background 0.2s; min-width: 0; }
.card-cell p { word-break: break-all; }
.card-cell:hover { background-color: #F8FAFC; }
.card-cell:last-child { border-right: none; }

/* プロダクトボタンのカラー化＆スリム化 */
.product-btn { display: flex; align-items: center; justify-content: space-between; width: 120px; padding: 5px 8px; border: none; border-radius: 4px; font-size: 11px; font-weight: bold; color: #FFF; cursor: pointer; margin-top: auto; transition: opacity 0.2s; flex-shrink: 0; }
.product-btn:hover { opacity: 0.9; }
.product-btn::after { content: '>'; font-size: 9px; }
.card-cell.blue-btn-wrap .product-btn { background-color: #2B6CB0; }
.card-cell.orange-btn-wrap .product-btn { background-color: #C05621; }
.card-cell.green-btn-wrap .product-btn { background-color: #2F855A; }
.card-cell.purple-btn-wrap .product-btn { background-color: #6B46C1; }

/* モーダルウィンドウ */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-content { background: #FFF; width: 520px; max-width: 90%; max-height: 85vh; border-radius: 8px; padding: 30px 25px; display: flex; flex-direction: column; gap: 20px; overflow-y: auto; position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.15); transform: translateY(-20px); transition: transform 0.3s ease; }
.modal-overlay.open .modal-content { transform: translateY(0); }
.modal-close { position: absolute; top: 20px; right: 20px; font-size: 24px; cursor: pointer; color: #A0AEC0; border: none; background: none; line-height: 1; }
.tag-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.tag { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: bold; }
.tag.blue-tag { background-color: #EBF8FF; color: #2B6CB0; }
.tag.green-tag { background-color: #C6F6D5; color: #22543D; }
.modal-title { font-size: 18px; font-weight: bold; line-height: 1.4; color: #1A202C; }
.section-block { display: flex; flex-direction: column; gap: 8px; }
.section-title { font-weight: bold; font-size: 13px; color: #2D3748; border-bottom: 2px solid #E2E8F0; padding-bottom: 4px; }
.section-body { font-size: 13px; color: #4A5568; line-height: 1.6; }

/* モーダル内リスト (アコーディオン構造) */
.product-list { display: flex; flex-direction: column; gap: 8px; margin-top: 5px; }
.product-item-wrap {
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background-color: #F8FAFC;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.product-item-wrap:hover {
  border-color: #CBD5E0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.product-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  cursor: pointer;
  user-select: none;
  background-color: #F8FAFC;
  transition: background-color 0.2s;
}
.product-item-header:hover {
  background-color: #EDF2F7;
}
.product-info { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: bold; color: #2D3748; }
.product-num { width: 20px; height: 20px; background-color: #2B6CB0; color: #FFF; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; flex-shrink: 0; }
.arrow-r { color: #A0AEC0; font-size: 10px; transition: transform 0.2s ease; }

/* アコーディオンが開いている状態のスタイル */
.product-item-wrap.open {
  border-color: #CBD5E0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.product-item-wrap.open .product-item-header {
  background-color: #EDF2F7;
}
.product-item-wrap.open .arrow-r {
  transform: rotate(90deg); /* 矢印を右から下に回転 */
  color: #4A5568;
}

/* アコーディオン本体 */
.product-item-body {
  display: none; /* JSでslideToggle */
  padding: 15px;
  background-color: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  flex-direction: column;
  gap: 14px;
}
.product-desc-block {
  font-size: 13px;
  color: #4A5568;
  line-height: 1.6;
  /* white-space: pre-wrap; */
}

/* 取材時情報ブロック */
.shuzai-info-block {
  background-color: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shuzai-title {
  font-size: 11px;
  font-weight: bold;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 4px;
  margin-bottom: 2px;
}
.shuzai-row {
  display: flex;
  font-size: 12px;
  line-height: 1.5;
}
.shuzai-label {
  width: 80px;
  color: #718096;
  flex-shrink: 0;
}
.shuzai-value {
  color: #2D3748;
  font-weight: bold;
}
.shuzai-img-wrap {
  margin-top: 8px;
  max-width: 100%;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.shuzai-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.action-btn { background-color: #1A365D; color: #FFF; font-weight: bold; text-align: center; padding: 14px; border-radius: 6px; text-decoration: none; display: block; margin-top: 10px; box-shadow: 0 4px 6px rgba(26,54,93,0.1); }

/* 0件（無効）カードのスタイル */
.card-cell.disabled {
  background-color: #F8FAFC !important;
  opacity: 0.55;
  cursor: not-allowed;
}
.card-cell.disabled:hover {
  background-color: #F8FAFC !important;
}
.card-cell.disabled p {
  color: #718096;
}
.card-cell.disabled .product-btn {
  background-color: #A0AEC0 !important;
  color: #E2E8F0 !important;
  cursor: not-allowed;
  pointer-events: none;
}
.card-cell.disabled .product-count {
  color: #A0AEC0;
  font-size: 11px;
  margin-top: 4px;
}

/* モバイル環境用3段階プルダウンUIレスポンシブ定義 */
.bousai-mobile-container {
  display: none;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 15px;
}

@media (max-width: 768px) {
  /* body {
    padding: 15px 10px;
  } */
  .matrix-container {
    display: none !important;
  }
  .bousai-map-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    padding: 0 10px;
  }
  .bousai-map-header .header-tools {
    width: 100%;
    justify-content: space-between;
    flex-direction: column;
    gap:3px;
  }
  .bousai-mobile-container {
    display: block !important;
  }
}

/* モバイルセレクトボックス周り */
.bousai-mobile-form {
  background: #FFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}
.bousai-field-group {
  margin-bottom: 15px;
}
.bousai-field-group:last-child {
  margin-bottom: 0;
}
.bousai-field-group label {
  display: block;
  font-weight: bold;
  color: #2D3748;
  margin-bottom: 6px;
  font-size: 13px;
}
.bousai-select-wrap {
  position: relative;
  width: 100%;
}
.bousai-select-wrap select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  color: #2D3748;
  background-color: #FFF;
  border: 1px solid #CBD5E0;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bousai-select-wrap select:focus {
  border-color: #2B6CB0;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}
.bousai-select-wrap select:disabled {
  background-color: #EDF2F7;
  color: #A0AEC0;
  cursor: not-allowed;
}
.bousai-select-wrap::after {
  content: '▼';
  font-size: 10px;
  color: #718096;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* 特定された結果の表示 */
.bousai-mobile-result {
  min-height: 100px;
  display: flex;
  flex-direction: column;
}
.mobile-result-card {
  background: #FFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: fadeInResult 0.3s ease-out;
  border-left: 5px solid #2B6CB0;
}
.mobile-result-card.blue-border { border-left-color: #2B6CB0; }
.mobile-result-card.orange-border { border-left-color: #C05621; }
.mobile-result-card.green-border { border-left-color: #2F855A; }
.mobile-result-card.purple-border { border-left-color: #6B46C1; }

.mobile-result-header {
  font-size: 12px;
  color: #718096;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mobile-result-title {
  font-size: 16px;
  font-weight: bold;
  color: #1A202C;
  line-height: 1.4;
}
.mobile-result-btn-wrap {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 5px;
}
.mobile-result-btn-wrap .product-btn {
  width: 140px;
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* 結果カードのdisabled表現 */
.mobile-result-card.disabled {
  border-left-color: #CBD5E0;
  opacity: 0.65;
  cursor: not-allowed;
}
.mobile-result-card.disabled .mobile-result-title {
  color: #718096;
}
.mobile-result-card.disabled .product-btn {
  background-color: #A0AEC0 !important;
  color: #E2E8F0 !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* プレースホルダー表現 */
.mobile-result-placeholder {
  border: 2px dashed #E2E8F0;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  color: #A0AEC0;
  font-size: 14px;
}

@keyframes fadeInResult {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


