/* ===== LifeAssist2 サポートサイト 下層ガイドページ用CSS ===== */

/* ===== 1. デザイントークン（変数定義） ===== */
/*! ★変数の定義を :root に戻さないこと（記事ページでヘッダーの左右paddingが崩れる） */
.custom-startguide-view {
  /* --- 既存トークン（維持） --- */
  --color-azure-36: #0081b7;
  --color-orange-46: #ed6c00;
  --color-orange-50: #ffa200;
  --color-grey-20: #333333;
  --color-grey-46: #757575;
  --color-grey-87: #dfdfdf;
  --color-grey-93: #eeeeee;
  --color-white: #ffffff;

  /* --- 新規追加トークン --- */
  --color-text-primary: #505050;
  --color-bg-container-orange: #fcf8f6;
  --color-btn-card-hover: #ED6C0010;
  --color-btn-primary-hover: #ED6C0040;
  --color-border-orange-high: #f6b580;
  --color-border-base: #dfdfdf;
  --color-bg-white: #ffffff;
  --color-bg-blue-low: #1b7893;
  --color-bg-blue-high: #d5f3f7;

  /* --- 余白・タイポグラフィ --- */
  --spacing-xs: 8px;
  --spacing-s: 16px;
  --spacing-m: 24px;
  --spacing-l: 32px;
  --spacing-xl: 40px;

  --font-base: 'Hiragino Kaku Gothic ProN', 'YuGothic', 'SF Pro', sans-serif;
  --font-weight-bold: 700;
  --font-weight-normal: 400;
}

/* ===== 2. ベースリセット（Zendesk環境への干渉防止） ===== */
[class^="custom-"] *,
[class^="custom-"] *::before,
[class^="custom-"] *::after {
  box-sizing: border-box;
}

[class^="custom-"] h1,
[class^="custom-"] h2,
[class^="custom-"] h3,
[class^="custom-"] p,
[class^="custom-"] ul,
[class^="custom-"] ol {
  margin-top: 0;
}

.custom-page-wrapper {
  margin-top: 0; /* 下層ページはパンくずのためにマージンを戻す */
}

/*! 要素セレクタなのでスコープが効かず、この<link>が読み込まれる全記事ページに効く */
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ===== 3. 共通・汎用コンポーネント ===== */
/* アイコン類 */
.custom-icon-play {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.custom-icon-large {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.custom-category-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.custom-icon-check {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ===== 4. 共通（ページ本文コンテナ） ===== */
/*! 上paddingがタイトルバー⇔本文の余白。下の60pxはトークン体系外の直値 */
.custom-main-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--spacing-l) var(--spacing-s) 60px;
}

/*! @media で囲むのは必須（WCAG 2.1 達成基準 2.3.3）。外さないこと */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ===== 5. 下層ページ（ガイドページ）専用スタイル ===== */
/* パンくず・タイトル */
.custom-breadcrumb {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--spacing-s);
  font-size: 14px;
}
/*! 配色はリンク＝オレンジ／現在ページ＝グレーで他ページと統一（2026-09-17）。
    ★Figmaは逆（リンク＝グレー／現在＝オレンジ）だが、既存の見た目を優先する方針で確定済み。
      Figmaに合わせて戻さないこと（design.md パンくず節） */
.custom-breadcrumb a {
  color: var(--color-orange-46);
  text-decoration: none;
}
.custom-breadcrumb a:hover {
  text-decoration: underline;
}
.custom-breadcrumb span {
  color: #666464; /* style.css の現在ページのグレーと同値 */
}
/*! 旧デザイン（青の全幅バナー）の打ち消し。position/left/transform を含めて消さないこと */
.custom-page-title-bar {
  background-color: transparent;
  color: inherit;
  padding: 0;
  margin-bottom: 0;
  width: auto;
  position: static;
  left: auto;
  transform: none;
}
.custom-page-title-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px var(--spacing-s);
  font-size: 24px; /* PC: title.h1（category/article pageと統一。片方だけ変えないこと） */
  font-weight: 600; /* 太字トークンに統一（旧: --font-weight-bold=700） */
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-base);
}
@media (max-width: 767px) {
  .custom-page-title-inner {
    padding: 8px var(--spacing-s);
    font-size: 22px; /* Mobile: title.h2 */
  }
}

/* ガイド: ステップナビゲーション */
.custom-step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-l);
  gap: 12px;
}
.custom-step-item-wrapper {
  position: relative;
  flex: 1;
}
.custom-step-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 64px;
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  text-align: center;
  text-decoration: none;
  border: 6px solid transparent;
  color: var(--color-text-primary);
  transition: background-color 0.2s, border-color 0.2s;
  cursor: pointer;
  box-sizing: border-box;
}
.custom-step-item:focus-visible {
  outline: 2px solid var(--color-orange-46);
  outline-offset: 2px;
}
/* ステータス：Incomplete (未完了) */
.custom-step-item.is-incomplete {
  border-color: var(--color-border-base);
  background-color: var(--color-bg-white);
}
.custom-step-item.is-incomplete:hover,
.custom-step-item.is-incomplete:focus-visible {
  border-color: var(--color-border-orange-high);
  background-color: var(--color-bg-container-orange);
}
/* ステータス：Now (現在地) */
.custom-step-item.is-now {
  border-color: var(--color-border-orange-high);
  background-color: var(--color-bg-container-orange);
}
.custom-step-item.is-now:hover,
.custom-step-item.is-now:focus-visible {
  border-color: var(--color-border-orange-high);
  background-color: var(--color-bg-container-orange);
}
/* ステータス：Completed (完了) */
.custom-step-item.is-completed {
  border-color: transparent;
  background-color: var(--color-bg-container-orange);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* チェックアイコンを擬似要素で追加 */
.custom-step-item.is-completed::before {
  content: "";
  width: 18px;
  height: 18px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ed6c00"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.custom-step-item.is-completed:hover,
.custom-step-item.is-completed:focus-visible {
  border-color: var(--color-border-orange-high);
  background-color: var(--color-bg-container-orange);
}


/* 呼び出し記事を入れるコンテナ */
.guide-main-layout {
  margin-left: -16px;
  margin-right: -16px;
}

/*! 要素セレクタなので全記事ページに効く。この値は変更しないこと（ユーザー決定） */
h2, h3 {
  scroll-margin-top: 100px;
}

/* ===== リンク(aタグ)以外のステップアイテムの誤認防止 ===== */
div.custom-step-item {
  cursor: default;
}

/* divの場合はhover時の枠線・背景色変化（リンクと誤認させる動き）を無効化 */
div.custom-step-item.is-completed:hover,
div.custom-step-item.is-completed:focus-visible {
  border-color: transparent;
}

/* 矢印アイコン */
.custom-step-arrow {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid var(--color-border-base);
  flex-shrink: 0;
}
/* NEXTバッジ */
.custom-step-badge {
  position: absolute;
  top: -34px;
  left: 0;
  background-color: var(--color-border-orange-high);
  color: var(--color-white);
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  padding: 4px 10px;
  border-radius: 6px;
}
.custom-step-badge::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 10px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--color-border-orange-high);
}

/* ガイド: セクション見出し */
.custom-section-heading {
  border-left: none;
  background-color: #62605c; /*! 未定義トークンのため暫定Hex直書き（正式名が決まったら変数化） */
  color: var(--color-white); /* color.text.on-surface相当 */
  padding: var(--spacing-xs) var(--spacing-m);
  font-size: 18px; /* title.h3 */
  font-weight: 600; /* 太字トークンに統一（旧: --font-weight-bold=700） */
  margin-bottom: var(--spacing-s);
}
.custom-sub-heading-bar {
  background-color: transparent;
  color: var(--color-text-primary);
  border-left: 6px solid var(--color-orange-46); /* color.border.orange */
  padding: 4px var(--spacing-m);
  font-size: 18px; /* title.h3 */
  font-weight: 600; /* 太字トークンに統一（旧: --font-weight-bold=700） */
  /*! margin-top は <h3> の箇所には効かない（セクション2のリセットが詳細度で勝つ）。<div> のみ効く */
  margin-top: var(--spacing-m);
  margin-right: 0;
  margin-bottom: var(--spacing-xs);
  margin-left: 0;
  width: 100%;
  display: block;
  box-sizing: border-box;
}

/* ガイド: アクションボタン */
.custom-primary-btn-wrapper {
  text-align: center;
  margin: 80px 0px;
}
.custom-primary-btn {
display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 620px;
  height: 48px;
  padding: 0 16px;
  gap: 16px;
  border-radius: 6px;
  background-color: var(--color-orange-46);
  color: var(--color-white);
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  transition: opacity 0.2s;
  position: relative;
}
.custom-primary-btn::after {
content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--color-white);
  border-right: 2px solid var(--color-white);
  transform: rotate(45deg);
  position: absolute;
  right: 16px;
}
.custom-primary-btn:hover,
.custom-primary-btn:focus-visible {
  opacity: 0.8;
}
.custom-primary-btn:focus-visible {
  outline: 2px solid var(--color-orange-46);
  outline-offset: 4px;
}

/* ガイド: 詳細資料リスト */
.custom-docs-section {
  margin-top: 80px;
  border-top: 1px solid var(--color-border-base);
  padding-top: var(--spacing-m);
}
.custom-docs-title {
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-s);
}
.custom-docs-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-l) 0;
}
.custom-docs-list li {
  margin-bottom: var(--spacing-s);
}
.custom-docs-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-primary);
  text-decoration: underline;
}
.custom-docs-link:hover {
  opacity: 0.7;
}

/* ===== 6. レスポンシブ対応 (ブレークポイント 768px未満) ===== */
@media (max-width: 767px) {
/* 下層ガイドページ用 */
  .custom-step-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;

  }
  .custom-step-badge {
    display: none;
  }
  .custom-step-arrow {
    margin: 4px auto;
    border-top: 12px solid var(--color-border-base);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: none;
  }
  .custom-step-item {
    height: 38px;
    font-size: 14px;
    border-width: 4px;
  }
  .custom-primary-btn {
    width: 100%;
    min-width: auto;
    font-size: 16px;
    padding: 16px;
  }
  .custom-primary-btn-wrapper {
  text-align: center;
  margin: 40px 0px;
}
.custom-main-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--spacing-l) var(--spacing-s) var(--spacing-xl); /*! 上はPCと同じ32px */
}
}

  /* ===== 7. フッター / 戻る・上へボタン追加 ===== */
/* LifeAssist2サポートサイトTOPへ戻る */
.custom-back-to-top-wrapper {
  margin-top: 60px;
  margin-bottom: 16px;
}
.custom-back-to-top-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 16px;
}
.custom-back-to-top-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}
/* 左向きの黒い三角形 */
.custom-icon-arrow-left {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-right: 6px solid var(--color-text-primary);
}

/* ページの先頭へ (全幅グレー背景) */
.custom-page-top-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: var(--color-grey-93);
  color: var(--color-text-primary);
  text-decoration: none;
  padding: 16px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 0.2s;
}
.custom-page-top-btn:hover {
  background-color: var(--color-grey-87);
}
/* 上向きの矢印（CSSで描画） */
.custom-icon-arrow-up {
  position: relative;
  width: 12px;
  height: 14px;
}
.custom-icon-arrow-up::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 6px;
  height: 6px;
  border-top: 1.5px solid var(--color-text-primary);
  border-left: 1.5px solid var(--color-text-primary);
}
.custom-icon-arrow-up::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 12px;
  background-color: var(--color-text-primary);
}

/*! 記事本文側の <p> ラッパー。潰さないと <p> の既定 margin-bottom が隙間になる */
.custom-startguide-view .custom-page-top-wrapper {
  margin: 0;
}
/*! ★スタートガイド記事だけに限定すること（無条件に書くと通常記事でもフッターの80pxが消える） */
body:has(#article-main-container.custom-startguide-mode) .custom-footer {
  margin-top: 0;
}

/*! style.css 対策。この !important を外すと下線・オレンジ文字になる */
.custom-page-wrapper a.custom-step-item,
.custom-page-wrapper a.custom-page-top-btn {
  text-decoration: none !important;
  color: var(--color-text-primary) !important;
}
.custom-page-wrapper a.custom-primary-btn {
  text-decoration: none !important;
  color: var(--color-white) !important;
}

/* --- 追加要素用スタイル --- */
/*! 導入文＋ページ内アンカーを包む枠。「3.アプリを設定」「4.各機器との接続」の2記事で使用 */
.custom-page-in-link-container {
  margin-bottom: var(--spacing-xl);
}
.custom-in-page-nav {
  display: flex;
  flex-wrap: wrap;
  row-gap: var(--spacing-s);
  column-gap: 16px; /* 区切り線が左右16pxで対称になる値（TOP・カテゴリページのAnchor-Linksと同じ） */
  margin-top: var(--spacing-xs);
}

/* ページ内アンカーリンク（スタートガイド記事） */
/*! inline-flex のままにすること（記事本文で単体配置されたとき行を分断しないため） */
/*! ★クラス名 .custom-link-with-icon-primary は消さないこと（Zendesk記事本文HTML側で使用中） */
.custom-link-with-icon-primary,
.custom-anchor-link {
  display: inline-flex;
  align-items: center;
  font-size: 14px; /* Mobile。PCは下の @media で16px */
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text-primary);
  text-decoration: none;
}
@media (min-width: 768px) {
  .custom-link-with-icon-primary,
  .custom-anchor-link {
    font-size: 16px;
  }
}
.custom-link-with-icon-primary::before,
.custom-anchor-link::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  /* オレンジの円と白抜きの下向き矢印SVG（TOP・カテゴリページと同一） */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><circle cx="8" cy="8" r="8" fill="%23ED6C00"/><path d="M8 4.2v6.4M5.2 8l2.8 2.8L10.8 8" fill="none" stroke="%23ffffff" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
/* 区切り線。単体で文中に置かれたときに縦線が出ないよう、ナビの中だけに限定している */
.custom-in-page-nav .custom-link-with-icon-primary:not(:last-child)::after,
.custom-in-page-nav .custom-anchor-link:not(:last-child)::after {
  content: "";
  flex-shrink: 0;
  width: 1px;
  height: 24px;
  margin-left: 16px;
  background-color: var(--color-border-base);
}
.custom-link-with-icon-primary:focus-visible,
.custom-anchor-link:focus-visible {
  outline: 2px solid var(--color-orange-46);
  outline-offset: 2px;
}
.custom-horizontal-rule {
  border-bottom: 1px solid var(--color-border-base);
  margin: var(--spacing-m) 0;
}
.custom-list-heading-orange {
  color: var(--color-orange-46);
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--spacing-s);
}
.custom-video-link-list {
  list-style: none;
  padding: 0;
}
.custom-video-link-list li {
  margin-bottom: 12px;
}
.custom-video-link-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-primary);
  text-decoration: underline;
}
.custom-icon-play-circle {
  width: 20px;
  height: 20px;
  background-color: var(--color-text-primary);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.custom-icon-play-circle::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 8px;
  border-left: 6px solid var(--color-white);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
/* グレー背景パネル（汎用） */
.custom-gray-panel {
  background-color: var(--color-grey-93);
  padding: var(--spacing-m);
  margin-top: var(--spacing-m);
  margin-bottom: var(--spacing-m);
}
/* 動的生成リスト（list-area-1, 2, 3...）の下マージン確保 */
div[id^="list-area-"] {
  margin-bottom: var(--spacing-xl);
}

/* 静的リスト（記事本文側）の下マージン確保 */
ul.custom-video-link-list {
  margin-bottom: var(--spacing-xl);
}
