/* ===== RESET & BASE ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
body {
  font-family: 'Noto Sans JP', -apple-system, 'Hiragino Sans', sans-serif;
  color: #222;
  background: #fff;
  line-height: 2;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
.container { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.sp-only { display: none; }
@media (max-width: 768px) { .sp-only { display: inline; } }
img { max-width: 100%; height: auto; }
strong { font-weight: 700; }

/* ===== UTILITIES ===== */
.red-text { color: #C0392B; }
.large-text { font-size: 1.6em; font-weight: 900; }
.red-heading {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
  color: #C0392B;
  text-align: center;
  margin-bottom: 24px;
  border-bottom: 3px solid #C0392B;
  display: inline-block;
  padding-bottom: 4px;
}

/* ===== NOTICE BAR ===== */
.notice-bar {
  background: #FFF8E1;
  border-bottom: 1px solid #F0E0A0;
  padding: 12px 24px;
  font-size: 13px;
  color: #666;
  text-align: center;
  line-height: 1.7;
}

/* ===== HERO ===== */
.hero {
  background: #FAFAFA;
  border-bottom: 3px solid #222;
  padding: 48px 24px 40px;
  text-align: center;
}
.hero-lead {
  font-size: 14px;
  color: #888;
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(28px, 6vw, 48px);
  font-weight: 900;
  line-height: 1.4;
  color: #111;
  margin-bottom: 8px;
}
.hero-accent {
  color: #C0392B;
}
.hero-sub-title {
  font-size: 15px;
  color: #888;
  margin-bottom: 32px;
}
.hero-book {
  margin-bottom: 28px;
}
.book-img {
  width: clamp(200px, 45vw, 340px);
  height: auto;
}
.hero-catch {
  font-size: clamp(15px, 3.5vw, 18px);
  color: #333;
  margin-bottom: 16px;
  line-height: 2;
}
.hero-catch strong { color: #222; }
.hero-author {
  font-size: 14px;
  color: #888;
  margin-bottom: 24px;
}
.hero-free-note {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  margin-bottom: 32px;
  line-height: 1.8;
}

/* ===== CTA BLOCK ===== */
.cta-block {
  text-align: center;
  margin: 32px 0;
}
.cta-pre-text {
  font-size: 15px;
  color: #555;
  margin-bottom: 12px;
}
.cta-price {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  display: block;
}
.cta-btn {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #1B6B3A;
  color: #fff;
  border: none;
  padding: 20px 48px;
  font-size: clamp(17px, 4vw, 22px);
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.5;
  transition: background 0.2s;
}
.cta-btn:hover { background: #1E8048; }
.cta-note {
  font-size: 13px;
  color: #C0392B;
  margin-top: 12px;
  font-weight: 500;
}

/* ===== SECTIONS ===== */
.section {
  padding: 56px 0;
  border-bottom: 1px solid #eee;
}

/* ===== CONTENT BODY (読み物) ===== */
.content-body {
  text-align: center;
}
.content-body p {
  font-size: 16px;
  line-height: 2.2;
  margin-bottom: 20px;
  text-align: left;
  display: inline-block;
  max-width: 100%;
}
.content-heading {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ===== TABLE OF CONTENTS ===== */
.section--toc {
  background: #FAFAFA;
  border-top: 3px solid #222;
  border-bottom: 3px solid #222;
}
.toc-heading {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 900;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 8px;
}
.toc-chapter {
  margin-bottom: 28px;
}
.toc-chapter-title {
  font-size: clamp(16px, 3.5vw, 20px);
  font-weight: 900;
  margin-bottom: 8px;
  border-bottom: 2px solid #222;
  padding-bottom: 6px;
}
.toc-num {
  display: inline-block;
  background: #C0392B;
  color: #fff;
  font-size: 13px;
  padding: 2px 10px;
  margin-right: 10px;
  font-weight: 700;
  vertical-align: middle;
}
.toc-list {
  list-style: none;
  padding-left: 8px;
}
.toc-list li {
  font-size: 15px;
  line-height: 2;
  color: #333;
}
.toc-foot {
  margin-top: 40px;
  font-size: 15px;
  color: #555;
  text-align: center;
  line-height: 2;
}
.mana-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 32px;
  padding: 8px 8px 8px 40px;
  font-size: 15px;
  color: #333;
  line-height: 2;
}

/* ===== CTA MID ===== */
.section--cta-mid {
  background: #F5F5F0;
  padding: 48px 0;
  border-bottom: 1px solid #ddd;
}

/* ===== AUTHOR ===== */
.section--author {
  border-bottom: 3px solid #222;
}
.author-profile {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}
.author-name {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 16px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 12px;
}
.author-desc {
  font-size: 15px;
  line-height: 2;
  margin-bottom: 16px;
  color: #444;
}

/* ===== CTA FINAL ===== */
.section--cta-final {
  background: #fff;
  padding: 48px 0;
}

/* ===== FOOTER ===== */
.footer {
  background: #F5F5F5;
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: #888;
  border-top: 1px solid #ddd;
}
.footer a { color: #888; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer span { margin: 0 8px; }
.footer-copy { margin-top: 8px; }

/* ===== CHATBOT ===== */
.chatbot-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 998;
}
.chatbot-overlay.active { display: block; }

.chatbot {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  max-width: calc(100vw - 24px);
  height: 580px;
  max-height: calc(100vh - 40px);
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 999;
  flex-direction: column;
  overflow: hidden;
}
.chatbot.active { display: flex; }

.chatbot-header {
  background: #222;
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chatbot-header-info { display: flex; align-items: center; gap: 10px; }
.chatbot-header-icon {
  width: 36px; height: 36px;
  border: 1px solid #555;
  object-fit: cover;
}
.chatbot-header-title { font-size: 13px; font-weight: 700; }
.chatbot-header-sub { font-size: 10px; color: rgba(255,255,255,0.5); }
.chatbot-close {
  background: none; border: none; color: #fff;
  font-size: 18px; cursor: pointer; padding: 4px 8px;
}

.chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #F5F5F5;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.7;
  animation: msgIn 0.25s ease-out;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-msg--bot {
  align-self: flex-start;
  background: #E8A317;
  color: #1a1a1a;
  border-radius: 0 10px 10px 0;
  font-weight: 500;
}
.chat-msg--user {
  align-self: flex-end;
  background: #fff;
  color: #222;
  border: 1px solid #ddd;
  border-radius: 10px 0 0 10px;
}

.chatbot-input {
  padding: 14px 18px;
  background: #F9F9F9;
  border-top: 1px solid #e5e5e5;
  flex-shrink: 0;
}
.chatbot-input label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}
.chatbot-input input {
  width: 100%;
  border: 1px solid #ccc;
  padding: 11px 14px;
  border-radius: 0;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: #fff;
}
.chatbot-input input:focus { border-color: #E8A317; }

.chatbot-input-row {
  display: flex;
  gap: 8px;
}
.chatbot-input-row input { flex: 1; }

.chatbot-submit {
  display: block;
  width: 100%;
  background: #E8A317;
  color: #fff;
  border: none;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  font-family: inherit;
}
.chatbot-submit:hover { background: #D4940F; }
.chatbot-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.typing-dots { display: flex; gap: 4px; padding: 4px 0; }
.typing-dots span {
  width: 7px; height: 7px;
  background: rgba(26,26,26,0.4);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* Mobile */
@media (max-width: 768px) {
  .hero { padding: 36px 20px 32px; }
  .chatbot {
    bottom: 0; right: 0;
    width: 100%; max-width: 100%;
    height: 100vh; max-height: 100vh;
  }
  .section { padding: 40px 0; }
  .content-body p { font-size: 15px; }
  .cta-btn { padding: 18px 24px; }
}

/* ===== FLOATING CTA ===== */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1B6B3A;
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  transition: background 0.2s, transform 0.2s;
  animation: floatPulse 2s ease-in-out infinite;
}
.floating-cta:hover {
  background: #1E8048;
  transform: scale(1.05);
}
.floating-cta .float-icon {
  font-size: 20px;
}
@keyframes floatPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(27,107,58,0.3); }
  50% { box-shadow: 0 6px 28px rgba(27,107,58,0.5); }
}
@media (max-width: 768px) {
  .floating-cta {
    bottom: 16px;
    right: 16px;
    padding: 12px 20px;
    font-size: 14px;
  }
}
