/* 使い方ガイド（ガイドのトップ / 機能別ページ / 詳しい手順）。
   コンテナ・見出し・カード・表・アコーディオン・アラート・前後ナビは common/components.css の .th-* を使う。
   ここに残すのは、ガイド固有の並べ方（説明とイラストの 2 段組、できることの並び、手順の 2 段組、画面写真）だけ。
   クラスは guide- 接頭辞。機能ごとの識別色は tokens.css の --th-feature-*（イラストの SVG が直接参照する）。
   旧 .guide-hero / .guide-card / .guide-tip / .desc-* と --guide-* の独自変数は廃止した。 */

/* --- リード文 --- */
.guide-lead {
  max-width: 640px;
  margin: 0 0 24px;
  color: var(--th-color-text-muted);
}

/* --- 導入: 説明 + イラスト。旧 .guide-hero のグラデーション・角丸の箱は廃止 --- */
.guide-intro {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
}

.guide-intro .guide-lead { margin-bottom: 0; }

.guide-intro svg { width: 100%; height: auto; }

/* --- できること --- */
.guide-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.guide-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--th-color-surface);
  border: var(--th-border-outer);
}

.guide-feature > i {
  flex: none;
  font-size: 22px;
  line-height: 1;
  color: var(--th-color-link);
}

.guide-feature strong {
  display: block;
  margin-bottom: 2px;
  font-family: var(--th-font-heading);
  color: var(--th-color-heading);
}

.guide-feature p {
  margin: 0;
  font-size: 13px;
  color: var(--th-color-text-muted);
}

/* --- 手順: 説明と画面写真の 2 段組。番号は CSS カウンタなので HTML には書かない --- */
.guide-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  padding: 20px 0;
  border-top: var(--th-border-inner);
  counter-increment: guide-step;
}

.guide-step:last-child { border-bottom: var(--th-border-inner); }

.guide-step .th-h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 番号は .th-flow と同じ Exo 2 の刻印 */
.guide-step .th-h3::before {
  content: "STEP " counter(guide-step, decimal-leading-zero);
  flex: none;
  padding: 1px 8px;
  font-family: var(--th-font-label);
  font-size: 11px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--th-brand-800);
}

.guide-step-body ul {
  margin-bottom: 12px;
  padding-left: 1.4em;
  font-size: 14px;
}

/* 画面写真は .guide-shot（下部で定義）に統一。サイズ・拡大表示は共通 */
.guide-step-image .guide-shot:last-child { margin-bottom: 0; }

/* --- ログイン導線: ボタン 1 つだけを中央に置く --- */
.guide-cta {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}

/* --- 非会員機能: ツールごとの簡単な手順 + ポイント（アコーディオン内） --- */
.guide-tool-steps {
  margin: 0 0 12px;
  padding-left: 1.4em;
  font-size: 14px;
}

.guide-tool-steps li + li { margin-top: 4px; }

.guide-tools .th-alert { margin-bottom: 12px; }

/* ツール名 + 補足を縦積みの 1 ブロックにまとめる。.th-card-tool-text と同じ
   「flex: 1; min-width: 0」で、長い見出しでも山形アイコンを画面外に押し出さず
   ブロック内で折り返す */
.guide-tool-label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   詳しい手順 (guide-description-*.html)
   ========================================================================== */

/* --- 手順の目次 --- */
.guide-desc-nav { margin-bottom: 32px; }

/* --- 節: STEP のバッジと見出しを横に並べる --- */
.guide-desc-section > .th-h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- 手順のカード: 節ごとの通し番号を見出しの前に打つ --- */
.guide-desc-section { counter-reset: guide-desc-card; }

.guide-desc-card {
  margin-bottom: 16px;
  counter-increment: guide-desc-card;
}

.guide-desc-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.guide-desc-title::before {
  content: counter(guide-desc-card);
  flex: none;
  padding: 0 7px;
  font-family: var(--th-font-label);
  font-size: 13px;
  font-style: italic;
  font-weight: 800;
  color: #fff;
  background: var(--th-brand-800);
}

.guide-desc-lead {
  margin-bottom: 12px;
  color: var(--th-color-text-muted);
}

/* --- 画面写真: 縦横比の違うスクリーンショットを一定の高さに揃え、クリックで拡大できることを
   カーソルで示す（static/js/guide/guide-lightbox.js が .guide-shot のクリックを拾う）。
   欠けると困る文字があるので trim せず object-fit: contain で全体を収める --- */
.guide-shot {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: var(--th-gray-100);
  margin-bottom: 12px;
  border: var(--th-border-inner);
  cursor: zoom-in;
}

.guide-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.guide-shots .guide-shot { margin-bottom: 0; }

/* --- カード末尾の補足メモ: .th-card-body の外に置くため .th-card-body の左右パディングと同じ余白を自前で持つ --- */
.guide-desc-note { margin: 16px; }

/* --- 画面写真の拡大表示（共通ライトボックス。guide-lightbox-modal.html） --- */
.th-modal-lightbox .modal-dialog { max-width: min(960px, 92vw); }

.th-modal-lightbox .modal-body {
  display: flex;
  justify-content: center;
  padding: 0;
  background: var(--th-gray-100);
}

.guide-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
}

/* --- 入力項目の表: 項目名と説明文なので、表の既定の中央寄せから左寄せに戻す --- */
.guide-fields-title {
  margin: 16px 0 8px;
  font-family: var(--th-font-heading);
  font-size: 14px;
  font-weight: 800;
  color: var(--th-color-heading);
}

.guide-fields { margin-top: 12px; }

.guide-fields th,
.guide-fields td { text-align: left; }

/* .th-table tbody th の width: 1% を上書きする。項目名が 1 文字ずつ折り返して縦 1 列になるため */
.guide-fields table tbody th { width: 10em; }

/* --- レスポンシブ --- */
@media screen and (max-width: 768px) {
  .guide-intro { grid-template-columns: 1fr; }

  .guide-intro svg { max-width: 240px; }

  .guide-step { grid-template-columns: 1fr; }
}

@media screen and (max-width: 560px) {
  .guide-fields table tbody th { width: auto; }

  .guide-shot { height: 160px; }
}
