:root {
  --accent: #0e5c4a;
  --text: #222;
  --muted: #666;
  --line: #e0e0e0;
  --bg: #fff;
  --bg-soft: #f6f6f4;
}

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

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

.inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--accent); }

/* ヘッダー (スクロール時も画面上部に固定) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.site-header .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
}
.brand {
  display: block;
  line-height: 0;
}
.brand img {
  height: 24px;
  width: auto;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.9rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.buy-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 4px;
  white-space: nowrap;
}
.buy-button:hover { opacity: 0.85; }
.lang-switch {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 10px;
  white-space: nowrap;
}
.lang-switch:hover { color: var(--accent); border-color: var(--accent); }

/* 本文 */
main { padding: 40px 20px 64px; }
main h1 { font-size: 1.5rem; margin-bottom: 24px; }
main h2 {
  font-size: 1.15rem;
  margin: 40px 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
}
main h3 { font-size: 1rem; margin: 24px 0 8px; }
main h4 { font-size: 0.95rem; margin: 16px 0 4px; }
main p, main ul, main ol, main dl, main table { margin-bottom: 16px; }
main ul, main ol { padding-left: 1.4em; }

main table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
main th, main td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
}
main th { background: var(--bg-soft); font-weight: 600; white-space: nowrap; }

.note { color: var(--muted); font-size: 0.9rem; }

/* 画像 */
main img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
main figure { margin: 0 0 24px; }
main figure img { display: block; }

/* 本文中のスクリーンショット・写真。原寸の違いで右端が段にならないよう幅を揃える */
.shot { width: 100%; max-width: 800px; }
img.shot { display: block; margin-bottom: 24px; }
figure.shot img { width: 100%; }

/* トップの開発中告知（Ver.2）。ヒーローの直下に 1 ブロックだけ置く */
.hero-notice {
  margin: 0 0 48px;
  padding: 16px 20px;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.hero-notice p {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.6;
  margin: 0;
}
.hero-notice p + p { margin-top: 6px; }
.hero-notice p.note {
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 8px;
}
/* 告知ボックスの中に登録ボタンを置くとき (コントローラのメルマガ導線)。
   ボタンが主役になるので、左の罫線は外して中央に寄せる */
.hero-notice.is-center {
  text-align: center;
  border-left: 0;
  border-radius: 6px;
  padding: 20px;
}
.hero-notice .button { font-size: 1rem; }
.hero-notice p + p:has(> .button) { margin-top: 12px; }

/* TGS バナー */
.tgs-banner {
  display: block;
  margin-bottom: 24px;
}
.tgs-banner img { display: block; width: 100%; }
.tgs-banner-label {
  display: block;
  text-align: center;
  font-weight: 600;
  margin-bottom: 8px;
}
main figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

/* 動画などの埋め込み */
main iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 6px;
  margin-bottom: 16px;
}

/* ボタン */
.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
}
.button:hover { opacity: 0.85; }
/* 大きめのボタン (トップのヒーロー直下の購入導線など) */
.button-lg {
  font-size: 1.15rem;
  padding: 14px 40px;
}

/* タブ (セグメント切替)
   ヘッダーのナビは「いまいるページ」を緑文字で示している。タブも緑文字＋緑の下線だと
   同じ表現が 2 段に重なり、ページ内の切替がサイトナビの続きに見えてしまう。
   そのため罫線と緑は使わず、グレー地のコンテナに白いつまみが乗る形にしている。 */
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 32px;
  padding: 4px;
  background: var(--bg-soft);
  border-radius: 8px;
}
.tabs button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  cursor: pointer;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected='true'] {
  color: var(--text);
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* ページ見出しと切替を同じ行に置く。
   ヘッダーのナビ → h1 → 切替 と「いまどこか」を示す帯が 3 段重なるのを 2 段にする。 */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 32px;
}
.page-head h1 { margin-bottom: 0; }
.page-head .tabs { margin: 0; }

/* パネル先頭の見出しはタブ名と重複するので、タブが有効なときだけ隠す。
   .tabs が .page-head の中に入り兄弟セレクタでは届かないため、
   tabs.js が body に付ける .tabs-active を見る (JS 無効時は見出しがそのまま出る) */
body.tabs-active .tabpanel > h2:first-child { display: none; }

/* ページ内目次 */
.toc {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 14px 20px;
  margin: 0 0 40px;
  background: var(--bg-soft);
  border-radius: 6px;
  font-size: 0.9rem;
}
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* これからやること */
/* 段階（まず進めること / そのあと）。最初の段階だけアクセントの縦罫で強調し、
   2 つ目以降は罫なし。左端は padding で揃える（19px = 3px の罫 + 16px） */
.plan-stage {
  padding-left: 19px;
  margin-bottom: 28px;
}
.plan-stage.is-first {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}
.plan-stage-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.plan-stage.is-first .plan-stage-label { color: var(--accent); }

.plan-table { margin-bottom: 20px; }
.plan-table th {
  width: 7em;
  white-space: normal;   /* 英語の長い区分名（Under consideration）を折り返す */
  vertical-align: top;   /* 内容が複数行でも見出しは上端にそろえる */
}
.plan-table td { line-height: 1.9; }

/* リリースノート */
.releases { margin-top: 20px; }
.release {
  border-top: 1px solid var(--line);
  padding: 20px 0 4px;
}
.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 8px;
}
.release-version { font-weight: 700; font-size: 1.05rem; }
.release-head time {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.release ul { margin-bottom: 8px; }
.release li { line-height: 1.7; }
.release p { margin-bottom: 8px; }
.releases-older > .release:first-of-type { border-top: none; }
.releases-older summary {
  cursor: pointer;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.9rem;
}
.releases-older[open] summary { border-bottom: 1px solid var(--line); }

/* 開発の歴史 */
.history { list-style: none; padding: 0; margin: 24px 0 0; }
.history li {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 20px;
  padding: 0 0 28px 0;
}
.history-when {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  padding-top: 2px;
}
/* 年月とタイトルの間に縦線を通して、年表であることを示す */
.history-body {
  border-left: 2px solid var(--line);
  padding: 0 0 0 20px;
  position: relative;
}
.history-body::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.history-body h4 { margin: 0 0 4px; font-size: 1rem; }
.history-body p { margin: 0 0 10px; color: var(--muted); font-size: 0.92rem; }
.history-body img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 6px;
}
@media (max-width: 560px) {
  .history li { grid-template-columns: 1fr; gap: 6px; }
  .history-when { text-align: left; }
}

/* スタッフ */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 28px 16px;
  margin: 24px 0;
}
.staff { text-align: center; }
.staff img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}
.staff-name { font-weight: 600; margin-top: 8px; }
.staff-role {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 2px;
}
.staff-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}
.staff-link {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M10.5 13.5a4.5 4.5 0 0 0 6.4 0l3-3a4.5 4.5 0 0 0-6.4-6.4l-1 1'/%3E%3Cpath d='M13.5 10.5a4.5 4.5 0 0 0-6.4 0l-3 3a4.5 4.5 0 0 0 6.4 6.4l1-1'/%3E%3C/svg%3E")
    center / 16px 16px no-repeat;
}
.staff-link:hover, .staff-link:focus-visible { opacity: 1; }
/* リンク先は読み上げ用にだけ持たせ、画面上はアイコンだけを見せる */
.staff-link span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* トップページ */
.hero { margin-bottom: 48px; }
/* ヒーロー直下の購入ボタン。サイトで一番押してほしい導線なので中央に大きく置く */
.hero-cta {
  margin-top: 24px;
  text-align: center;
}
.hero h1 { font-size: 1.8rem; line-height: 1.4; margin-bottom: 12px; }
.hero p { color: var(--muted); }
.hero-visual {
  position: relative;
  margin-bottom: 24px;
}
.hero-img {
  display: block;
  width: 100%;
  border-radius: 8px;
}
.hero-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(64%, 480px);
  height: auto;
  filter:
    drop-shadow(2px 0 0 #fff)
    drop-shadow(-2px 0 0 #fff)
    drop-shadow(0 2px 0 #fff)
    drop-shadow(0 -2px 0 #fff)
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 16px rgba(255, 255, 255, 0.7));
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.card h3 { margin-top: 0; }
.card-img {
  display: block;
  max-width: 320px;
  margin-bottom: 12px;
}
.card .tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0 8px;
  margin-left: 8px;
  vertical-align: middle;
}

/* 車両一覧 */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.car-grid figure { margin: 0; }

/* 製品ロゴ (タブ選択時は見出しが隠れるので、この画像が製品名になる) */
.product-logo {
  display: block;
  width: auto;
  max-width: min(100%, 420px);
  height: auto;
  border-radius: 0;
  margin: 8px auto 24px;
}

/* 製品のリード文と購入ボタン */
.product-lead,
.product-cta { text-align: center; }
.product-lead { margin-top: 20px; }
.product-cta { margin-bottom: 40px; }

/* 路線図 (縦長) の横に車両などを並べる */
.route-layout {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 8px 36px;
  align-items: start;
  margin-bottom: 24px;
}
.route-layout .route-map { margin: 0; position: sticky; top: 90px; }
.route-layout .route-map img { width: 100%; height: auto; }
.route-side > :last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .route-layout { grid-template-columns: 1fr; gap: 24px; }
  /* 狭い画面では地図を先に読ませず、説明と車両を上に出す */
  .route-layout .route-map { order: 2; position: static; }
  .route-side { order: 1; }
}

/* ボタンを横並びにする (登録先を続けて踏んでもらう導線) */
.button-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 560px;
  margin-bottom: 32px;
}
.button-row .button {
  text-align: center;
  padding: 12px 8px;
}
/* 一目でどのサービスか分かるよう、ボタンは各社の色にする。
   YouTube の赤は #FF0000 だと白文字とのコントラストが 4.0:1 で AA を満たさないため、
   少し濃い #e60000 (4.8:1) を使う。メルマガは自社のものなのでサイトの緑のまま。 */
.button-x { background: #000; }
.button-youtube { background: #e60000; }

/* 写真を並べる */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.photo-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ニュース */
.news-list { list-style: none; padding: 0; }
.news-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.news-list time { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.category {
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
  white-space: nowrap;
}
.article-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* 稼働状況 */
.status-list { list-style: none; padding: 0; }
.status-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.status-badge {
  font-size: 0.8rem;
  border-radius: 4px;
  padding: 1px 10px;
  white-space: nowrap;
  color: #fff;
  background: var(--muted);
}
.status-badge[data-status="operational"] { background: #2e7d32; }
.status-badge[data-status="degraded"] { background: #b26a00; }
.status-badge[data-status="down"] { background: #c62828; }

/* フッター */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  font-size: 0.85rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 12px;
}
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }
.copyright { color: var(--muted); }
.copyright a { color: inherit; text-decoration: none; }
.copyright a:hover { color: var(--accent); }

/* スマホ表示 */
@media (max-width: 640px) {
  body { font-size: 15px; }
  main { padding: 24px 20px 48px; }
  main h1 { font-size: 1.3rem; }
  .hero h1 { font-size: 1.4rem; }
  .site-header .inner { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .site-nav { gap: 2px 12px; width: 100%; order: 3; }
  .card { padding: 16px; }
  .card-img { max-width: 100%; }

  /* 3 つ並べたボタンが 1 行に収まるように詰める */
  .button-row { gap: 8px; }
  .button-row .button { padding: 12px 4px; font-size: 0.9rem; }

  /* 狭い画面では h1 と切替を横に並べず、切替を次の行に落として全幅で使う
     (flex-basis: 100% にしないと、折り返さずに右へ溢れる) */
  .page-head { gap: 12px; }
  .page-head .tabs { flex: 1 1 100%; }

  /* 切替は画面幅いっぱいに広げ、3 つ並んでも 1 行に収まるようにする */
  .tabs { display: flex; }
  .tabs button {
    flex: 1 1 0;
    padding: 7px 8px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  /* 幅の広い表は横スクロール */
  main table {
    display: block;
    overflow-x: auto;
  }
  main th { min-width: 7em; }

  /* これからやること: 区分を上・内容を下に縦積みし、横幅をすべて内容に使う */
  .plan-table, .plan-table tr, .plan-table th, .plan-table td {
    display: block;
    width: auto;
    min-width: 0;
  }
  .plan-table th { border-bottom: none; }
  .plan-table td { border-top: none; margin-bottom: 12px; }

  /* 狭い画面では字下げを詰めて、内容に幅を回す */
  .plan-stage { padding-left: 12px; }
  .plan-stage.is-first { padding-left: 9px; }
}
