/* =============================================
   仮想通貨入出金マニュアル - 共通スタイル
   cyan-manual準拠デザイン
   ============================================= */

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

:root {
  --grad-start: #1a4a73;
  --grad-mid1:  #2d6a9f;
  --grad-mid2:  #4a90c4;
  --grad-end:   #7ec8e3;
  --accent:     #4a90c4;
  --accent-light: #e8f4fd;
  --text:       #1a2a3a;
  --text-sub:   #4a6a8a;
  --white:      #ffffff;
  --bg:         #f4f8fc;
  --border:     #d0e4f0;
  --warn-bg:    #fff4e6;
  --warn-border:#e8931a;
  --danger-bg:  #fff0f0;
  --danger-border:#e83a3a;
  --success-bg: #f0fff4;
  --success-border:#2ecc71;
  --radius:     12px;
  --shadow:     0 4px 20px rgba(26,74,115,0.12);
}

body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 15px;
}

/* ---- ヘッダー ---- */
.site-header {
  background: linear-gradient(135deg, var(--grad-start) 0%, var(--grad-mid1) 40%, var(--grad-mid2) 70%, var(--grad-end) 100%);
  color: var(--white);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(26,74,115,0.3);
}

.site-header .brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.back-link {
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.2s;
}
.back-link:hover { opacity: 1; }

.page-indicator {
  font-size: 12px;
  opacity: 0.75;
  letter-spacing: 0.05em;
}

/* ---- ヒーロー（各チャプター上部） ---- */
.chapter-hero {
  background: linear-gradient(135deg, var(--grad-start) 0%, var(--grad-mid1) 50%, var(--grad-mid2) 100%);
  color: var(--white);
  padding: 48px 24px 40px;
  text-align: center;
}

.chapter-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 12px;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 16px;
}

.chapter-hero h1 {
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.3;
}

.chapter-hero .subtitle {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 20px;
}

.chapter-hero .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.chapter-hero .tag {
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
}

/* ---- メインコンテンツ ---- */
.main-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* ---- セクション ---- */
.section {
  margin-bottom: 40px;
}

.section-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px;
}

.section p {
  color: var(--text);
  margin-bottom: 12px;
}

/* ---- カード ---- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

/* ---- 注意ボックス ---- */
.alert {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.alert-icon { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.alert-body { flex: 1; }
.alert-body strong { display: block; margin-bottom: 4px; font-size: 14px; }
.alert-body p, .alert-body li { font-size: 14px; color: inherit; }

.alert-danger  { background: var(--danger-bg);  border-left: 4px solid var(--danger-border);  color: #8b1a1a; }
.alert-warn    { background: var(--warn-bg);    border-left: 4px solid var(--warn-border);    color: #7a4a10; }
.alert-success { background: var(--success-bg); border-left: 4px solid var(--success-border); color: #1a6a3a; }
.alert-info    { background: var(--accent-light); border-left: 4px solid var(--accent);       color: #1a4a73; }

/* ---- チェックリスト ---- */
.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(26,74,115,0.07);
  font-size: 14px;
}

.check-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.check-list.danger li::before { content: '⚠'; color: var(--warn-border); }
.check-list.must  li::before  { content: '🔴'; font-size: 12px; margin-top: 3px; }

/* ---- ステップ ---- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid2));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.step-body { flex: 1; padding-top: 6px; }
.step-body h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.step-body p, .step-body li { font-size: 14px; color: var(--text); }
.step-body ul { padding-left: 16px; margin-top: 6px; }
.step-body ul li { list-style: disc; margin-bottom: 4px; }

/* ---- 画像プレースホルダー ---- */
.img-placeholder {
  background: linear-gradient(135deg, #e8f4fd, #d0e8f8);
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 13px;
  margin: 12px 0;
  gap: 8px;
}
.img-placeholder .img-icon { font-size: 32px; opacity: 0.5; }
.img-placeholder span { opacity: 0.7; }

/* ---- テーブル ---- */
.table-wrap { overflow-x: auto; margin-bottom: 16px; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 14px;
}
thead tr {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid1));
  color: var(--white);
}
th { padding: 12px 16px; text-align: left; font-weight: 700; }
td { padding: 11px 16px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--accent-light); }

/* ---- フロー図 ---- */
.flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 16px 0;
}
.flow-item {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  width: 100%;
  max-width: 320px;
}
.flow-arrow {
  color: var(--accent);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
}

/* ---- パターンカード ---- */
.pattern-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 480px) { .pattern-grid { grid-template-columns: 1fr; } }

.pattern-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--accent);
}
.pattern-card.pattern-b { border-top-color: #2ecc71; }
.pattern-card h4 { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.pattern-card ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pattern-card ul li { font-size: 13px; color: var(--text-sub); display: flex; gap: 6px; }
.pattern-card ul li::before { content: '✓'; color: var(--accent); font-weight: 700; }
.pattern-card.pattern-b ul li::before { color: #2ecc71; }

/* ---- ナビゲーション（前へ/次へ） ---- */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--white);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
  flex: 1;
  max-width: 200px;
}
.nav-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(26,74,115,0.18); }
.nav-btn.next { justify-content: flex-end; margin-left: auto; }

/* ---- フッター ---- */
.site-footer {
  background: var(--grad-start);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 28px 20px;
  font-size: 12px;
  line-height: 1.7;
}

/* ---- インデックス専用 ---- */
.index-hero {
  background: linear-gradient(135deg, var(--grad-start) 0%, var(--grad-mid1) 40%, var(--grad-mid2) 70%, var(--grad-end) 100%);
  color: var(--white);
  padding: 64px 24px 56px;
  text-align: center;
}
.index-hero .label {
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 700;
  opacity: 0.8;
  margin-bottom: 12px;
}
.index-hero h1 { font-size: clamp(26px, 6vw, 40px); font-weight: 900; line-height: 1.2; margin-bottom: 14px; }
.index-hero .lead { font-size: 14px; opacity: 0.85; max-width: 480px; margin: 0 auto 24px; }

.toc-grid {
  max-width: 680px;
  margin: 40px auto 0;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.toc-item:hover { transform: translateX(4px); box-shadow: 0 6px 24px rgba(26,74,115,0.18); }

.toc-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid2));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  flex-shrink: 0;
}

.toc-body { flex: 1; }
.toc-body h3 { font-size: 15px; font-weight: 800; margin-bottom: 3px; }
.toc-body p  { font-size: 12px; color: var(--text-sub); }
.toc-arrow   { color: var(--accent); font-size: 18px; opacity: 0.6; }

/* ---- レスポンシブ ---- */
@media (max-width: 600px) {
  .main-content { padding: 24px 16px 48px; }
  .chapter-hero { padding: 36px 16px 28px; }
  .card { padding: 18px; }
}
