/* ==========================================================
   Personal Energy Portable Power Story
   Version: Try12 (2025-11-11)
   ----------------------------------------------------------
   ・全章レイアウト／配色はTry11準拠
   ・注釈部(#notes)のモバイル折返し最適化
   ・brand-iconはロゴ円形仕様に対応（背景なし）
   ========================================================== */

/* --- Base ------------------------------------------------ */
.pepp-story {
  max-width: 960px;
  margin: 0 auto;
  line-height: 1.8;
  color: #1e293b;
}

.pepp-story h1,
.pepp-story h2,
.pepp-story h3 {
  font-family: "Noto Sans JP", system-ui, sans-serif;
}

/* --- Brand Icon ------------------------------------------ */
.pepp-story .brand-icon {
  width: 80px;
  height: 80px;
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.3rem;
  border-radius: 50%;
  background: none !important;
}

/* モバイル調整（小さめに） */
@media (max-width: 640px) {
  .pepp-story .brand-icon {
    width: 56px;
    height: 56px;
    margin-right: 0.25rem;
  }
}

/* --- Section --------------------------------------------- */
.pepp-story section {
  margin-bottom: 4rem;
}

.pepp-story .section.alt {
  background-color: #f9fafb;
  padding: 3rem 2rem;
  border-radius: 0.75rem;
}

/* --- Headings -------------------------------------------- */
.pepp-story h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  border-left: 4px solid #94a3b8;
  padding-left: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* --- Paragraphs ------------------------------------------ */
.pepp-story p {
  margin-bottom: 1rem;
}

.pepp-story p strong {
  font-weight: 600;
}

/* --- Hero Image ------------------------------------------ */
.pepp-story #hero img {
  max-width: 100%;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

/* --- Grid (条件8項目) ------------------------------------ */
.pepp-story .grid.four {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 1024px) {
  .pepp-story .grid.four {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .pepp-story .grid.four {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* --- Icon Card ------------------------------------------- */
.pepp-story .iconcard {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
  min-height: clamp(160px, 18vw, 190px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  transition: transform 0.15s ease;
}

.pepp-story .iconcard:hover {
  transform: translateY(-3px);
}

.pepp-story .iconcard h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.pepp-story .iconcard p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- Compare Table --------------------------------------- */
.pepp-story table.compare {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}

.pepp-story table.compare th,
.pepp-story table.compare td {
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.95rem;
}

.pepp-story table.compare th {
  background: #f8fafc;
  font-weight: 600;
}

/* --- Quote / Purpose ------------------------------------- */
.pepp-story .quote {
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.6;
  color: #0f172a;
  margin: 1.5rem 0;
}

/* --- 注釈 (Notes Section) ------------------------------- */
.pepp-story #notes {
  border-top: 1px solid #e2e8f0;
  padding-top: 2rem;
  margin-top: 3rem;
}

.pepp-story #notes h2 {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* 各リスト項目のスタイル */
.pepp-story .refs {
  list-style-type: decimal;
  margin-left: 1.5rem;
  margin-top: 1rem;
  color: #334155;
}

.pepp-story .refs li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* リンクの折返し・強制改行対応 */
.pepp-story .refs a {
  display: inline-block;
  word-break: break-all;
  overflow-wrap: anywhere;
  color: #2563eb;
  text-decoration: underline;
}

/* --- モバイル最適化 ------------------------------------ */
@media (max-width: 640px) {
  .pepp-story {
    padding: 0 1rem;
  }

  .pepp-story #notes {
    padding-top: 1.5rem;
  }

  .pepp-story .refs {
    font-size: 0.95rem;
    margin-left: 1rem !important;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .pepp-story .refs li {
    margin-bottom: 0.9rem;
    line-height: 1.7;
  }

  .pepp-story .refs a {
    word-break: break-all;
    overflow-wrap: anywhere;
  }
}

/* --- Footer --------------------------------------------- */
.pepp-story footer {
  margin-top: 4rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
}
