/* ============================
   原っぱマーケット2026 分析レポート
   共通スタイルシート v2
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
  --green-dark: #2d6a4f;
  --green-mid: #40916c;
  --green-light: #52b788;
  --green-pale: #d8f3dc;
  --green-bg: #f0faf3;

  /* ハイライトカラー（スプシの紫・ピンク強調に対応） */
  --pink: #d63384;
  --pink-pale: #fdf0f7;
  --purple: #6f42c1;
  --purple-pale: #f3effe;
  --pink-strong: #e91e8c;

  --terra: #bc6c25;
  --terra-pale: #fdf3e7;
  --blue-accent: #1d6fa4;
  --blue-pale: #e8f4fd;
  --red-warn: #c0392b;
  --red-pale: #fdf0ef;
  --yellow: #f4a261;

  --gray-dark: #1a1a2e;
  --gray-mid: #555770;
  --gray-light: #8d8fa6;
  --gray-border: #e4e6f0;
  --gray-bg: #f8f9fc;
  --white: #ffffff;

  --shadow: 0 2px 12px rgba(0,0,0,0.07);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.13);
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  background: var(--gray-bg);
  color: var(--gray-dark);
  line-height: 1.8;
  font-size: 15px;
}

/* ---- Layout ---- */
.page-wrapper {
  display: grid;
  grid-template-columns: 250px 1fr;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

/* ---- Top Nav ---- */
.top-nav {
  grid-column: 1 / -1;
  background: var(--green-dark);
  color: white;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 54px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.top-nav .logo {
  font-weight: 700;
  font-size: 13px;
  color: var(--green-pale);
  text-decoration: none;
  white-space: nowrap;
}
.top-nav .nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin-left: auto;
  flex-wrap: wrap;
}
.top-nav .nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.2s;
}
.top-nav .nav-links a:hover,
.top-nav .nav-links a.active {
  background: rgba(255,255,255,0.18);
  color: white;
}

/* ---- Sidebar ---- */
.sidebar {
  background: var(--white);
  border-right: 1px solid var(--gray-border);
  padding: 20px 0;
  position: sticky;
  top: 54px;
  height: calc(100vh - 54px);
  overflow-y: auto;
}
.sidebar-section { padding-bottom: 12px; }
.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 18px 5px;
}
.sidebar a {
  display: block;
  padding: 7px 18px;
  color: var(--gray-mid);
  text-decoration: none;
  font-size: 12.5px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  line-height: 1.5;
}
.sidebar a:hover { color: var(--green-dark); background: var(--green-bg); border-left-color: var(--green-light); }
.sidebar a.active { color: var(--green-dark); background: var(--green-bg); border-left-color: var(--green-dark); font-weight: 700; }

/* ---- Main Content ---- */
.main-content { padding: 36px 44px 80px; max-width: 940px; }

/* ---- Page Header ---- */
.page-header {
  margin-bottom: 36px;
  padding: 36px 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 60%, #40916c 100%);
  color: white;
}
.page-header .tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  letter-spacing: 0.12em;
}
.page-header h1 { font-size: 32px; font-weight: 900; color: white; margin-bottom: 0; line-height: 1.25; }
.page-header .meta { font-size: 13px; color: rgba(255,255,255,0.7); display: flex; gap: 20px; flex-wrap: wrap; }

/* ---- Summary Box ---- */
.summary-box {
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 60%, #40916c 100%);
  color: white;
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-bottom: 36px;
}
.summary-box .label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; opacity: 0.65; margin-bottom: 8px; }
.summary-box .text { font-size: 16px; font-weight: 500; line-height: 1.75; }

/* ライト版サマリーボックス（TOPページ用） */
.summary-box.summary-box-light {
  background: var(--white);
  color: var(--gray-dark);
  border: 1.5px solid var(--green-pale);
  border-left: 5px solid var(--green-mid);
  box-shadow: var(--shadow);
}
.summary-box.summary-box-light .label {
  color: var(--green-dark);
  opacity: 1;
  font-size: 10px;
}
.summary-box.summary-box-light .text {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-dark);
  line-height: 1.7;
}

/* ---- Sections ---- */
.section { margin-bottom: 52px; }

.section-title {
  font-size: 19px;
  font-weight: 900;
  color: var(--green-dark);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-pale);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .num {
  background: var(--green-dark);
  color: white;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}

/* ★ 小見出し（各セクションの分析サマリー） */
.section-subtitle {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 20px;
  padding: 8px 14px;
  background: var(--green-bg);
  border-left: 3px solid var(--green-mid);
  border-radius: 0 6px 6px 0;
  line-height: 1.6;
}

.subsection { margin-bottom: 32px; }
.subsection-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.subsection-title::before {
  content: '';
  width: 4px; height: 16px;
  background: var(--green-light);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ---- Highlight text （スプシの紫・ピンク強調に対応） ---- */
.hl-pink {
  color: var(--pink);
  font-weight: 900;
}
.hl-purple {
  color: var(--purple);
  font-weight: 900;
}
.hl-green {
  color: var(--green-dark);
  font-weight: 900;
}

/* ---- Big Stats ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-mid), var(--green-light));
}
.stat-card.pink-accent::before { background: linear-gradient(90deg, var(--pink), var(--purple)); }
.stat-card.purple-accent::before { background: linear-gradient(90deg, var(--purple), #9b59b6); }

.stat-card .stat-value {
  font-size: 38px;
  font-weight: 900;
  color: var(--green-dark);
  line-height: 1.1;
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}
.stat-card.pink-accent .stat-value { color: var(--pink); }
.stat-card.purple-accent .stat-value { color: var(--purple); }

.stat-card .stat-label { font-size: 12px; color: var(--gray-mid); line-height: 1.5; }
.stat-card .stat-sub { font-size: 11px; color: var(--gray-light); margin-top: 5px; }

/* ---- Finding Cards ---- */
.finding-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.finding-card .card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.finding-card .card-num {
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 11px; font-weight: 700;
  padding: 2px 9px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.finding-card .card-title { font-size: 14.5px; font-weight: 700; color: var(--gray-dark); }
.finding-card .card-body {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  font-size: 13.5px;
}
.finding-card.full-width .card-body { grid-template-columns: 1fr; }
.finding-card.two-col .card-body { grid-template-columns: 1fr 1fr; }
.finding-card .card-col-label { font-size: 10.5px; font-weight: 700; color: var(--gray-light); letter-spacing: 0.06em; margin-bottom: 4px; }
.finding-card .card-col-content { color: var(--gray-dark); line-height: 1.75; }

/* ---- Bar Chart ---- */
.bar-chart { margin: 16px 0; }
.bar-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-item .bar-label { font-size: 12.5px; color: var(--gray-mid); width: 190px; flex-shrink: 0; text-align: right; line-height: 1.4; }
.bar-item .bar-track {
  flex: 1;
  background: var(--gray-border);
  border-radius: 6px;
  height: 28px;
  position: relative;
  overflow: hidden;
}
.bar-item .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-mid), var(--green-light));
  border-radius: 6px;
  display: flex; align-items: center;
  padding-left: 10px;
}
.bar-item .bar-fill.pink { background: linear-gradient(90deg, var(--pink), #f06292); }
.bar-item .bar-fill.purple { background: linear-gradient(90deg, var(--purple), #9b59b6); }
.bar-item .bar-fill.terra { background: linear-gradient(90deg, var(--terra), var(--yellow)); }
.bar-item .bar-fill.red { background: linear-gradient(90deg, #c0392b, #e74c3c); }
.bar-item .bar-pct { font-size: 14px; font-weight: 900; color: var(--gray-dark); width: 55px; flex-shrink: 0; }
.bar-item .bar-pct.pink { color: var(--pink); }
.bar-item .bar-pct.purple { color: var(--purple); }

/* ---- Funnel ---- */
.funnel { display: flex; flex-direction: column; align-items: center; margin: 24px auto; max-width: 480px; }
.funnel-step { width: 100%; text-align: center; padding: 16px 20px; color: white; font-weight: 700; }
.funnel-step .f-label { font-size: 12px; opacity: 0.8; margin-bottom: 4px; }
.funnel-step .f-value { font-size: 28px; font-weight: 900; }
.funnel-step .f-sub { font-size: 12px; opacity: 0.75; margin-top: 2px; }
.funnel-arrow { font-size: 17px; color: var(--gray-light); margin: -1px 0; }

/* ---- Table ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 14px 0;
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.data-table th {
  background: var(--green-dark);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.04em;
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-border);
  color: var(--gray-dark);
  vertical-align: top;
  line-height: 1.65;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--gray-bg); }
.data-table .good { color: var(--green-mid); font-weight: 700; }
.data-table .bad { color: var(--red-warn); font-weight: 700; }
.data-table .pink { color: var(--pink); font-weight: 700; }
.data-table .purple { color: var(--purple); font-weight: 700; }

/* ---- Alert boxes ---- */
.alert {
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  margin: 14px 0;
  font-size: 13.5px;
  line-height: 1.75;
  display: flex;
  gap: 12px;
}
.alert-icon { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.alert.caution { background: var(--red-pale); border-left: 4px solid var(--red-warn); }
.alert.caution .alert-icon { color: var(--red-warn); }
.alert.info { background: var(--blue-pale); border-left: 4px solid var(--blue-accent); }
.alert.info .alert-icon { color: var(--blue-accent); }
.alert.action { background: var(--terra-pale); border-left: 4px solid var(--terra); }
.alert.action .alert-icon { color: var(--terra); }
.alert.success { background: var(--green-bg); border-left: 4px solid var(--green-mid); }
.alert.success .alert-icon { color: var(--green-mid); }
.alert.highlight-pink { background: var(--pink-pale); border-left: 4px solid var(--pink); }
.alert.highlight-pink .alert-icon { color: var(--pink); }
.alert.highlight-purple { background: var(--purple-pale); border-left: 4px solid var(--purple); }
.alert.highlight-purple .alert-icon { color: var(--purple); }

/* ---- Action List ---- */
.action-list { list-style: none; padding: 0; }
.action-list li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--gray-border);
  font-size: 13.5px;
  line-height: 1.75;
}
.action-list li:last-child { border-bottom: none; }
.action-tag {
  font-size: 10.5px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  height: fit-content;
  margin-top: 3px;
  flex-shrink: 0;
}
.action-tag.immediate { background: #fde8e8; color: #c0392b; }
.action-tag.next { background: #fdf3e7; color: #bc6c25; }
.action-tag.longterm { background: #e8f4fd; color: #1d6fa4; }
.action-tag.measure { background: var(--green-bg); color: var(--green-dark); }

/* ---- Cross card ---- */
.cross-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.cross-card .cross-header {
  background: var(--green-bg);
  padding: 13px 18px;
  display: flex; align-items: center; gap: 10px;
}
.cross-card .cross-header .num {
  background: var(--green-dark); color: white;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.cross-card .cross-header .title { font-weight: 700; font-size: 13.5px; color: var(--green-dark); }
.cross-card .cross-body {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  font-size: 13px;
}
.cross-card .cross-body .col-label { font-size: 10.5px; font-weight: 700; color: var(--gray-light); letter-spacing: 0.06em; margin-bottom: 5px; }
.cross-card .cross-body .col-content { line-height: 1.75; color: var(--gray-dark); }

/* ---- Key insight box ---- */
.key-insight {
  background: linear-gradient(135deg, var(--pink-pale), var(--purple-pale));
  border: 1.5px solid var(--pink);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
}
.key-insight .ki-label { font-size: 10px; font-weight: 700; color: var(--pink); letter-spacing: 0.1em; margin-bottom: 6px; }
.key-insight .ki-text { font-size: 16px; font-weight: 700; color: var(--gray-dark); line-height: 1.65; }
.key-insight .ki-text .num { font-size: 22px; font-weight: 900; color: var(--pink); }
.key-insight .ki-text .num-purple { font-size: 22px; font-weight: 900; color: var(--purple); }

/* ---- Pill tags ---- */
.pill {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  margin: 2px;
}
.pill.green { background: var(--green-pale); color: var(--green-dark); }
.pill.pink { background: var(--pink-pale); color: var(--pink); }
.pill.purple { background: var(--purple-pale); color: var(--purple); }
.pill.terra { background: var(--terra-pale); color: var(--terra); }
.pill.blue { background: var(--blue-pale); color: var(--blue-accent); }
.pill.gray { background: var(--gray-border); color: var(--gray-mid); }

/* ---- Action tag variants ---- */
.action-tag.priority { background: #fde8e8; color: #c0392b; }
.action-tag.now { background: var(--green-bg); color: var(--green-dark); }

/* ---- Stats grid 4-col variant ---- */
.stats-grid.four-col { grid-template-columns: repeat(4, 1fr); }

/* ---- Funnel box (新スタイル) ---- */
.funnel-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 24px auto;
  max-width: 560px;
}
.funnel-box .funnel-step {
  background: var(--white);
  border: 1.5px solid var(--gray-border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 0;
}
.funnel-box .funnel-step .f-label {
  font-size: 11px;
  color: var(--gray-light);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.funnel-box .funnel-step .f-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-dark);
  line-height: 1.6;
}
.funnel-box .funnel-arrow {
  font-size: 18px;
  color: var(--green-light);
  margin: 6px 0;
}

/* ---- Frame Step (Instagram広告フレーム分析) ---- */
.frame-step {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.frame-step-header {
  background: linear-gradient(90deg, var(--green-dark), var(--green-mid));
  color: white;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.frame-step-header .step-num {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  background: rgba(255,255,255,0.2);
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.frame-step-header .step-title {
  font-size: 14px;
  font-weight: 700;
}
.frame-step-body {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  font-size: 13px;
}
.frame-row .frame-col-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gray-light);
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.frame-row .frame-col-content {
  line-height: 1.75;
  color: var(--gray-dark);
}

/* ---- Insight grid (TOPページ横断インサイト) ---- */
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
}
.insight-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--green-light);
}
.insight-card.pink { border-top-color: var(--pink); }
.insight-card.purple { border-top-color: var(--purple); }
.insight-card .ic-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.insight-card .ic-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--gray-border);
  line-height: 1;
}
.insight-card.pink .ic-num { color: var(--pink-pale); }
.insight-card.purple .ic-num { color: var(--purple-pale); }
.insight-card .ic-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--green-pale);
  color: var(--green-dark);
  letter-spacing: 0.06em;
}
.insight-card.pink .ic-tag { background: var(--pink-pale); color: var(--pink); }
.insight-card.purple .ic-tag { background: var(--purple-pale); color: var(--purple); }
.insight-card .ic-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--gray-dark);
  margin-bottom: 10px;
  line-height: 1.4;
}
.insight-card .ic-body {
  font-size: 13px;
  line-height: 1.8;
  color: var(--gray-mid);
}

/* ---- Report cards (TOPページ) ---- */
.report-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 4px;
}
.report-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 24px 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.report-card .rc-icon {
  font-size: 32px;
}
.report-card .rc-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.1em;
}
.report-card .rc-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--gray-dark);
  line-height: 1.4;
  margin-top: -4px;
}
.report-card .rc-summary {
  font-size: 13px;
  color: var(--gray-mid);
  line-height: 1.75;
  flex: 1;
}
.report-card .rc-stats {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--gray-border);
  padding-top: 14px;
  margin-top: 2px;
}
.report-card .rc-stat {}
.report-card .rc-stat-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--green-dark);
  line-height: 1.2;
}
.report-card .rc-stat-label {
  font-size: 11px;
  color: var(--gray-light);
  margin-top: 2px;
}
.report-card .rc-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-dark);
}

/* ---- Footer ---- */
.page-footer { margin-top: 72px; padding: 28px 0; border-top: 1px solid var(--gray-border); font-size: 12px; color: var(--gray-light); text-align: center; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .page-wrapper { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 20px 18px 60px; }
  .finding-card .card-body { grid-template-columns: 1fr; }
  .cross-card .cross-body { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid.four-col { grid-template-columns: repeat(2, 1fr); }
  .frame-step-body { grid-template-columns: 1fr; }
  .insight-grid { grid-template-columns: 1fr; }
  .report-cards { grid-template-columns: 1fr; }
}
