/* Train Sim Studio LP。色と文字は docs/design/DESIGN.md に合わせる */
:root {
  --bg: #f7f5ef;      /* 背景 */
  --paper: #fffdf8;   /* 紙 */
  --white: #ffffff;
  --ink: #15171a;     /* 墨 */
  --sub: #5f5d58;     /* 薄墨 */
  --vermilion: #de3018; /* 朱：主なボタン（1 画面に 1 つ） */
  --blue: #1668c7;
  --green: #00835e;
  --yellow: #ffd23f;
  --limit: #8c8a84;
  --dark: #0f1113;    /* 運転画面の板 */
  --wrap: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Segoe UI", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
}
a { color: var(--blue); }
img, svg { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ヘッダー：駅サインのように、下を墨の太線で閉じる */
.site-header { background: var(--bg); border-bottom: 4px solid var(--ink); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1.1; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand span { font-size: 15px; }
.site-nav { margin-left: auto; display: flex; gap: 4px 18px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 0; }
.site-nav a:hover { text-decoration: underline; }
.lang { display: inline-flex; align-items: center; gap: 4px; }
.lang svg { width: 18px; height: 18px; }

/* はじめの大きな区画 */
.hero { padding: 48px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .04em; border: 2px solid var(--ink); padding: 2px 10px; margin: 0 0 16px; }
h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.3; margin: 0 0 16px; font-weight: 800; letter-spacing: .01em; }
h1 .accent { color: var(--vermilion); }
.lead { font-size: 18px; color: var(--ink); margin: 0 0 24px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; font-size: 17px; font-weight: 700; text-decoration: none; border: 3px solid var(--ink); background: var(--white); color: var(--ink); }
.btn.primary { background: var(--vermilion); border-color: var(--vermilion); color: #fff; }
/* 公開の前は押せない形にする（公開したら aria-disabled を外し、href にストアの URL を入れる） */
.btn[aria-disabled="true"], .btn.primary[aria-disabled="true"] { cursor: default; background: var(--white); color: var(--sub); border: 3px dashed var(--sub); }
.note { font-size: 13px; color: var(--sub); margin: 12px 0 0; }
.screen { border-radius: 22px; overflow: hidden; border: 6px solid var(--ink); background: var(--ink); box-shadow: 0 18px 40px rgba(21, 23, 26, .18); }

/* 区画の共通 */
section { padding: 56px 0; }
section.alt { background: var(--paper); border-top: 1px solid #e6e2d8; border-bottom: 1px solid #e6e2d8; }
h2 { font-size: clamp(24px, 3.2vw, 32px); line-height: 1.35; margin: 0 0 8px; font-weight: 800; }
h2 + .sub { color: var(--sub); margin: 0 0 32px; }
h3 { font-size: 18px; margin: 0 0 6px; line-height: 1.45; }

/* 3 つの手順：路線図の 3 駅のように */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.steps::before { content: ""; position: absolute; left: 16.6%; right: 16.6%; top: 27px; height: 6px; background: var(--vermilion); border-radius: 3px; }
.steps li { position: relative; text-align: center; padding: 0 8px; }
.steps .dot { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; background: var(--white); border: 6px solid var(--ink); display: grid; place-items: center; font-weight: 800; font-size: 20px; position: relative; }
.steps li:nth-child(1) .dot { border-color: var(--green); color: var(--green); }
.steps li:nth-child(3) .dot { border-color: var(--vermilion); color: var(--vermilion); }
.steps p { margin: 0; color: var(--sub); font-size: 15px; }

/* 特長のカード */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--white); border: 3px solid var(--ink); padding: 20px 20px 18px; }
.card .ic { width: 36px; height: 36px; margin-bottom: 10px; }
.card p { margin: 0; font-size: 15px; color: var(--sub); }

/* 採点の見本 */
.score { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.grade { display: flex; gap: 16px; align-items: stretch; }
.grade .big { background: var(--green); color: #fff; font-size: 84px; font-weight: 800; line-height: 1; width: 132px; display: grid; place-items: center; flex: none; }
.grade table { border-collapse: collapse; width: 100%; background: var(--white); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.grade td { padding: 8px 10px; border-bottom: 1px solid #e6e2d8; font-size: 15px; }
.grade td:last-child { text-align: right; font-weight: 800; font-size: 20px; width: 44px; }
.g-a { color: var(--green); } .g-b { color: var(--blue); }

/* 注意の帯 */
.caution { background: var(--white); border-left: 8px solid var(--yellow); padding: 18px 20px; }
.caution h3 { display: flex; align-items: center; gap: 8px; }
.caution ul { margin: 6px 0 0; padding-left: 1.2em; }
.caution li { margin: 2px 0; }

/* よくある質問・本文のページ */
.doc { padding: 40px 0 64px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(26px, 4vw, 36px); border-bottom: 4px solid var(--ink); padding-bottom: 12px; margin-bottom: 24px; }
.doc h2 { font-size: 21px; margin: 36px 0 8px; padding-left: 12px; border-left: 6px solid var(--vermilion); }
.doc h3 { margin-top: 20px; }
.doc table { border-collapse: collapse; width: 100%; background: var(--white); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); margin: 12px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid #e6e2d8; }
.doc th { background: var(--paper); white-space: nowrap; }
.doc .meta { color: var(--sub); font-size: 14px; }
.tbd { background: #fff3c4; border: 1px dashed #b38f00; padding: 0 4px; font-size: .92em; }
details { background: var(--white); border: 2px solid var(--ink); margin: 10px 0; }
summary { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 22px; line-height: 1; font-weight: 400; }
details[open] summary::after { content: "−"; }
details > div { padding: 0 16px 14px; }
details p { margin: 0 0 8px; }
.contact { background: var(--white); border: 3px solid var(--ink); padding: 20px; margin-top: 16px; }

/* フッター */
.site-footer { background: var(--ink); color: #f2f0ea; padding: 32px 0 40px; font-size: 14px; }
.site-footer a { color: #f2f0ea; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.site-footer p { margin: 4px 0; color: #a9a69e; }

/* 狭い画面（スマホの縦）：1 列にする */
@media (max-width: 820px) {
  .hero { padding: 28px 0 32px; }
  .hero .wrap, .score { grid-template-columns: 1fr; gap: 28px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .steps::before { left: 29px; right: auto; top: 30px; bottom: 30px; width: 6px; height: auto; }
  .steps li { display: grid; grid-template-columns: 60px 1fr; gap: 0 16px; text-align: left; padding: 0; }
  .steps .dot { grid-row: span 2; margin: 0; }
  .steps h3 { align-self: end; }
  section { padding: 40px 0; }
  .site-nav .hide-sm { display: none; }
  .brand span { font-size: 14px; }
  .grade .big { width: 96px; font-size: 64px; }
}

/* ---- 2026-11-16 追加：中身のあるページ用の部品 ---- */
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-color: var(--vermilion); }
.page-hero { padding: 40px 0 28px; border-bottom: 1px solid #e6e2d8; }
.page-hero h1 { font-size: clamp(28px, 4.2vw, 42px); margin-bottom: 10px; }
.page-hero .lead { max-width: 760px; margin-bottom: 0; }
.kicker { font-size: 14px; font-weight: 700; color: var(--vermilion); letter-spacing: .06em; margin: 0 0 6px; }

/* 文と図を左右に並べる */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.split.rev > :first-child { order: 2; }
.split p { margin: 0 0 12px; }
.split ul { margin: 0 0 12px; padding-left: 1.2em; }
figure { margin: 0; }
.fig { background: var(--paper); border: 3px solid var(--ink); padding: 14px; }
.fig figcaption { font-size: 13px; color: var(--sub); margin-top: 8px; }
.fig svg text { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Segoe UI", "Yu Gothic UI", sans-serif; }
.num { font-size: 13px; font-weight: 800; color: #fff; background: var(--ink); display: inline-block; padding: 0 8px; margin-right: 8px; vertical-align: 2px; }

/* 流れ（解析の手順） */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: f; }
.flow li { background: var(--white); border: 3px solid var(--ink); padding: 14px 14px 12px; position: relative; }
.flow li::before { counter-increment: f; content: counter(f); position: absolute; top: -14px; left: 12px; background: var(--vermilion); color: #fff; font-weight: 800; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; }
.flow h3 { font-size: 16px; margin-top: 4px; }
.flow p { margin: 0; font-size: 14px; color: var(--sub); }

/* 車種のカード */
.types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.type { background: var(--white); border: 3px solid var(--ink); padding: 16px; }
.type h3 { margin-bottom: 2px; }
.type .tag { font-size: 13px; color: var(--sub); margin: 0 0 10px; }
.type dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; font-size: 13px; }
.type dt { color: var(--sub); white-space: nowrap; }
.type dd { margin: 0; }
.bar { display: block; height: 10px; background: #e6e2d8; position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--green); }
.type p { font-size: 14px; margin: 12px 0 0; color: var(--sub); }

/* 表（中身のある説明用） */
.tbl { border-collapse: collapse; width: 100%; background: var(--white); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); font-size: 15px; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid #e6e2d8; }
.tbl th { background: var(--paper); white-space: nowrap; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* これからの開発（路線図ふうの年表） */
.road { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; }
.road::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 6px; background: var(--ink); border-radius: 3px; }
.road li { position: relative; margin: 0 0 22px; }
.road li::before { content: ""; position: absolute; left: -31px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 5px solid var(--ink); }
.road li.now::before { border-color: var(--vermilion); }
.road li.plan::before { border-style: dashed; border-color: var(--limit); }
.road .when { font-size: 13px; font-weight: 800; color: var(--sub); letter-spacing: .04em; }
.road h3 { margin: 0 0 4px; }
.road p { margin: 0; color: var(--sub); font-size: 15px; }

.more-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.more-links a { display: block; background: var(--white); border: 3px solid var(--ink); padding: 18px 20px; color: var(--ink); text-decoration: none; }
.more-links a:hover { background: var(--paper); }
.more-links strong { font-size: 19px; display: block; margin-bottom: 4px; }
.more-links span { color: var(--sub); font-size: 15px; }
.more-links strong::after { content: " →"; color: var(--vermilion); }

@media (max-width: 960px) {
  .flow { grid-template-columns: 1fr 1fr; gap: 22px 12px; }
  .types { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .split, .more-links { grid-template-columns: 1fr; gap: 20px; }
  .split.rev > :first-child { order: 0; }
}
@media (max-width: 520px) {
  .flow, .types { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  /* 狭い画面ではアイコンだけにして、メニューを 1 行に収める */
  .brand span { display: none; }
  .site-nav { flex-wrap: nowrap; gap: 0 14px; }
  .site-nav a { font-size: 14px; white-space: nowrap; }
  .page-hero h1 br { display: none; }
}
