:root {
  --guide-image-bg: #f4f0ea;
  --guide-image-line: #ded7ce;
  --guide-image-ink: #201e1b;
  --guide-image-brand: #fe4a26;
  --guide-section-bg: #fff3ee;
  --guide-section-bg-end: #fffaf7;
  --guide-section-line: #f1cfc3;
  --guide-subheading-bg: #f7f3ee;
  --ink: #191816;
  --ink-2: #3f3b35;
  --ink-3: #565149;
}

/* 淡い見出し帯で長い記事の区切りを明確にします。 */
main > section > h2 {
  position: relative;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--guide-section-line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--guide-section-bg), var(--guide-section-bg-end));
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(32, 30, 27, 0.035);
}

main > section > h2::before {
  display: grid;
  min-width: 31px;
  height: 26px;
  padding: 0 6px;
  place-items: center;
  border: 1px solid rgba(214, 60, 18, 0.2);
  border-radius: 5px;
  background: #fff;
  color: var(--brand-chip);
  transform: none;
}

main > section > h2::after {
  display: none;
}

main > section.sec-plain > h2::before {
  width: 26px;
  min-width: 26px;
  padding: 0;
  border: 1px solid rgba(214, 60, 18, 0.2);
  background: #fff;
  color: var(--brand-chip);
}

/* 操作手順の小見出しにも、ごく薄い面を敷いて拾いやすくします。 */
.step-title {
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  background: var(--guide-subheading-bg);
  color: var(--ink);
  box-shadow: inset 3px 0 0 rgba(254, 74, 38, 0.72);
}

/* 外部サービスの詳しい手順を、操作文に埋もれない独立した案内として示します。 */
.step-reference {
  margin: 12px 0 18px 56px;
  padding: 13px 15px;
  border: 1px solid var(--guide-section-line);
  border-left: 4px solid var(--brand);
  border-radius: 9px;
  background: linear-gradient(90deg, var(--guide-section-bg), var(--guide-section-bg-end));
  box-shadow: 0 4px 14px rgba(73, 44, 31, 0.06);
}

.step-reference p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}

.step-reference .step-reference-label {
  margin-bottom: 4px;
  color: var(--brand-chip);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.step-reference a {
  display: inline-flex;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 13px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(193, 55, 16, 0.35);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-chip);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 2px 7px rgba(73, 44, 31, 0.06);
}

.step-reference a:hover {
  border-color: var(--brand);
  background: #fffaf7;
}

.step-reference a:focus-visible {
  outline: 3px solid rgba(254, 74, 38, 0.28);
  outline-offset: 2px;
}

/* 利用開始の現在地を、主要記事の冒頭で見失わないための案内です。 */
.side-cat--journey {
  margin-bottom: 8px;
  border: 1px solid rgba(214, 60, 18, 0.14);
  background: var(--guide-section-bg);
  color: var(--brand-deep);
  font-weight: 800;
}

.journey-context {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  margin: 18px 0 26px;
  padding: 14px 16px;
  border: 1px solid var(--guide-section-line);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  background: linear-gradient(90deg, var(--guide-section-bg), #fff);
}

.journey-context-step {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-chip);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.journey-context p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.65;
}

.journey-context strong {
  color: var(--ink);
}

.journey-context a {
  color: var(--brand-deep);
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}

.card-preview {
  display: block;
  width: 92px;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--guide-image-line);
  border-radius: 7px;
  background: #fff;
}

.feature > .card-preview {
  width: 132px;
}

.card-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

/* 記事の所属カテゴリを一覧でも見失わないためのラベルです。 */
.card-category {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  align-items: center;
  border: 1px solid rgba(193, 55, 16, 0.22);
  border-radius: 999px;
  background: var(--guide-section-bg);
  color: var(--brand-chip);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.35;
  white-space: nowrap;
}

.card-category--feature,
.chip--feature {
  border-color: rgba(22, 122, 103, 0.3);
  background: #eaf7f3;
  color: #116452;
}

.chip--purpose {
  border: 1px solid rgba(193, 55, 16, 0.28);
  background: var(--guide-section-bg);
  color: var(--brand-chip);
}

.article-labels .chip--purpose,
.article-labels .chip--feature {
  text-decoration: none;
}

.article-labels .chip--purpose:focus-visible,
.article-labels .chip--feature:focus-visible {
  outline: 3px solid rgba(22, 122, 103, 0.24);
  outline-offset: 2px;
}

/* 左側は目的ではなく、Consoleの機能・メニューで絞り込む別軸です。 */
.side-feature-filters {
  display: grid;
  gap: 4px;
}

.side-feature-filter {
  display: flex;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.side-feature-filter:hover {
  border-color: rgba(22, 122, 103, 0.2);
  background: #f3faf8;
  color: #116452;
}

.side-feature-filter.is-active {
  border-color: rgba(22, 122, 103, 0.25);
  background: #eaf7f3;
  color: #116452;
  font-weight: 850;
}

.side-feature-count {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  flex: none;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #116452;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.side-feature-filter:focus-visible {
  outline: 3px solid rgba(22, 122, 103, 0.28);
  outline-offset: 2px;
}

.feature-filter-mobile {
  display: none;
}

.rowlink > .card-category {
  flex: 0 0 auto;
}

/* 検索とカテゴリを同じ条件として扱う、明示的な絞り込み操作です。 */
.category-filter-panel {
  max-width: 760px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--guide-section-line);
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf7, #fff);
}

.category-filter-head {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-filter-title {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.category-filter-clear {
  min-height: 44px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-chip);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.category-filter {
  display: inline-flex;
  min-height: 44px;
  padding: 8px 12px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.category-filter:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
}

.category-filter.is-active {
  border-color: var(--brand-chip);
  background: var(--brand-chip);
  color: #fff;
}

.category-filter-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--brand-chip);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.category-filter.is-active .category-filter-count {
  background: #fff;
}

.category-filter:focus-visible,
.category-filter-clear:focus-visible {
  outline: 3px solid rgba(254, 74, 38, 0.28);
  outline-offset: 2px;
}

@media (max-width: 999px) {
  .feature-filter-mobile {
    display: grid;
    gap: 7px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--guide-section-line);
  }

  .feature-filter-mobile label {
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
  }

  .feature-filter-mobile select {
    width: 100%;
    min-height: 48px;
    padding: 9px 40px 9px 13px;
    border: 1px solid rgba(22, 122, 103, 0.35);
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 750;
  }

  .feature-filter-mobile select:focus-visible {
    outline: 3px solid rgba(22, 122, 103, 0.28);
    outline-offset: 2px;
  }
}

.rowlink {
  align-items: center !important;
}

.article-overview-visual,
.step-visual {
  margin: 22px 0 8px;
}

.article-overview-visual {
  margin-bottom: 38px;
}

.step-visual-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--guide-image-line);
  border-radius: 10px;
  background: #fff;
  color: var(--guide-image-ink);
  cursor: zoom-in;
  box-shadow: 0 8px 24px rgba(32, 30, 27, 0.07);
}

.step-visual-button:hover {
  border-color: var(--guide-image-brand);
}

.step-visual-button img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  background: #fff;
}

.image-hotspot {
  position: absolute;
  z-index: 3;
  box-sizing: border-box;
  min-width: 18px;
  min-height: 18px;
  border: 4px solid #e00018;
  border-radius: 8px;
  background: rgba(224, 0, 24, 0.06);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.98),
    0 0 0 7px rgba(224, 0, 24, 0.2),
    0 8px 20px rgba(120, 0, 12, 0.2);
  pointer-events: none;
}

.image-hotspot::before {
  position: absolute;
  top: -20px;
  left: -20px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #e00018;
  color: #fff;
  content: attr(data-marker);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(120, 0, 12, 0.34);
}

.step-visual-label,
.step-visual-zoom {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.step-visual-label {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  background: rgba(32, 30, 27, 0.88);
}

.step-visual-zoom {
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  background: rgba(214, 60, 18, 0.92);
}

.step-visual figcaption,
.article-overview-visual figcaption {
  margin-top: 8px;
  color: #6e6960;
  font-size: 12px;
  line-height: 1.65;
}

.step-visual figcaption strong {
  color: #d63c12;
}

.step-visual--mock .step-visual-button {
  border-color: #cdd5df;
  background: #f4f7fa;
}

.step-visual--mock .step-visual-label {
  background: rgba(15, 118, 110, 0.94);
}

.step-visual--screen .step-visual-label {
  background: rgba(32, 30, 27, 0.9);
}

.step-visual-note {
  margin: 4px 0 0;
  color: #7b746b;
  font-size: 11px;
  line-height: 1.6;
}

/* 質問文を1つのGrid要素に固定し、文中のUI名が別列へ流れるのを防ぎます。 */
.faq-question {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* キーボードフォーカス枠と回答の先頭が接触しない間隔を確保します。 */
.faq-answer {
  padding-top: 12px;
}

.guide-lightbox {
  width: min(1400px, 96vw);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--guide-image-ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

.guide-lightbox::backdrop {
  background: rgba(20, 18, 16, 0.88);
}

.guide-lightbox-inner {
  display: grid;
  max-height: 94vh;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.guide-lightbox-close {
  justify-self: end;
  margin: 10px 10px 0;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: #201e1b;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.guide-lightbox img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #fff;
}

.guide-lightbox-media {
  position: relative;
  display: grid;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  background: #fff;
}

.guide-lightbox-media img {
  grid-area: 1 / 1;
}

.guide-lightbox-caption {
  margin: 0;
  padding: 12px 18px 15px;
  border-top: 1px solid var(--guide-image-line);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .category-filter-panel {
    padding: 12px;
  }

  .category-filter-head {
    align-items: flex-start;
  }

  .category-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-filter {
    width: 100%;
    border-radius: 9px;
  }

  .category-filter--all {
    grid-column: 1 / -1;
  }

  .rowlink {
    flex-wrap: wrap;
  }

  .rowlink > .card-preview {
    align-self: flex-start;
  }

  .rowlink > .card-category {
    order: 1;
  }

  .rowlink > .row-title {
    order: 2;
    flex: 1 1 calc(100% - 118px);
  }

  main > section > h2 {
    gap: 8px;
    padding: 10px 11px;
    border-left-width: 3px;
  }

  main > section > h2::before {
    min-width: 28px;
    height: 24px;
    padding: 0 5px;
  }

  main > section.sec-plain > h2::before {
    width: 24px;
    min-width: 24px;
    padding: 0;
  }

  .step-title {
    padding: 7px 10px;
  }

  .step-reference {
    margin-left: 0;
    padding: 12px 13px;
  }

  .step-reference a {
    display: flex;
    width: 100%;
    justify-content: space-between;
  }

  .journey-context {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 13px 14px;
  }

  .journey-context-step {
    justify-self: start;
  }

  .journey-context a {
    min-height: 44px;
    align-content: center;
    white-space: normal;
  }

  .feature > .card-preview,
  .card-preview {
    width: 82px;
  }

  .feature {
    align-items: flex-start !important;
  }

  .step-visual-label {
    top: 7px;
    left: 7px;
  }

  .step-visual-zoom {
    right: 7px;
    bottom: 7px;
  }

  .image-hotspot {
    border-width: 3px;
    border-radius: 5px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.98),
      0 0 0 4px rgba(224, 0, 24, 0.2);
  }

  .image-hotspot::before {
    top: -15px;
    left: -15px;
    width: 26px;
    height: 26px;
    border-width: 2px;
    font-size: 13px;
  }

  .guide-lightbox {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }

  .guide-lightbox-inner {
    max-height: calc(100vh - 12px);
  }
}

@media print {
  main > section > h2 {
    border-color: #d9d3ca;
    background: #f7f3ee;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .card-preview,
  .step-visual-label,
  .step-visual-zoom,
  .guide-lightbox {
    display: none !important;
  }

  .step-visual-button {
    box-shadow: none;
  }

  .step-visual-note {
    color: #4d4943;
  }

  .image-hotspot {
    box-shadow: 0 0 0 1px #fff;
  }
}
