/* ===================================
   マチアプ研究室 スタイルシート v2
   モダンメディア × ランキングLP
=================================== */

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

:root {
  --bg: #FFFFFF;
  --bg-soft: #FFF7F4;
  --bg-section: #FAF7FA;
  --text: #222633;
  --text-sub: #6B7280;
  --primary: #FF5E7E;
  --primary-deep: #F03E63;
  --grad: linear-gradient(135deg, #FF5E7E 0%, #FF8A5C 100%);
  --grad-soft: linear-gradient(160deg, #FFE9EE 0%, #FFF3EA 55%, #FFF9F4 100%);
  --gold: #FFB400;
  --teal: #14B8A6;
  --line: #ECE9EE;
  --radius: 20px;
  --shadow: 0 6px 24px rgba(34, 38, 51, 0.08);
  --shadow-lg: 0 12px 40px rgba(240, 62, 99, 0.16);
  --font-head: 'Zen Maru Gothic', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.85;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

/* ===================================
   ボタン
=================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9em 2.2em;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(240,62,99,0.24); }

.btn-primary.btn-sm { font-size: 0.88rem; padding: 0.7em 1.7em; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  background: #fff;
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.8em 1.8em;
  border-radius: 999px;
  border: 2px solid var(--line);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }

.btn-note {
  font-size: 0.72rem;
  color: var(--text-sub);
  margin-top: 0.4rem;
}

/* ===================================
   ヘッダー
=================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  line-height: 1.2;
}

.site-logo .logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.site-logo em { color: var(--primary-deep); font-style: normal; }

.site-nav { display: flex; align-items: center; gap: 1.3rem; }

.site-nav a {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover { color: var(--primary); }

.site-nav .nav-cta {
  background: var(--grad);
  color: #fff;
  padding: 0.5em 1.3em;
  border-radius: 999px;
}

@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ===================================
   ヒーロー（FV）
=================================== */

.hero {
  background: var(--grad-soft);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 2rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background: #fff;
  border-radius: 999px;
  padding: 0.35em 1.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-deep);
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
}

.hero-headline {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
  margin-bottom: 1.1rem;
}

.hero-headline .hl { color: var(--primary-deep); }

.hero-sub {
  font-size: 1rem;
  color: var(--text-sub);
  margin-bottom: 1.6rem;
  max-width: 460px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.hero-proof {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.proof-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3em 0.9em;
}

.proof-badge .check { color: var(--teal); font-weight: 900; }

.hero-visual { display: flex; justify-content: center; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .hero-visual { order: -1; }
  .hero-visual svg { max-width: 250px; }
}

/* ===================================
   セクション共通
=================================== */

.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-section); }

.section-head { text-align: center; margin-bottom: 2.2rem; }

.section-eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--primary-deep);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.4;
}

.section-lead {
  margin-top: 0.7rem;
  color: var(--text-sub);
  font-size: 0.95rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================================
   ランキングカード
=================================== */

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
  align-items: stretch;
}

@media (max-width: 820px) { .rank-grid { grid-template-columns: 1fr; } }

.rank-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem 1.6rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: center;
}

.rank-card.rank-1 {
  border: 2px solid var(--gold);
  box-shadow: 0 12px 40px rgba(255,180,0,0.18);
}

.rank-medal {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.8rem;
  color: #fff;
  border-radius: 999px;
  padding: 0.3em 1.2em;
  white-space: nowrap;
}

.rank-1 .rank-medal { background: linear-gradient(135deg, #FFB400, #FF8A00); }
.rank-2 .rank-medal { background: linear-gradient(135deg, #9CA3AF, #6B7280); }
.rank-3 .rank-medal { background: linear-gradient(135deg, #D97706, #B45309); }

.rank-app-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  margin: 0.4rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
}

.rank-app-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.2rem;
}

.stars {
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.stars .score {
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.05rem;
  margin-left: 0.3em;
  letter-spacing: 0;
}

.chip-row { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; }

.chip {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-deep);
  background: #FFF0F3;
  border-radius: 999px;
  padding: 0.25em 0.9em;
}

.chip.chip-teal { color: #0F766E; background: #ECFDF8; }

.rank-copy {
  font-size: 0.88rem;
  color: var(--text-sub);
  text-align: left;
  flex: 1;
}

.rank-cta { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

.rank-detail-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-sub);
  text-decoration: none;
}

.rank-detail-link:hover { color: var(--primary); }

/* ===================================
   比較表
=================================== */

.compare-scroll { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

table.compare {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  font-size: 0.86rem;
}

table.compare th {
  background: var(--text);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  padding: 0.85em 1em;
  text-align: left;
  white-space: nowrap;
}

table.compare td {
  padding: 0.85em 1em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.compare tr:nth-child(even) td { background: var(--bg-soft); }

table.compare td:first-child { font-weight: 700; white-space: nowrap; }

/* ===================================
   診断ツール
=================================== */

.quiz-box {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.2rem 1.8rem;
}

.quiz-progress {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
}

.quiz-progress span {
  flex: 1; height: 6px; border-radius: 999px; background: var(--line);
}

.quiz-progress span.on { background: var(--grad); }

.quiz-q {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

.quiz-opts { display: grid; gap: 0.7rem; }

.quiz-opt {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  background: var(--bg-soft);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0.9em 1em;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.quiz-opt:hover { border-color: var(--primary); background: #fff; }

.quiz-result { text-align: center; }

.quiz-result .result-label { font-size: 0.85rem; color: var(--text-sub); margin-bottom: 0.4rem; }

.quiz-result .result-app {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.7rem;
  color: var(--primary-deep);
  margin-bottom: 0.6rem;
}

.quiz-result p.result-why { font-size: 0.9rem; color: var(--text-sub); margin-bottom: 1.2rem; text-align: left; }

.quiz-restart {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-sub);
  background: none; border: none; cursor: pointer; text-decoration: underline;
}

/* ===================================
   ステップ（選び方）
=================================== */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.step-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.4rem;
}

.step-num {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.8rem;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  width: 56px;
  text-align: center;
  padding: 0.2em 0;
  margin-bottom: 0.8rem;
}

.step-card h3 { font-family: var(--font-head); font-weight: 900; font-size: 1.05rem; margin-bottom: 0.5rem; }
.step-card p { font-size: 0.88rem; color: var(--text-sub); }

/* ===================================
   FAQ
=================================== */

.faq-list { max-width: 720px; margin: 0 auto; display: grid; gap: 0.8rem; }

.faq-list details {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem 1.3rem;
}

.faq-list summary {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.faq-list summary::before {
  content: 'Q';
  font-weight: 900;
  color: var(--primary-deep);
  flex-shrink: 0;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list details p { font-size: 0.88rem; color: var(--text-sub); padding-top: 0.7rem; }

/* ===================================
   運営者・調査ポリシー
=================================== */

.author-box {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem;
  max-width: 720px;
  margin: 0 auto;
}

.author-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--grad-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: var(--shadow);
}

.author-name { font-family: var(--font-head); font-weight: 900; font-size: 1rem; }
.author-role { font-size: 0.75rem; color: var(--primary-deep); font-weight: 700; margin-bottom: 0.4rem; }
.author-bio { font-size: 0.86rem; color: var(--text-sub); }

.policy-list {
  max-width: 720px;
  margin: 1.2rem auto 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: var(--text-sub);
  list-style: none;
}

.policy-list li { display: flex; gap: 0.5em; }
.policy-list li::before { content: '✓'; color: var(--teal); font-weight: 900; }

/* ===================================
   記事カード
=================================== */

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

@media (max-width: 820px) { .article-grid { grid-template-columns: 1fr; } }

.article-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.article-card:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(34,38,51,0.12); }

.card-thumb {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  background: var(--grad-soft);
}

.card-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }

.card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-deep);
}

.card-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.96rem;
  line-height: 1.5;
  flex: 1;
}

.card-meta { font-size: 0.72rem; color: var(--text-sub); }

/* ===================================
   フッター
=================================== */

.site-footer {
  margin-top: 4rem;
  background: var(--text);
  color: rgba(255,255,255,0.85);
  padding: 2.8rem 0 2.2rem;
  text-align: center;
}

.footer-logo { font-family: var(--font-head); font-weight: 900; font-size: 1.15rem; color: #fff; margin-bottom: 0.8rem; }
.footer-logo em { color: var(--primary); font-style: normal; }

.footer-links { display: flex; gap: 1.4rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-links a { color: rgba(255,255,255,0.75); font-size: 0.8rem; text-decoration: none; }
.footer-links a:hover { color: #fff; }

.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.5); }

/* ===================================
   記事ページ
=================================== */

.breadcrumb {
  max-width: 760px;
  margin: 1.2rem auto 0;
  padding: 0 1.25rem;
  font-size: 0.74rem;
  color: var(--text-sub);
}

.breadcrumb a { color: var(--text-sub); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }

.article-header {
  max-width: 760px;
  margin: 1.2rem auto 0;
  padding: 0 1.25rem;
}

.article-eyebrow { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }

.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.25em 1em;
  border-radius: 999px;
  color: #fff;
  background: var(--grad);
}

.badge-blue  { background: linear-gradient(135deg, #38BDF8, #6366F1); }
.badge-black { background: linear-gradient(135deg, #475569, #1E293B); }
.badge-red   { background: var(--grad); }

.article-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  line-height: 1.45;
  margin-bottom: 1rem;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-sub);
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}

.pr-note { font-size: 0.72rem; color: var(--text-sub); margin-top: 0.7rem; }

.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.8rem 1.25rem 4rem;
}

.article-body p { margin-bottom: 1.5em; font-size: 1rem; }

.article-body h2 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.4rem;
  margin: 2.8rem 0 1rem;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: var(--grad-soft);
  border-left: 5px solid var(--primary);
  line-height: 1.45;
}

.article-body h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.08rem;
  margin: 2rem 0 0.8rem;
  padding-left: 0.7rem;
  border-left: 4px solid var(--primary);
}

.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1.5em; }
.article-body li { margin-bottom: 0.4em; }
.article-body ul li::marker { color: var(--primary); }

.article-body strong { font-weight: 700; background: linear-gradient(transparent 55%, #FFE2A8 55%); }

.article-body hr { border: none; height: 1.6rem; }

.article-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-body th {
  background: var(--text);
  color: #fff;
  padding: 0.7em 0.9em;
  text-align: left;
  font-weight: 700;
}

.article-body td { border-bottom: 1px solid var(--line); padding: 0.7em 0.9em; }
.article-body tr:nth-child(even) td { background: var(--bg-soft); }

/* 目次 */
.toc {
  background: var(--bg-section);
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
}

.toc-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 0.4em;
}

.toc ol { padding-left: 1.4rem; margin: 0; }
.toc li { margin-bottom: 0.25em; font-size: 0.88rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--primary); }

/* 注釈・まとめ・CTA */
.note-box {
  background: #F0FBF9;
  border: 1px solid #B6E8E0;
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  margin: 1.8rem 0;
  font-size: 0.92rem;
  position: relative;
}

.note-box::before {
  content: '💡 ポイント';
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0F766E;
  margin-bottom: 0.3rem;
}

.summary-box {
  background: var(--grad-soft);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  margin: 2.2rem 0;
}

.summary-box .summary-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--primary-deep);
  margin-bottom: 0.9rem;
}

.summary-box ol, .summary-box ul { padding-left: 1.3rem; }
.summary-box li { font-weight: 500; margin-bottom: 0.45em; }

.cta-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem;
  margin: 1.8rem 0;
  text-align: center;
}

.cta-box h4 {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.cta-box .chip-row { margin-bottom: 0.7rem; }

.cta-box p { font-size: 0.88rem; color: var(--text-sub); margin-bottom: 1rem; text-align: left; }

.cta-btn {
  display: inline-block;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8em 2.4em;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(240,62,99,0.26); }

/* レスポンシブ微調整 */
@media (max-width: 600px) {
  .section { padding: 2.5rem 0; }
  .hero-cta-row .btn-primary, .hero-cta-row .btn-ghost { width: 100%; }
}
