/* 巡録 / ScanRounds — 共通スタイル
   外部フォント・CDN・解析スクリプト・Cookieなし。システムフォントのみ。 */

:root {
  --bg: #f7f7f5;
  --bg-card: #ffffff;
  --fg: #1b1d1f;
  --fg-muted: #5b5f66;
  --border: #e2e2df;
  --accent: #0f6e5e;
  --accent-fg: #ffffff;
  --accent-soft: #e6f2ee;
  --danger: #a33d2c;
  --code-bg: #f0efe9;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --max-width: 880px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181a;
    --bg-card: #1e2022;
    --fg: #eceeef;
    --fg-muted: #a3a8ad;
    --border: #33373a;
    --accent: #4fd3ae;
    --accent-fg: #0c221c;
    --accent-soft: #1b332c;
    --danger: #e2a08e;
    --code-bg: #24272a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.24);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Segoe UI", Roboto, "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダー */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--fg);
  text-decoration: none;
}

.brand .brand-sub {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--fg-muted);
}

nav.main-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

nav.main-nav a {
  color: var(--fg);
  text-decoration: none;
}

nav.main-nav a:hover {
  color: var(--accent);
}

.lang-switch {
  font-size: 0.85rem;
  white-space: nowrap;
}

.lang-switch a {
  color: var(--fg-muted);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 6px;
}

.lang-switch a[aria-current="true"] {
  color: var(--fg);
  font-weight: 700;
  background: var(--accent-soft);
}

/* ヒーロー */
.hero {
  padding: 56px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 auto 24px;
}

.badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

.btn:hover {
  opacity: 0.92;
}

.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ヒーロー代表スクリーンショット */
.hero-shots {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}

.hero-shots img {
  width: 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 560px) {
  .hero-shots img {
    width: 140px;
  }
}

/* セクション */
section {
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type,
main > section:last-child {
  border-bottom: none;
}

section h2 {
  font-size: 1.5rem;
  margin: 0 0 20px;
}

section h3 {
  font-size: 1.15rem;
  margin: 28px 0 10px;
}

.section-lead {
  color: var(--fg-muted);
  margin: -8px 0 24px;
}

/* カードグリッド */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.card p {
  color: var(--fg-muted);
  margin-bottom: 0;
}

/* フロー図（テキストベース・番号付き） */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.flow li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.92rem;
}

.flow li.arrow {
  background: none;
  border: none;
  padding: 0 2px;
  color: var(--fg-muted);
}

/* 比較表 */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  font-size: 0.95rem;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--accent-soft);
  font-weight: 700;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

td.yes {
  color: var(--accent);
  font-weight: 700;
}

td.no {
  color: var(--fg-muted);
}

/* 価格 */
.price-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.price-box .price {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 6px 0;
}

.price-box .price small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg-muted);
}

/* 説明書：目次・章 */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 8px;
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.toc ol {
  columns: 2;
  column-gap: 24px;
  margin: 0;
  padding-left: 1.2em;
}

.toc li {
  break-inside: avoid;
  margin-bottom: 6px;
}

.chapter {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 16px;
}

.chapter h2 {
  font-size: 1.4rem;
}

.chapter .chapter-num {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 4px;
}

figure {
  margin: 20px 0;
  text-align: center;
}

figure img {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0 auto;
  background: var(--bg-card);
}

figcaption {
  color: var(--fg-muted);
  font-size: 0.88rem;
  margin-top: 8px;
}

.steps {
  padding-left: 1.4em;
}

.steps li {
  margin-bottom: 10px;
}

.note {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 0.95rem;
}

.note.warn {
  background: transparent;
  border-color: var(--danger);
  color: var(--fg);
}

.note strong {
  color: var(--accent);
}

.note.warn strong {
  color: var(--danger);
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--code-bg);
  border-radius: 6px;
}

code {
  padding: 2px 6px;
  font-size: 0.9em;
}

pre {
  padding: 14px 16px;
  overflow-x: auto;
}

pre code {
  padding: 0;
  background: none;
}

details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}

details summary {
  cursor: pointer;
  font-weight: 700;
}

details[open] summary {
  margin-bottom: 10px;
}

/* フッター */
footer.site-footer {
  padding: 32px 0 60px;
  color: var(--fg-muted);
  font-size: 0.85rem;
}

footer.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

footer.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

footer.site-footer a {
  color: var(--fg-muted);
}

footer.site-footer a:hover {
  color: var(--accent);
}

.disclaimer {
  font-size: 0.82rem;
  color: var(--fg-muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 8px;
}

@media (max-width: 560px) {
  .toc ol {
    columns: 1;
  }
  section,
  .chapter {
    padding: 32px 0;
  }
  .hero {
    padding: 40px 0 32px;
  }
}
