/* ===============================
   Template Detail Page (LinkTasky風)
=============================== */

/* ✅ はみ出し防止（詳細ページ内だけ） */
.template-detail,
.template-detail *{
  box-sizing: border-box;
}

/* ✅ ベース文字色（白文字の継承を打ち消す） */
.template-detail{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 12px 54px;
  color: #111;
}

/* ===============================
   Breadcrumb
=============================== */

.breadcrumb{
  display:flex;
  align-items:center;
  gap: 8px;
  flex-wrap:wrap;
  font-size: 0.85rem;
  opacity: 0.9;
  margin: 6px 2px 14px;
}

.breadcrumb a{
  text-decoration: none;
  color: #185a9d;
  font-weight: 700;
}

.breadcrumb a:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb .current{
  font-weight: 800;
  color: #333;
  opacity: .95;
}

/* ===============================
   Hero
=============================== */

.hero{
  position: relative;
  overflow: hidden;

  padding: 18px 18px 16px;
  border-radius: 18px;
  border: solid 3px rgba(24, 90, 157, 0.12);
  background:
    linear-gradient(135deg,
      rgba(67, 206, 162, 0.18),
      rgba(24, 90, 157, 0.10)
    );
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

/* 光エフェクト */
.hero::before{
  content:"";
  position:absolute;
  inset: -70px -90px auto auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(67, 206, 162, 0.26),
    rgba(24, 90, 157, 0.12),
    transparent 70%
  );
  pointer-events: none;
}

/* ✅ 読めない問題の根本対策：Hero内の文字色を濃色固定 */
.hero,
.hero *{
  color: #0f172a; /* 濃いネイビー */
}

/* ボタンは例外 */
.hero .btn.primary{ color: #fff; }
.hero .btn.ghost{ color: #185a9d; }

.hero-badge{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hero-badge .category{
  background: rgba(255,255,255,0.78);
  color: #185a9d;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.hero-badge .usage{
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.75);
  opacity: 1;
}
.hero-title{
  margin: 0 0 10px;
  font-size: clamp(1.05rem, 4vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #0b1220;

  display: flex;
  align-items: flex-start;          /* 絵文字と文字の上を揃える */
  gap: 10px;

  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;               /* 対応ブラウザで改行が綺麗になる */
}

.hero-title .emoji{
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  flex-shrink: 0;
  font-size: 1.2rem;
}

.hero-lead{
  font-size: clamp(0.85rem, 3.5vw, 0.95rem);
  line-height: 1.8;
  margin: 0 0 16px;
  opacity: .95;
}

.template-about{
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(0,0,0,.08);
}

.template-about-label{
  margin: 0 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .04em;
  opacity: .75;
}

.hero-desc{
  margin: 0;
  line-height: 1.85;
  font-size: clamp(0.9rem, 3.5vw, 1rem);
  opacity: .92;
}

/* スマホ微調整 */
@media (max-width: 480px){
  .hero-title{
    line-height: 1.35;
    gap: 8px;
  }
  .hero-title .emoji{
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 12px;
  }
}




.hero-cta{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero-note{
  margin-top: 12px;
  font-size: 0.78rem;
  line-height: 1.65;
  opacity: 0.85; /* ✅ 読みやすく */
}

/* ===============================
   Buttons（共通）
=============================== */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;

  padding: 0.82rem 1.05rem;
  border-radius: 999px;
  text-decoration:none;
  font-weight: 800;
  font-size: 0.92rem;

  border: 1px solid rgba(2, 6, 11, 0.10);
  transition: filter .2s ease, transform .2s ease, background .2s ease;

  max-width: 100%; /* ✅ はみ出し防止 */
  white-space: normal;
}

.btn.primary{
  color: #fff;
  background: linear-gradient(135deg, #43cea2, #185a9d);
  box-shadow: 0 6px 14px rgba(24, 90, 157, 0.18);
  border: none;
}

.btn.primary:hover{
  filter: brightness(0.93);
  transform: translateY(-2px);
}

.btn.primary:active{
  transform: translateY(0);
}

.btn.ghost{
  color: #185a9d;
  background: rgba(255,255,255,0.75);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.btn.ghost:hover{
  background: rgba(255,255,255,0.88);
  transform: translateY(-1px);
}

.btn:focus-visible{
  outline: 3px solid rgba(24, 90, 157, 0.25);
  outline-offset: 4px;
}

/* ===============================
   Blocks（共通カード）
=============================== */

.block{
  margin-top: 16px;
  background: #fff;
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  border: 1px solid rgba(2, 6, 11, 0.10);
  position: relative;
  overflow: hidden;
  color: #111;
}

/* 軽い光 */
.block::before{
  content:"";
  position:absolute;
  inset: -50px -70px auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(67, 206, 162, 0.14),
    rgba(24, 90, 157, 0.06),
    transparent 70%
  );
  pointer-events:none;
}

.block h2{
  margin: 0 0 10px;
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

/* ===============================
   Checklist
=============================== */

.checklist{
  margin: 0;
  padding-left: 18px;
}

.checklist li{
  margin: 6px 0;
  line-height: 1.7;
  opacity: 0.9;
}

/* ===============================
   Task Sample
=============================== */

.task-sample{
  margin: 0;
  padding-left: 20px;
}

.task-sample li{
  margin: 6px 0;
  line-height: 1.75;
  opacity: 0.92;
}

.inline-cta{
  margin-top: 12px;
  display:flex;
  justify-content:flex-start;
}

/* ===============================
   Related Templates
=============================== */
.related-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
  margin-top:12px;
}

.related-card,
.related-card:visited{
  display:block;
  padding:14px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  text-decoration:none;
  background:#fff;
  color:#111827;              /* ← 文字は黒固定 */
  transition:.15s ease;
}

.related-card:hover{
  border-color:#c7d2fe;
  box-shadow:0 6px 16px rgba(0,0,0,.06);
  transform:translateY(-1px);
}

.related-title{
  font-weight:700;
  margin-bottom:6px;
  color:#111827;
}

.related-desc{
  font-size:14px;
  line-height:1.4;
  color:#374151;
}

.related-cta{
  margin-top:10px;
  font-size:13px;
  font-weight:600;
  color:#6366f1;              /* ← CTAだけアクセント色 */
}


/* ===============================
   Steps
=============================== */

.steps{
  display:grid;
  gap: 10px;
}

.step{
  display:flex;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 16px;
  background: rgba(24, 90, 157, 0.04);
  border: 1px solid rgba(24, 90, 157, 0.08);
}

.step-no{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  color: #185a9d;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(2, 6, 11, 0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  flex: 0 0 auto;
}

.step-body h3{
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 900;
}

.step-body p{
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  opacity: 0.9;
}

/* ===============================
   FAQ
=============================== */

.faq{
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid rgba(2, 6, 11, 0.10);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  padding: 10px 12px;
}

.faq summary{
  cursor: pointer;
  font-weight: 900;
  color: #222;
  outline: none;
}

.faq summary::-webkit-details-marker{
  display:none;
}

.faq summary::after{
  content: "＋";
  float: right;
  font-weight: 900;
  color: #185a9d;
  opacity: .9;
}

.faq[open] summary::after{
  content: "－";
}

.faq p{
  margin: 10px 0 0;
  line-height: 1.75;
  opacity: 0.9;
}

/* ===============================
   Final CTA
=============================== */

.final-cta{
  margin-top: 16px;
  padding: 18px 14px; /* ✅ 余白少し安全側 */
  border-radius: 18px;
  text-align: center;

  border: solid 3px rgba(24, 90, 157, 0.12);
  background:
    linear-gradient(135deg,
      rgba(67, 206, 162, 0.16),
      rgba(24, 90, 157, 0.10)
    );
  box-shadow: 0 6px 16px rgba(0,0,0,0.10);
  color: #111;
}

.final-cta h2{
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.final-cta p{
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.7;
  opacity: 0.9;
}

/* ✅ 最下部ボタンは中央寄せ＋最大幅で溢れない */
.final-cta .btn{
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

/* ===============================
   Utilities
=============================== */

.muted{
  opacity: 0.75;
}

/* ===============================
   Responsive
=============================== */

@media (max-width: 640px){
  .hero{
    padding: 16px 14px 14px;
  }

  .hero-title{
    font-size: 1.2rem;
  }

  .hero-title .emoji{
    width: 40px;
    height: 40px;
    border-radius: 30px;
   
  }

  .block{
    padding: 14px 14px 12px;
  }

  .hero-cta{
    gap: 8px;
  }

  .btn{
    width: 100%;
  }

  .inline-cta .btn{
    width: 100%;
  }

  .final-cta{
    padding: 16px 12px;
  }
}
