/* =====================================================
   操作手順ページ（how-to-use.php）専用スタイル
===================================================== */

:root {
  --htu-primary: #1e3a8a;
  --htu-primary-dark: #142a66;
  --htu-accent: #efac12;
  --htu-text: #1a1a1a;
  --htu-text-sub: #4a5a72;
  --htu-text-muted: #6b7a8f;
  --htu-bg-pale: #f7f9fc;
  --htu-border: #e2e7ee;
  --htu-orderer: #2e7d32;
  --htu-worker: #1976d2;
}

.htu-page {
  background: #ffffff;
  min-height: 70vh;
}
.htu-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* ページヘッダー */
.htu-hero {
  text-align: center;
  padding: 32px 0 48px;
  border-bottom: 1px solid var(--htu-border);
  margin-bottom: 56px;
}
.htu-hero h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--htu-primary);
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}
.htu-hero p {
  font-size: 14px;
  color: var(--htu-text-sub);
  line-height: 1.9;
  margin: 0;
}
@media (max-width: 600px) {
  .htu-hero h1 { font-size: 24px; }
}

/* セクション共通 */
.htu-section {
  margin-bottom: 72px;
}
.htu-section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--htu-primary);
  margin: 0 0 8px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--htu-accent);
  display: inline-block;
}
.htu-section-subtitle {
  font-size: 13px;
  color: var(--htu-text-sub);
  margin: 0 0 32px;
  line-height: 1.8;
}

/* 全体フロー（横スクロール対応） */
.htu-flow {
  background: var(--htu-bg-pale);
  border-radius: 12px;
  padding: 32px 24px;
}
.htu-flow-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 900px) {
  .htu-flow-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  .htu-flow-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 400px) {
  .htu-flow-grid { grid-template-columns: repeat(2, 1fr); }
}
.htu-flow-step {
  background: #ffffff;
  border: 1px solid var(--htu-border);
  border-radius: 8px;
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.htu-flow-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.08);
}
.htu-flow-step-num {
  display: inline-block;
  background: var(--htu-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}
.htu-flow-step-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 8px;
}
.htu-flow-step-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--htu-text);
  line-height: 1.4;
}

/* 発注者・受注者切替タブ */
.htu-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--htu-border);
  margin-bottom: 32px;
}
.htu-tab {
  flex: 1;
  padding: 16px 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--htu-text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  font-family: inherit;
}
.htu-tab:hover {
  color: var(--htu-primary);
}
.htu-tab.is-active {
  color: var(--htu-primary);
  border-bottom-color: var(--htu-primary);
}
.htu-tab-pane {
  display: none;
}
.htu-tab-pane.is-active {
  display: block;
}

/* ステップカード（発注者・受注者共通） */
.htu-step-card {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--htu-border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
  transition: box-shadow 0.2s;
}
.htu-step-card:hover {
  box-shadow: 0 4px 16px rgba(30, 58, 138, 0.06);
}
.htu-step-card.alt {
  grid-template-columns: 1.2fr 1fr;
}
.htu-step-card.alt .htu-step-card-text { order: 2; }
.htu-step-card.alt .htu-step-card-visual { order: 1; }
@media (max-width: 800px) {
  .htu-step-card, .htu-step-card.alt {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 20px;
  }
  .htu-step-card.alt .htu-step-card-text { order: 1; }
  .htu-step-card.alt .htu-step-card-visual { order: 2; }
}

.htu-step-num-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--htu-accent);
  margin-bottom: 8px;
}
.htu-step-num-badge::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--htu-accent);
}
.htu-step-card-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--htu-primary);
  margin: 0 0 12px;
  line-height: 1.4;
}
.htu-step-card-body {
  font-size: 13px;
  line-height: 1.9;
  color: var(--htu-text-sub);
}
.htu-step-card-body ul {
  margin: 0;
  padding-left: 1.2em;
}
.htu-step-card-body li {
  margin-bottom: 4px;
}

/* 画面イメージ（SVGプレースホルダー） */
.htu-screen {
  background: var(--htu-bg-pale);
  border: 1px solid var(--htu-border);
  border-radius: 8px;
  padding: 12px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.htu-screen svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 仮払いフロー図 */
.htu-deposit-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--htu-border);
  border-radius: 12px;
  padding: 24px 16px;
  margin: 20px 0;
}
@media (max-width: 600px) {
  .htu-deposit-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .htu-deposit-flow-arrow {
    transform: rotate(90deg);
  }
}
.htu-deposit-flow-node {
  text-align: center;
  padding: 14px 8px;
  background: var(--htu-bg-pale);
  border-radius: 8px;
}
.htu-deposit-flow-node-icon {
  font-size: 24px;
  margin-bottom: 6px;
}
.htu-deposit-flow-node-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--htu-text);
}
.htu-deposit-flow-arrow {
  font-size: 20px;
  color: var(--htu-accent);
  font-weight: 800;
  padding: 0 8px;
}

/* FAQ アコーディオン */
.htu-faq-group {
  margin-bottom: 24px;
}
.htu-faq-group-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--htu-primary);
  background: var(--htu-bg-pale);
  padding: 10px 16px;
  border-left: 3px solid var(--htu-accent);
  border-radius: 4px;
  margin: 0 0 12px;
}
.htu-faq-item {
  background: #ffffff;
  border: 1px solid var(--htu-border);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
.htu-faq-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--htu-text);
  list-style: none;
  transition: background 0.15s;
}
.htu-faq-summary::-webkit-details-marker { display: none; }
.htu-faq-summary:hover {
  background: var(--htu-bg-pale);
}
.htu-faq-q {
  background: var(--htu-primary);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}
.htu-faq-arrow {
  margin-left: auto;
  color: var(--htu-text-muted);
  transition: transform 0.2s;
}
.htu-faq-item[open] .htu-faq-arrow {
  transform: rotate(180deg);
}
.htu-faq-body {
  padding: 0 20px 20px 58px;
  font-size: 13px;
  line-height: 1.9;
  color: var(--htu-text-sub);
}

/* 関連ヘルプカード */
.htu-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.htu-related-card {
  background: #ffffff;
  border: 1px solid var(--htu-border);
  border-radius: 8px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--htu-text);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}
.htu-related-card:hover {
  border-color: var(--htu-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
  color: var(--htu-primary);
}
.htu-related-card-icon {
  font-size: 18px;
}
.htu-related-card-arrow {
  margin-left: auto;
  color: var(--htu-text-muted);
}

/* 発注者・受注者の色分け */
.htu-tab-orderer.is-active { border-bottom-color: var(--htu-orderer); color: var(--htu-orderer); }
.htu-tab-worker.is-active { border-bottom-color: var(--htu-worker); color: var(--htu-worker); }
.htu-tab-pane.is-orderer .htu-step-num-badge { color: var(--htu-orderer); }
.htu-tab-pane.is-orderer .htu-step-num-badge::before { background: var(--htu-orderer); }
.htu-tab-pane.is-orderer .htu-step-card-title { color: var(--htu-orderer); }
.htu-tab-pane.is-worker .htu-step-num-badge { color: var(--htu-worker); }
.htu-tab-pane.is-worker .htu-step-num-badge::before { background: var(--htu-worker); }
.htu-tab-pane.is-worker .htu-step-card-title { color: var(--htu-worker); }
