:root {
  --bg: #f5f0e8;
  --bg2: #fff8ee;
  --red: #d94f2b;
  --orange: #e87722;
  --yellow: #f5c842;
  --green: #2e8b57;
  --blue: #1a5fa8;
  --teal: #0d7377;
  --dark: #1a1a1a;
  --mid: #444;
  --light: #666;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--dark);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}

/* ヘッダー */
header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d1a00 60%, #8b2500 100%);
  color: #fff;
  padding: 20px 24px 16px;
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 30px,
    rgba(255,100,0,0.04) 30px,
    rgba(255,100,0,0.04) 60px
  );
}
.header-inner { position: relative; z-index: 1; }
.header-year {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px;
  letter-spacing: 4px;
  color: var(--orange);
  margin-bottom: 6px;
}
header h1 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 6px;
}
header h1 span { color: var(--orange); }
.header-sub {
  font-size: 15px;
  color: #ddd;
}

/* メインレイアウト */
main { padding: 16px; max-width: 1100px; margin: 0 auto; }

/* セクション */
.section-title {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  background: var(--dark);
  padding: 7px 14px;
  margin: 18px 0 10px;
  border-left: 5px solid var(--orange);
  letter-spacing: 1px;
}
.section-future {
  margin-top: 24px;
  background: linear-gradient(90deg, #0d3b6b, #1a5fa8);
  border-left-color: var(--yellow);
}
.section-japan {
  background: linear-gradient(90deg, #2e5e2e, #1a6637);
  border-left-color: var(--yellow);
}

/* 映画サマリーバー */
.movie-bar {
  background: linear-gradient(90deg, #2d1a00, #5a2d00);
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.movie-bar .mb-item { text-align: center; }
.movie-bar .mb-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  color: var(--yellow);
  line-height: 1.1;
}
.movie-bar .mb-label { font-size: 14px; color: #ddd; }
.movie-bar .mb-divider { width: 1px; background: rgba(255,255,255,0.2); height: 44px; }
.movie-bar .mb-desc { font-size: 16px; font-weight: 700; flex: 1; min-width: 200px; line-height: 1.6; }

/* グリッド */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media(max-width: 700px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* カード */
.card {
  background: var(--bg2);
  border-radius: 8px;
  padding: 12px 14px;
  border: 1.5px solid #e0d8cc;
  position: relative;
}
.card-title {
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-icon { font-size: 20px; }
.card-text { font-size: 16px; font-weight: 700; line-height: 1.6; }

/* 比較テーブル */
.table-wrap { overflow-x: auto; overscroll-behavior-x: none; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.compare-table th {
  background: var(--dark);
  color: #fff;
  padding: 7px 10px;
  font-size: 15px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}
.compare-table th.col-2006 { background: #2e5e8a; }
.compare-table th.col-2024 { background: #8b2500; }
.compare-table th.th-blue { background: #0d2a50; }
.compare-table th.th-red { background: #5a1500; }
.compare-table td { padding: 6px 10px; border-bottom: 1px solid #e0d8cc; font-weight: 700; }
.compare-table tr:nth-child(even) td { background: #f0ebe0; }
.val-2006 { color: #2e5e8a; }
.val-2024 { color: var(--red); }
.val-scenario-a { color: var(--blue); font-weight: 900; }
.val-scenario-b { color: var(--red); font-weight: 900; }
.note { font-size: 14px; font-weight: 700; color: var(--light); }

/* ステータスバッジ */
.badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 900;
  padding: 2px 9px;
  border-radius: 20px;
  vertical-align: middle;
  white-space: nowrap;
}
.badge-red { background: var(--red); color: #fff; }
.badge-orange { background: var(--orange); color: #fff; }
.badge-green { background: var(--green); color: #fff; }
.badge-blue { background: var(--blue); color: #fff; }

/* 指標ボックス */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
@media(max-width: 700px) { .kpi-grid { grid-template-columns: repeat(2,1fr); } }
.kpi-box {
  background: var(--dark);
  color: #fff;
  border-radius: 8px;
  padding: 12px 10px 10px;
  text-align: center;
}
.kpi-box .kpi-icon { font-size: 24px; margin-bottom: 2px; }
.kpi-box .kpi-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px;
  line-height: 1.1;
  color: var(--yellow);
}
.kpi-box .kpi-unit { font-size: 14px; color: #bbb; margin-bottom: 4px; line-height: 1.4; }
.kpi-box .kpi-label { font-size: 14px; color: #eee; font-weight: 700; line-height: 1.4; }

/* チャートコンテナ */
.chart-wrap {
  position: relative;
  background: var(--bg2);
  border-radius: 8px;
  padding: 12px 14px;
  border: 1.5px solid #e0d8cc;
}
.chart-standalone { margin: 10px 0; }
.chart-title {
  font-size: 17px;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--dark);
}
.chart-canvas-wrap { position: relative; height: 220px; }
.chart-canvas-wrap.tall { height: 260px; }

/* 大きな円グラフ */
.pie-big { height: 320px; }

/* タイムライン */
.timeline { list-style: none; position: relative; padding-left: 20px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue), var(--red));
}
.timeline li {
  position: relative;
  padding: 5px 0 5px 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--bg);
}
.tl-year {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 19px;
  color: var(--red);
  margin-right: 6px;
}

/* 警告バー */
.warn-bar {
  background: linear-gradient(90deg, var(--red), #b03820);
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 希望セクション */
.hope-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
@media(max-width:700px) { .hope-grid { grid-template-columns: 1fr; } }
.hope-box {
  background: linear-gradient(135deg, #0a3d1f, #1a6637);
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
}
.hope-box .h-icon { font-size: 22px; margin-bottom: 4px; }
.hope-box .h-title { font-size: 17px; font-weight: 900; margin-bottom: 4px; }
.hope-box .h-text { font-size: 15px; color: #d8ffe6; line-height: 1.55; }

/* まとめ（過去） */
.summary-box {
  background: linear-gradient(90deg, #1a1a1a, #3d1a00);
  color: #fff;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 14px;
}
.summary-title { font-size: 18px; font-weight: 900; margin-bottom: 8px; color: var(--yellow); }
.summary-text { font-size: 16px; font-weight: 700; color: #f0f0f0; line-height: 1.75; }

/* シナリオ */
.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media(max-width:700px) { .scenario-grid { grid-template-columns: 1fr; } }
.scenario-box { color: #fff; border-radius: 8px; padding: 12px 14px; }
.scenario-a { background: linear-gradient(135deg, #1a3a6b, #0d2a50); }
.scenario-b { background: linear-gradient(135deg, #6b1a1a, #501a0d); }
.scenario-title { font-size: 17px; font-weight: 900; margin-bottom: 5px; }
.scenario-a .scenario-title { color: #9fd8ff; }
.scenario-b .scenario-title { color: #ffc4b0; }
.scenario-text { font-size: 15px; line-height: 1.65; }
.scenario-a .scenario-text { color: #d8ecff; }
.scenario-b .scenario-text { color: #ffe0d6; }

/* 未来予測カード */
.future-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media(max-width:700px) { .future-grid { grid-template-columns: 1fr; } }
.future-card {
  background: var(--bg2);
  border-radius: 8px;
  overflow: hidden;
}
.future-2035 { border: 2px solid var(--blue); }
.future-2045 { border: 2px solid #8b2500; }
.future-head { color: #fff; padding: 9px 14px; font-size: 18px; font-weight: 900; }
.future-2035 .future-head { background: var(--blue); }
.future-2045 .future-head { background: #8b2500; }
.future-body { padding: 10px 14px; }

/* ティッピングポイント */
.tipping-box {
  background: linear-gradient(135deg, #2d0a3d, #1a0a2e);
  color: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0;
}
.tipping-title { font-size: 18px; font-weight: 900; color: #e0a0ff; margin-bottom: 10px; }
.tipping-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
@media(max-width:700px) { .tipping-grid { grid-template-columns: 1fr; } }
.tipping-item { background: rgba(255,255,255,0.07); border-radius: 6px; padding: 10px 12px; }
.tp-title { font-size: 16px; font-weight: 900; color: #ffcc80; }
.tp-text { font-size: 15px; color: #e6e6e6; margin-top: 3px; line-height: 1.55; }

/* 最終まとめ */
.final-box {
  background: linear-gradient(90deg, #0d3b1f, #1a6637);
  color: #fff;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 6px;
}
.final-title { font-size: 18px; font-weight: 900; margin-bottom: 8px; color: #a8ffcc; }
.final-text { font-size: 16px; font-weight: 700; color: #e8ffee; line-height: 1.75; }

/* フッター */
footer {
  background: var(--dark);
  color: #bbb;
  text-align: center;
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 20px;
}
footer a { color: #ddd; }
