/* ============================================
   モルック ライブ配信マニュアル — style.css
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:        #2E7D32;
  --primary-dark:   #1B5E20;
  --primary-light:  #E8F5E9;
  --accent:         #FFC107;
  --accent-dark:    #FF8F00;
  --youtube:        #CC0000;
  --youtube-light:  #FFF3F3;
  --streamlabs:     #80C342;
  --streamlabs-dark:#558B2F;
  --streamlabs-light:#F1F8E9;
  --prism:          #6B52D9;
  --prism-light:    #EDE7F6;
  --appendix:       #455A64;
  --bg:             #F4F6F4;
  --bg-card:        #FFFFFF;
  --text:           #1A1A1A;
  --text-muted:     #616161;
  --border:         #DDE5DD;
  --shadow-sm:      0 1px 4px rgba(0,0,0,0.08);
  --shadow:         0 2px 10px rgba(0,0,0,0.12);
  --radius:         14px;
  --radius-sm:      9px;
  --header-h:       56px;
  --chapnav-h:      46px;
  --font:           'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--chapnav-h) + 12px);
}
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5em; }
li { margin-bottom: 4px; }

/* ── サイトヘッダー ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.site-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}
.site-title .logo { font-size: 22px; }
.site-title .subtitle {
  display: block;
  font-size: 10px;
  font-weight: 400;
  opacity: 0.8;
}

/* ── チャプターナビ ── */
.chapter-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: var(--primary-dark);
  height: var(--chapnav-h);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chapter-nav::-webkit-scrollbar { display: none; }
.chapter-nav-inner {
  display: flex;
  align-items: stretch;
  min-width: max-content;
  height: 100%;
  padding: 0 12px;
  gap: 2px;
}
.chapter-nav a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.chapter-nav a:hover { color: #fff; text-decoration: none; }
.chapter-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── チャプターヒーロー ── */
.chapter-hero {
  background: var(--primary);
  color: #fff;
  padding: 36px 20px 32px;
  text-align: center;
}
.chapter-hero.youtube  { background: linear-gradient(135deg, #B71C1C, #E53935); }
.chapter-hero.streamlabs { background: linear-gradient(135deg, #2E7D32, #558B2F); }
.chapter-hero.prism    { background: linear-gradient(135deg, #4527A0, #7B1FA2); }
.chapter-hero.appendix { background: linear-gradient(135deg, #37474F, #546E7A); }
.chapter-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 3px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.chapter-hero h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}
.chapter-hero p {
  font-size: 13.5px;
  opacity: 0.88;
  max-width: 520px;
  margin: 0 auto;
}

/* ── 進捗バー ── */
.step-progress {
  position: sticky;
  top: calc(var(--header-h) + var(--chapnav-h));
  z-index: 80;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-progress-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 72px;
}
.step-progress-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.step-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}
.chapter-hero.streamlabs ~ * .step-progress-fill,
.step-progress.streamlabs .step-progress-fill { background: var(--streamlabs); }
.step-progress.prism .step-progress-fill { background: var(--prism); }
.step-progress.youtube .step-progress-fill { background: var(--youtube); }

/* ── メインコンテンツ ── */
.main-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 16px 96px;
}

/* ── ステップカード ── */
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-h) + var(--chapnav-h) + 50px);
}
.step-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--primary-light);
  border-bottom: 1px solid var(--border);
}
.step.youtube   .step-header { background: var(--youtube-light); }
.step.streamlabs .step-header { background: var(--streamlabs-light); }
.step.prism     .step-header { background: var(--prism-light); }
.step.appendix  .step-header { background: #ECEFF1; }

.step-num {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step.youtube   .step-num { background: var(--youtube); }
.step.streamlabs .step-num { background: var(--streamlabs-dark); }
.step.prism     .step-num { background: var(--prism); }
.step.appendix  .step-num { background: var(--appendix); }

.step-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.4;
}

.step-body {
  padding: 20px;
}
.step-body p  { margin-bottom: 12px; }
.step-body p:last-child { margin-bottom: 0; }
.step-body ul, .step-body ol { margin-bottom: 12px; }

/* ── 画像プレースホルダー ── */
.img-wrap { margin: 16px 0; }
.img-box {
  background: #EEEEEE;
  border: 2px dashed #BDBDBD;
  border-radius: var(--radius-sm);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  text-align: center;
}
.img-box .ph-icon { font-size: 30px; }
.img-box .ph-name {
  font-family: monospace;
  font-size: 11px;
  color: #9E9E9E;
  background: rgba(0,0,0,0.06);
  padding: 2px 8px;
  border-radius: 4px;
  word-break: break-all;
}
figcaption {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 6px;
}

/* ── コールアウト ── */
.callout {
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}
.callout:last-child { margin-bottom: 0; }
.callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.callout-body strong { display: block; font-size: 13px; margin-bottom: 3px; }
.callout-body p, .callout-body ul { font-size: 14px; margin-bottom: 0 !important; }
.callout-warn { background: #FFF8E1; border-left: 4px solid #F9A825; }
.callout-tip  { background: #E8F5E9; border-left: 4px solid var(--primary); }
.callout-info { background: #E3F2FD; border-left: 4px solid #1976D2; }
.callout-important { background: #FCE4EC; border-left: 4px solid #C62828; }

/* ── URLコード表示 ── */
.url-code {
  background: #F5F5F5;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  font-family: monospace;
  font-size: 12.5px;
  word-break: break-all;
  color: #1a5276;
  margin: 10px 0;
  line-height: 1.6;
}

/* ── デバイスチップ ── */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.chip-ios     { background: #E3F2FD; color: #1565C0; }
.chip-android { background: #E8F5E9; color: #2E7D32; }
.chip-pc      { background: #FFF3E0; color: #E65100; }

/* ── セクション見出し ── */
.section-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── アコーディオン（FAQ） ── */
details.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
}
details.accordion summary {
  padding: 14px 18px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-card);
  user-select: none;
}
details.accordion summary::-webkit-details-marker { display: none; }
details.accordion summary::after {
  content: '▼';
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
details.accordion[open] summary::after { transform: rotate(180deg); }
.accordion-body {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  background: #FAFCFA;
}
.accordion-body p { margin-bottom: 8px; }
.accordion-body p:last-child { margin-bottom: 0; }

/* ── トラブルシューティング ── */
.trouble-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}
.trouble-header {
  background: #FFEBEE;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #B71C1C;
}
.trouble-body {
  padding: 14px 16px;
  font-size: 14px;
}
.trouble-body p { margin-bottom: 8px; }
.trouble-body p:last-child { margin-bottom: 0; }

/* ── ページ間ナビ ── */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.page-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.page-nav a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-nav a.btn-next {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.page-nav a.btn-next:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

/* ── フッター ── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 28px 16px;
  font-size: 13px;
}
.site-footer p { margin-bottom: 4px; }
.site-footer a { color: rgba(255,255,255,0.85); }

/* ── INDEX固有 ── */
.hero {
  background: linear-gradient(150deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 52px 20px 60px;
}
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #1A1A1A;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.hero h1 {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 14px;
}
.hero p {
  font-size: 14.5px;
  opacity: 0.9;
  max-width: 480px;
  margin: 0 auto 28px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #1A1A1A;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.hero-cta:hover { opacity: 0.88; text-decoration: none; }

.info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.info-box h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 配信フロー */
.flow-list { list-style: none; padding: 0; }
.flow-item {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 20px;
}
.flow-item:last-child { padding-bottom: 0; }
.flow-item::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.flow-item:last-child::before { display: none; }
.flow-dot {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.flow-body strong { display: block; font-size: 14.5px; font-weight: 700; margin-bottom: 2px; }
.flow-body span { font-size: 13px; color: var(--text-muted); }

/* チャプターカード */
.chapter-cards {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}
.chapter-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s;
  box-shadow: var(--shadow-sm);
}
.chapter-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.card-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.card-icon.youtube     { background: var(--youtube-light); }
.card-icon.streamlabs  { background: var(--streamlabs-light); }
.card-icon.prism       { background: var(--prism-light); }
.card-icon.appendix    { background: #ECEFF1; }
.card-body h3 { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.card-body p  { font-size: 12.5px; color: var(--text-muted); margin: 0; }
.card-arrow   { margin-left: auto; color: var(--text-muted); font-size: 18px; flex-shrink: 0; }

/* ── デスクトップ対応 ── */
@media (min-width: 768px) {
  body { font-size: 16px; }

  .site-header { height: 62px; padding: 0 28px; }
  :root { --header-h: 62px; --chapnav-h: 48px; }
  .site-title { font-size: 15px; }
  .site-title .subtitle { font-size: 11px; }

  .chapter-nav-inner { padding: 0 28px; gap: 4px; }
  .chapter-nav a { font-size: 13.5px; padding: 0 20px; }

  .chapter-hero { padding: 52px 28px 44px; }
  .chapter-hero h1 { font-size: 28px; }

  .main-content { padding: 36px 28px 120px; }

  .step-title { font-size: 17px; }

  .hero { padding: 80px 28px 88px; }
  .hero h1 { font-size: 32px; }

  .chapter-cards { grid-template-columns: 1fr 1fr; }
}
