/*
 * ガイドページ共通スタイル。
 * アプリ本体(src/styles/global.css)とは独立した素の静的ページ用。
 * 依存ゼロ・JS なしで完結させる(クローラに確実に読ませるため)。
 */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --border: #e5e5ea;
  --border-strong: #d1d1d6;
  --text: #1c1c1e;
  --text-muted: #6e6e73;
  --primary: #0064ff;
  --primary-hover: #0052d4;
  --accent: #ff3b30;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans',
    'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

/* ===== ヘッダー ===== */
.g-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.g-header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.g-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
}
.g-brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg);
}
.g-header .g-cta {
  margin-left: auto;
}

/* ===== 本文 ===== */
.g-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.g-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.g-breadcrumb a {
  color: var(--text-muted);
}

h1 {
  font-size: 28px;
  line-height: 1.4;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.g-lead {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 32px;
}

h2 {
  font-size: 21px;
  margin: 40px 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
h3 {
  font-size: 17px;
  margin: 28px 0 8px;
}

p {
  margin: 0 0 16px;
}
ul,
ol {
  margin: 0 0 16px;
  padding-left: 1.5em;
}
li {
  margin-bottom: 6px;
}
a {
  color: var(--primary);
}
a:hover {
  color: var(--primary-hover);
}
strong {
  font-weight: 700;
}
code {
  background: #eceef2;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ===== 部品 ===== */
.g-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 0 0 16px;
}
.g-card h3 {
  margin-top: 0;
}
.g-card p:last-child,
.g-card ul:last-child {
  margin-bottom: 0;
}

.g-note {
  background: #eef4ff;
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  padding: 12px 16px;
  margin: 0 0 20px;
  font-size: 15px;
}
.g-note p:last-child {
  margin-bottom: 0;
}

.g-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0 0 24px;
}
.g-steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 40px;
  margin-bottom: 20px;
}
.g-steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}
.g-steps h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.g-steps p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.g-figure {
  margin: 0 0 24px;
}
.g-figure svg {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.g-figure figcaption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

.g-table-wrap {
  overflow-x: auto;
  margin: 0 0 20px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
  background: var(--surface);
}
th,
td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--bg);
  font-weight: 600;
  white-space: nowrap;
}

/* ===== CTA ===== */
.g-cta {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 8px;
  white-space: nowrap;
}
.g-cta:hover {
  background: var(--primary-hover);
  color: #fff;
}
.g-cta-block {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 20px;
  margin: 40px 0 0;
}
.g-cta-block p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

/* ===== 目次カード ===== */
.g-index {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.g-index a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s;
}
.g-index a:hover {
  border-color: var(--primary);
}
.g-index .t {
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
}
.g-index .d {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== フッター ===== */
.g-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.g-footer-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
}
.g-footer a {
  color: var(--text-muted);
}

/* ===== 狭い画面 ===== */
@media (max-width: 600px) {
  body {
    font-size: 15px;
  }
  h1 {
    font-size: 23px;
  }
  h2 {
    font-size: 19px;
  }
  .g-header-inner {
    padding: 10px 14px;
  }
  .g-brand {
    font-size: 14px;
  }
  .g-header .g-cta {
    padding: 8px 12px;
    font-size: 13px;
  }
  .g-main {
    padding: 20px 14px 48px;
  }
}
