@charset "UTF-8";

html {
  font-size: 100%;
}
/*
フッターを画面下に配置するために、
「position: relative;」を設定
「min-height」で最小の高さを画面の高さにあわせる
*/
body {
  max-width: 100%;
  font-family: 'Noto Sans', 'Noto Sans JP', sans-serif;
  background: #FFFFFF;
  margin: 0;
}

a {
  color: #000;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
  vertical-align: bottom;
}

li {
  list-style: none;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* 画面全体の高さを確保 */
}

/*-------------------------------
header
-------------------------------*/
.header {
  height: 150px;
}

.header .header-title {
  display: flex; /* 横並びにする */
  align-items: center; /* 縦位置を中央に揃える */
  justify-content: space-between; /* 両端に配置 */
  padding: 0 100px;
  background: linear-gradient(95.09deg, #8CECCC 0%, #5397CB 97.88%);
}
.header .site-title {
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
}

.header .header-title-image {
  width: auto; /* お好みでサイズ調整 */
  height: 120px;
  margin: 15px 0;
}

.container {
  display: flex;
  /* コンテンツが少ない時でも、ヘッダーとフッターの高さを引いた100vhで表示するようにする */
  flex: 1;
}

/*-------------------------------
サイドバー
-------------------------------*/

.sidebar {
  width: 200px;
  background-color: #eaf5ff;
  padding: 20px;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar-menu {
  background-color: #eaf5ff;
  max-width: 240px;
  font-family: sans-serif;
}

/*-------------------------------
合わせて見たい指標（サイドバー）
-------------------------------*/
.sidebar-related {
  background-color: #f0f8ff;
  border-left: 3px solid #5397cb;
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.sidebar-related-title {
  font-size: 13px;
  font-weight: bold;
  color: #3b85c3;
  margin: 0 0 8px 0;
}

.sidebar-related-list {
  margin: 0;
  padding: 0;
}

.sidebar-related-list li {
  margin-bottom: 5px;
}

.sidebar-related-list li a {
  font-size: 13px;
  color: #3b85c3;
  text-decoration: none;
  line-height: 1.4;
}

.sidebar-related-list li a:hover {
  text-decoration: underline;
}

.sidebar-calendar-link {
  display: block;
  color: #3b85c3;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  padding-left: 1.2em;
  margin-bottom: 15px;
}

.sidebar-calendar-link:hover {
  text-decoration: underline;
}

.menu-details {
  margin-bottom: 15px;
}

.menu-details summary {
  font-weight: bold;
  font-size: 16px;
  color: #3b85c3;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-left: 1.2em;
}

.menu-details summary::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: #3b85c3;
  transition: transform 0.2s ease;
}

/* 開いたときは矢印を下向きに */
.menu-details details[open] summary::before {
  content: "▼";
}

.menu-details ul {
  margin: 5px 0 0 1.5em;
  padding: 0;
  list-style: none;
}

.menu-details ul li a {
  color: #3b85c3;
  margin: 4px 0;
}

.sidebar-group-label {
  font-size: 11px;
  color: #888;
  font-weight: bold;
  letter-spacing: 0.05em;
  margin: 8px 0 2px 0;
  list-style: none;
}


/*-------------------------------
main/グラフ
-------------------------------*/
.main {
  flex: 1;
}

/*-------------------------------
この指標の読み方（全ページ共通）
-------------------------------*/
.how-to-read {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-left: 4px solid #0284c7;
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 16px 0 24px;
}

.how-to-read h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.how-to-read p {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #334155;
  margin: 0;
}

.latest-trend {
  display: inline-block;
  background: #0284c7;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-top: 10px;
}

/*-------------------------------
データ更新日時（全ページ共通）
-------------------------------*/
.data-timestamp {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 15px 20px;
  margin: 20px 0 25px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  position: relative;
  overflow: hidden;
}

.data-timestamp::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.timestamp-content {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.timestamp-icon {
  font-size: 1.2em;
  margin-right: 5px;
}

.timestamp-label {
  font-size: 0.95em;
  opacity: 0.9;
}

.timestamp-value {
  font-size: 1.05em;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/*-------------------------------
チャートセクション（全ページ共通）
-------------------------------*/
.chart-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-container {
  width: 100%;
  height: 700px;
  max-height: 1000px;
}

/*-------------------------------
コンテンツエリア（全ページ共通）
-------------------------------*/
.content {
  padding: 30px;
  background-color: #fafafa;
  min-height: calc(100vh - 200px);
}

/*-------------------------------
Xシェアボタン
-------------------------------*/
.x-share-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px 20px;
}

.x-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #000;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.x-share-btn:hover {
  background: #333;
  color: #fff;
}

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

/*-------------------------------
footer
-------------------------------*/
.footer {
  padding: 40px 20px 20px;
  background: linear-gradient(135deg, #5294c6 0%, #3b85c3 100%);
  color: white;
  text-align: center;
  margin-top: auto;
}

.footer-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 15px 0;
  letter-spacing: 0.5px;
}

.footer-links {
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  display: inline-block;
  margin: 0 5px;
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: white;
}

/* フッターコンテンツのレイアウト */
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.footer-social {
  margin: 0;
  padding: 0;
}

/* Xリンクのスタイル */
.x-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.x-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: white;
}

.x-logo {
  width: 18px;
  height: 18px;
  filter: brightness(1);
  transition: all 0.3s ease;
}

.x-link:hover .x-logo {
  filter: brightness(1.2);
  transform: scale(1.1);
}

.x-text {
  font-weight: 500;
  letter-spacing: 0.3px;
}

.hamburger-icon {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: white;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 70%;
  height: 100%;
  background-color: #eaf5ff;
  z-index: 2000;
  transition: right 0.3s ease-in-out;
  padding: 1em;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.open {
  right: 0;
}

.close-button {
  font-size: 24px;
  cursor: pointer;
  text-align: right;
  margin-bottom: 1em;
}

/* 表示・非表示用クラス */
.sidebar-hide {
  transform: translateY(-100%);
}
.sidebar-show {
  transform: translateY(0);
}


/*-------------------------------
indicator-explanation / indicator-title（全ページ共通）
-------------------------------*/
.indicator-explanation {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.indicator-title {
  color: #2c3e50;
  font-size: 1.8em;
  font-weight: 600;
  margin-bottom: 20px;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
}

/*-------------------------------
explanation-summary（全ページ共通）
-------------------------------*/
.explanation-summary {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #3498db;
  margin-bottom: 25px;
}

.explanation-summary p {
  color: #555;
  font-size: 1.1em;
  line-height: 1.7;
  margin: 0;
}

/*-------------------------------
explanation-details / detail-item（全ページ共通）
-------------------------------*/
.explanation-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  align-items: start;
}

.detail-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.detail-item:hover {
  background: #e3f2fd;
  border-color: #3498db;
  transform: translateY(-2px);
}

.detail-item h3 {
  color: #2c3e50;
  font-size: 1.1em;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.detail-item p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/*-------------------------------
notation（全ページ共通）
-------------------------------*/
.notation {
  text-align: center;
  padding: 20px;
  background: white;
  border-radius: 8px;
  margin-top: 20px;
}

.notation p {
  color: #666;
  font-size: 0.9em;
  margin: 0;
}

/*-------------------------------
関連する経済指標（全ページ共通）
-------------------------------*/
.related-indicators {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.related-indicators h2 {
  color: #2c3e50;
  font-size: 1.5em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 25px;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
}

.indicator-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.indicator-link {
  display: block;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.indicator-link:hover {
  background: #e3f2fd;
  border-color: #3498db;
  transform: translateY(-2px);
}

.link-title {
  display: block;
  font-weight: 600;
  color: #2c3e50;
  font-size: 1.1em;
  margin-bottom: 5px;
}

.link-desc {
  display: block;
  color: #666;
  font-size: 0.9em;
  line-height: 1.4;
}

/*-------------------------------
データ活用ガイド（全ページ共通）
-------------------------------*/
.usage-guide {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.usage-guide h2 {
  color: #2c3e50;
  font-size: 1.5em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 25px;
  border-bottom: 3px solid #3498db;
  padding-bottom: 10px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.guide-item {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.guide-item:hover {
  background: #e3f2fd;
  border-color: #3498db;
  transform: translateY(-2px);
}

.guide-item h3 {
  color: #2c3e50;
  font-size: 1.1em;
  font-weight: 600;
  margin: 0 0 10px 0;
}

.guide-item p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

/*-------------------------------
テーブルセクション（全ページ共通）
-------------------------------*/
.table-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.table-section h2 {
  color: #2c3e50;
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 15px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
}

.table-controls {
  margin-bottom: 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.compact-select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  color: #333;
  font-size: 13px;
  min-width: 140px;
  transition: border-color 0.2s ease;
}

.compact-select:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.table-container {
  overflow-x: auto;
  border: 1px solid #e1e5e9;
  border-radius: 4px;
  max-height: 500px;
  overflow-y: auto;
}

.compact-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 14px;
  line-height: 1.5;
  font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
}

.compact-table thead {
  background: #f8f9fa;
  color: #495057;
  position: sticky;
  top: 0;
  z-index: 10;
}

.compact-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid #dee2e6;
  border-right: 1px solid #dee2e6;
}

.compact-table th:last-child {
  border-right: none;
}

.year-col { width: 80px; }
.category-col { width: auto; }
.value-col {
  width: 100px;
  text-align: right;
}
.rate-col {
  width: 90px;
  text-align: right;
}

.compact-table tbody tr {
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.15s ease;
}

.compact-table tbody tr:hover {
  background-color: #f8f9fa;
}

.compact-table tbody tr:nth-child(even) {
  background-color: #fdfdfd;
}

.compact-table td {
  padding: 6px 12px;
  color: #333;
  border-right: 1px solid #f1f3f4;
  vertical-align: middle;
}

.compact-table td:last-child {
  border-right: none;
}

.year-cell {
  font-weight: 500;
  color: #495057;
  text-align: center;
}

.category-cell {
  color: #333;
  font-size: 13px;
}

.value-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: #2c3e50;
}

.rate-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.rate-value {
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  min-width: 40px;
}

.rate-value.positive {
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}

.rate-value.negative {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.rate-na {
  color: #95a5a6;
  font-style: italic;
}

.compact-table tbody tr.hidden {
  display: none;
}

@media screen and (max-width: 480px) {
  .explanation-summary {
    padding: 15px;
  }

  .indicator-explanation,
  .usage-guide,
  .chart-section,
  .related-indicators,
  .table-section,
  .data-source-section {
    padding: 15px;
  }

  .indicator-title {
    font-size: 1.2em;
  }

  .content {
    padding: 10px;
  }

  .detail-item,
  .guide-item {
    padding: 15px;
  }

  .chart-container {
    height: 50vh;
  }

  .compact-table {
    font-size: 12px;
  }

  .compact-table th,
  .compact-table td {
    padding: 8px 6px;
  }
}

/* スマホ対応 */

@media screen and (max-width: 768px) {
  .hamburger-icon {
    display: block;
  }

  .header-title-image {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    background-color: #eaf5ff;
    transform: translateX(-100%);
    z-index: 1000;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .container {
    flex-direction: column;
  }

  /* モバイル用フッター調整 */
  .footer-content {
    gap: 12px;
  }

  .x-link {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .x-text {
    letter-spacing: 0.2px;
  }

  .x-logo {
    width: 16px;
    height: 16px;
  }

  .main {
    width: 100%;
  }

  .content {
    padding: 15px;
  }

  .how-to-read {
    padding: 16px 18px;
  }

  .how-to-read h2 {
    font-size: 1rem;
  }

  .how-to-read p {
    font-size: 0.9rem;
  }

  .data-timestamp {
    padding: 12px 15px;
    margin: 16px 0 20px;
  }

  .timestamp-content {
    gap: 8px;
    font-size: 0.9em;
  }

  .timestamp-icon {
    font-size: 1.1em;
  }

  .timestamp-value {
    font-size: 0.95em;
    padding: 3px 10px;
  }

  .indicator-explanation,
  .chart-section,
  .usage-guide,
  .related-indicators,
  .data-source-section {
    padding: 20px;
    margin-bottom: 20px;
  }

  .chart-container {
    height: 60vh;
  }

  .indicator-title {
    font-size: 1.4em;
  }

  .explanation-details,
  .guide-grid,
  .indicator-links {
    grid-template-columns: 1fr;
    gap: 15px;
    align-items: start;
  }

  .table-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .compact-select {
    min-width: auto;
    width: 100%;
  }

  .filter-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
  }

  .header {
  height: 60px;
  }

  .header .header-title {
  flex-direction: row; /* ← 重要 */
  align-items: center;
  justify-content: space-between;
  padding: 0 1em;
  }

  .site-title {
    font-size: 1.5rem;
    white-space: nowrap; /* ← 改行させない */
  }
}