/* ==========================================================================
   プロパンガス料金見直しのススメ - 共通スタイルシート
   完全スマホファースト・エネルギー家計見直しデザイン（幅375px完全適合）
   ========================================================================== */

:root {
  --primary: #047857;          /* 安心・省エネのエメラルドグリーン */
  --primary-dark: #064e3b;     /* ディープフォレストグリーン */
  --primary-light: #0284c7;    /* クリーンガスブルー */
  --primary-bg: #ecfdf5;       /* 淡いエメラルド背景 */
  --accent: #ea580c;           /* 切り替え・お得のビビッドオレンジ */
  --accent-hover: #c2410c;
  --text-main: #0f172a;        /* 本文ダークスレート */
  --text-muted: #475569;       /* 補足グレー */
  --border-color: #cbd5e1;     /* 境界線 */
  --bg-page: #f8fafc;          /* 全体背景 */
  --bg-card: #ffffff;          /* カード背景 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  color: var(--text-main);
  background-color: var(--bg-page);
  word-break: break-word;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* 景品表示法対応 PR表記バー */
.ad-disclosure-bar {
  background-color: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 6px 12px;
}

/* ヘッダー */
.site-header {
  background: #ffffff;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1020px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo a {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.site-logo span {
  background: linear-gradient(135deg, #047857 0%, #064e3b 100%);
  color: #fff;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  white-space: nowrap;
}

.site-nav ul {
  display: flex;
  gap: 12px;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
}

.site-nav a {
  color: var(--text-main);
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.site-nav a:hover {
  background-color: var(--primary-bg);
  color: var(--primary);
  text-decoration: none;
}

/* モバイルヘッダー（2段ピル型横スクロール） */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 12px;
    gap: 6px;
  }
  .site-logo {
    width: 100%;
  }
  .site-logo a {
    font-size: 15px;
    width: 100%;
    justify-content: space-between;
  }
  .site-logo span {
    font-size: 10px;
  }
  .site-nav {
    width: 100%;
  }
  .site-nav ul {
    width: 100%;
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 2px 0 4px;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .site-nav ul::-webkit-scrollbar {
    display: none;
  }
  .site-nav li {
    flex-shrink: 0;
  }
  .site-nav a {
    display: inline-block;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    color: #334155;
    white-space: nowrap;
  }
}

/* メインレイアウト */
.container {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 16px;
}

.main-content {
  padding: 20px 0 60px;
}

.article-body {
  background: var(--bg-card);
  padding: 28px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 640px) {
  .article-body {
    padding: 18px 14px;
  }
}

/* ヒーローバナー */
.hero-banner {
  background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
  color: #ffffff;
  padding: 28px 24px;
  border-radius: var(--radius-md);
  margin-bottom: 28px;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.15);
}

.hero-banner .badge {
  display: inline-block;
  background: #f59e0b;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.hero-banner h1 {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 12px;
  color: #ffffff;
}

.hero-lead {
  font-size: 14.5px;
  line-height: 1.7;
  color: #e2e8f0;
  margin-bottom: 18px;
}

.btn {
  display: inline-block;
  text-align: center;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #ffffff !important;
  padding: 12px 24px;
  font-size: 15px;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(234, 88, 12, 0.45);
}

@media (max-width: 640px) {
  .hero-banner {
    padding: 20px 14px;
  }
  .hero-banner h1 {
    font-size: 19px !important;
  }
  .hero-lead {
    font-size: 13.5px !important;
  }
  .btn-primary {
    width: 100% !important;
    display: block !important;
    padding: 12px 14px !important;
  }
}

/* ダイレクトアンサー枠 */
.direct-answer-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-left: 4px solid #047857;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 18px;
  margin: 20px 0 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.direct-answer-title {
  font-weight: 700;
  color: #064e3b;
  font-size: 1rem;
  margin-bottom: 8px;
}

.direct-answer-lead {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1e293b;
  margin-bottom: 10px;
}

.direct-answer-points ul {
  margin: 0;
  padding-left: 18px;
}

.direct-answer-points li {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #334155;
  margin-bottom: 6px;
}

/* セクション設定 */
.section-box {
  margin-bottom: 36px;
}

.section-box h2 {
  font-size: 21px;
  color: #064e3b;
  border-left: 5px solid #047857;
  padding: 6px 14px;
  margin: 32px 0 16px;
  background: var(--primary-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.section-box h3 {
  font-size: 17px;
  color: #1e293b;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 6px;
  margin: 24px 0 12px;
}

.section-box p {
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.75;
}

@media (max-width: 640px) {
  .section-box h2 {
    font-size: 18px !important;
  }
}

/* ==========================================================================
   プロパンガス固有 1分検針票セルフ診断ウィジェット
   ========================================================================== */
.diagnosis-widget {
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  border: 2px solid #047857;
  border-radius: var(--radius-md);
  padding: 24px 20px;
  margin: 28px 0;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.08);
}

.diagnosis-widget-header {
  text-align: center;
  margin-bottom: 20px;
}

.diagnosis-badge {
  display: inline-block;
  background: #047857;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.diagnosis-title {
  font-size: 20px;
  font-weight: 800;
  color: #064e3b;
  margin-bottom: 6px;
}

.diagnosis-desc {
  font-size: 13.5px;
  color: #047857;
}

.diag-step {
  margin-bottom: 16px;
  background: #ffffff;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
}

.diag-step-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
  display: block;
}

.diag-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.diag-opt {
  display: block;
  position: relative;
  cursor: pointer;
}

.diag-opt input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.diag-opt-text {
  display: block;
  text-align: center;
  padding: 10px 8px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  transition: all 0.2s;
}

.diag-opt input:checked ~ .diag-opt-text {
  background: #ecfdf5;
  border-color: #047857;
  color: #064e3b;
  font-weight: 700;
}

.diag-result-area {
  margin-top: 20px;
  padding: 18px;
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 2px dashed #047857;
  text-align: center;
  display: block;
}

.diag-result-val {
  font-size: 24px;
  font-weight: 800;
  color: #ea580c;
  margin: 6px 0;
}

.diag-result-route {
  font-size: 14px;
  font-weight: 700;
  color: #047857;
  margin-bottom: 12px;
}

@media (max-width: 640px) {
  .diagnosis-widget {
    padding: 16px 12px !important;
    margin: 20px 0 !important;
  }
  .diagnosis-title {
    font-size: 17px !important;
  }
  .diag-options {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .diag-opt-text {
    padding: 12px 14px !important;
    font-size: 14px !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .diag-result-val {
    font-size: 21px !important;
  }
}

/* ==========================================================================
   横スクロール比較マトリクス表 (.ew-matrix-*)
   ========================================================================== */
.ew-matrix-wrapper {
  margin: 28px 0 36px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.ew-matrix-header-box {
  background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
  color: #ffffff;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ew-matrix-title {
  font-size: 16px;
  font-weight: 700;
}

.ew-matrix-scroll-hint {
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
}

.ew-matrix-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ew-matrix-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.ew-matrix-table th,
.ew-matrix-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.ew-matrix-table thead th {
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
}

.ew-matrix-table tbody tr:hover {
  background-color: #f0fdf4;
}

.ew-col-sticky {
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 2;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  font-weight: 700;
  width: 136px;
  min-width: 136px;
  max-width: 136px;
  padding: 10px 8px;
  overflow: hidden;
}

.ew-matrix-table thead th.ew-col-sticky {
  background: #f1f5f9;
  z-index: 3;
}

.ew-agent-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.ew-agent-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.ew-badge-gold { background: #fef3c7; color: #b45309; }
.ew-badge-silver { background: #f1f5f9; color: #475569; }
.ew-badge-bronze { background: #ffedd5; color: #c2410c; }

.ew-btn-table-cta {
  display: inline-block;
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none !important;
  white-space: nowrap;
}

/* CTAボタン共通スタイル */
.ttp-btn {
  display: inline-block;
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 8px;
  text-decoration: none !important;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.35);
  text-align: center;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  white-space: nowrap;
}

.ttp-btn:hover {
  background: linear-gradient(135deg, #d97706 0%, #9a3412 100%);
  transform: translateY(-2px);
}

/* フッター */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 32px 0 20px;
  font-size: 13px;
  border-top: 3px solid #047857;
}

.footer-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
}

.copyright {
  color: #64748b;
  font-size: 12px;
}
