/* ============================================================
   相棒電卓 使い方ガイド 専用スタイル (v2 = 案C Hybrid 統合版)
   ── 2026-05-21 新規作成、 紹介ページに統合される
   元: tool-rename-works-guide.css / tool-screenshot-editor-guide.css をベース
   独自: 9種ツールを 3:4 縦長カードで 3×3 グリッド配置
   ============================================================ */

/* ===== 全体 ===== */
.guide-wrap {
  max-width: 900px;
}

/* ===== ヒーロー画像 (16:10 横長) ===== */
.guide-hero__img {
  display: block;
  margin: 36px 0 0;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.guide-hero__img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ===== セクション共通 ===== */
.guide-section {
  margin-bottom: 70px;
  scroll-margin-top: 100px;
}
.guide-section__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 6px;
  padding: 6px 0 6px 16px;
  border-left: 4px solid var(--accent);
  border-bottom: none;
}
.guide-section__lead {
  color: var(--ink3);
  margin: 0 0 30px 20px;
  font-size: 0.96rem;
  line-height: 1.8;
}

/* ===== クイックスタート (3ステップ、 16:10 横長カード) ===== */
.guide-qs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 769px) {
  .guide-qs { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
.guide-qs__step {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.guide-qs__num {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(245,238,224,0.9);
  padding: 0 10px;
  line-height: 1.3;
}
.guide-qs__img {
  display: block;
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
}
.guide-qs__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guide-qs__body {
  padding: 18px 20px 20px;
}
.guide-qs__body h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
  border: none;
  padding: 0;
}
.guide-qs__body p {
  font-size: 0.92rem;
  color: var(--ink2);
  line-height: 1.75;
  margin: 0;
}

/* ============================================================
   ★ ハイライト機能 (大型2カード、 画像とテキスト交互配置)
   2026-05-21 追加: 最も推したい機能 (計算方式・ボタン配置) を強く宣伝
   ============================================================ */
.guide-highlight {
  display: grid;
  gap: 32px;
  margin-bottom: 10px;
}
.guide-highlight__item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  padding: 26px 28px;
}
@media (max-width: 768px) {
  .guide-highlight__item { grid-template-columns: 1fr; gap: 18px; padding: 22px 20px; }
}
.guide-highlight__item--reverse .guide-highlight__img {
  order: 2;
}
@media (max-width: 768px) {
  .guide-highlight__item--reverse .guide-highlight__img { order: initial; }
}
.guide-highlight__img {
  display: block;
  background: var(--bg-warm);
  border: 1px solid var(--line);
  overflow: hidden;
}
.guide-highlight__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guide-highlight__img--wide { aspect-ratio: 16 / 10; }
.guide-highlight__img--tall { aspect-ratio: 5 / 8; }
.guide-highlight__body h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
  border: none;
  padding: 0;
}
.guide-highlight__body p {
  font-size: 0.94rem;
  color: var(--ink2);
  line-height: 1.85;
  margin: 0 0 10px;
}
.guide-highlight__body p:last-child { margin-bottom: 0; }
.guide-highlight__body strong { color: var(--ink); font-weight: 700; }

/* ===== 主要機能カタログ (4枚、 4:3 横長カード) ===== */
.guide-catalog {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 768px) {
  .guide-catalog { grid-template-columns: 1fr; }
}

.guide-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.guide-card:hover {
  background: var(--bg-warm);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.guide-card__img {
  display: block;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
}
.guide-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guide-card__body {
  padding: 16px 20px 18px;
}
.guide-card__body h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
  border: none;
  padding: 0;
}
.guide-card__body p {
  font-size: 0.88rem;
  color: var(--ink2);
  line-height: 1.7;
  margin: 0;
}

/* 主要機能 ─ 案B「Workshop Earth」 と統一の左ボーダー */
.guide-card.feat-standard { border-left: 3px solid #c8541e; }   /* テラコッタ */
.guide-card.feat-mybtn    { border-left: 3px solid #6b8e6f; }   /* セージ (保存系) */
.guide-card.feat-custom   { border-left: 3px solid #6a7c9a; }   /* ダスティブルー (切替系) */
.guide-card.feat-theme    { border-left: 3px solid #b89968; }   /* マスタード (設定系) */

/* ===== 9種専用ツール (3:4 縦長カード、 3列グリッド) ===== */
.guide-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) {
  .guide-tools { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .guide-tools { grid-template-columns: 1fr; }
}

.guide-tool-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.guide-tool-card:hover {
  background: var(--bg-warm);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.guide-tool-card__img {
  display: block;
  /* 9種ツールは縦長 3:4 */
  aspect-ratio: 3 / 4;
  width: 100%;
  overflow: hidden;
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
}
.guide-tool-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guide-tool-card__body {
  padding: 14px 16px 16px;
}
.guide-tool-card__body h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 6px;
  border: none;
  padding: 0;
}
.guide-tool-card__body p {
  font-size: 0.82rem;
  color: var(--ink2);
  line-height: 1.65;
  margin: 0;
}
/* NEW / UPDATED バッジ */
.guide-tool-card__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  background: var(--accent);
  color: var(--bg-soft);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  vertical-align: middle;
}

/* ===== モバイル微調整 ===== */
@media (max-width: 768px) {
  .guide-wrap { max-width: 100%; }
  .guide-section__title { font-size: 1.35rem; }
}

/* ============================================================
   画像ライトボックス (image-lightbox.js とセット)
   ============================================================ */
.img-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(42, 34, 24, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.img-lightbox.open {
  display: flex;
  opacity: 1;
  animation: imgLightboxFadeIn 0.25s ease;
}
@keyframes imgLightboxFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.img-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid rgba(245, 238, 224, 0.18);
  background: var(--bg-soft);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: imgLightboxZoom 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.0);
}
@keyframes imgLightboxZoom {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.img-lightbox__close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  background: rgba(245, 238, 224, 0.95);
  border: 1px solid rgba(42, 34, 24, 0.18);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
  z-index: 10000;
}
.img-lightbox__close:hover {
  background: var(--accent);
  color: #fff8ec;
  transform: scale(1.05);
}
@media (max-width: 768px) {
  .img-lightbox { padding: 16px; }
  .img-lightbox__close { top: 12px; right: 12px; width: 42px; height: 42px; }
}
