/* AI Seido Bridge — サイト共通部品(トップ枠・診断・手帳・マイ条件・カード) */
:root {
  --sb-navy: #1a3a5c;
  --sb-green: #2e7d4f;
  --sb-green-bg: #e9f5ee;
  --sb-orange: #b45309;
  --sb-orange-bg: #fdf3e3;
  --sb-red: #b3403a;
  --sb-red-bg: #fbeeed;
  --sb-ink-sub: #4b5560;
  --sb-line: #d7dde3;
  --sb-bg: #f6f8f9;
}

/* セクション */
.sb-section { margin: 28px 0; }
.sb-section > h2 { font-size: 1.35rem; border-left: 8px solid var(--sb-navy); padding-left: 12px; margin: 0 0 14px; border-bottom: none; }
.sb-note { color: var(--sb-ink-sub); font-size: .92rem; }

/* カード */
.sb-card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 0; margin: 0; list-style: none; }
.sb-card { background: #fff; border: 1px solid var(--sb-line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.sb-card h3 { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.sb-card h3 a { text-decoration: none; }
.sb-card h3 a:hover { text-decoration: underline; }
.sb-card-summary { margin: 0; font-size: .92rem; color: var(--sb-ink-sub); }
.sb-card-meta { font-size: .82rem; color: var(--sb-ink-sub); margin: auto 0 0; }

/* バッジ(トップ側でも記事側と同じ見た目) */
.sb-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sb-badge { display: inline-block; font-size: .8rem; font-weight: 700; border-radius: 6px; padding: 2px 10px; border: 1px solid transparent; line-height: 1.6; }
.sb-badge-you { background: var(--sb-green-bg); color: var(--sb-green); border-color: var(--sb-green); }
.sb-badge-action { background: var(--sb-orange-bg); color: var(--sb-orange); border-color: var(--sb-orange); }
.sb-badge-deadline { background: var(--sb-red-bg); color: var(--sb-red); border-color: var(--sb-red); }
.sb-badge-region { background: #eef2f6; color: var(--sb-navy); border-color: #b9c6d2; }
.sb-badge-cat { background: #eef2f6; color: var(--sb-ink-sub); }
/* 「なぜ私におすすめ?」の理由表示 */
.sb-why { margin: 0; font-size: .85rem; color: var(--sb-green); font-weight: 700; }

/* 診断ヒーロー */
.sb-hero { background: #fff; border: 3px solid var(--sb-navy); border-radius: 12px; padding: 24px; margin: 24px 0; }
.sb-hero h2 { margin: 0 0 8px; font-size: 1.4rem; color: var(--sb-navy); border: none; }
.sb-hero fieldset { border: 1px solid var(--sb-line); border-radius: 10px; margin: 0 0 12px; padding: 10px 16px; }
.sb-hero legend { font-weight: 700; padding: 0 6px; }
.sb-hero label { display: inline-flex; align-items: center; gap: 6px; margin: 6px 16px 6px 0; min-height: 40px; }
.sb-hero input[type="radio"] { width: 22px; height: 22px; }
.sb-hero-submit {
  background: var(--sb-green); color: #fff; border: none; border-radius: 10px;
  padding: 14px 28px; font-size: 1.15rem; font-weight: 700; cursor: pointer; min-height: 52px; width: 100%;
}
.sb-hero-submit:hover { background: #256a42; }

/* ライフイベント・地域グリッド */
.sb-event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.sb-event-grid a {
  display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--sb-navy);
  border-radius: 10px; padding: 16px; font-size: 1.05rem; font-weight: 700; text-decoration: none; min-height: 60px;
}
.sb-event-grid a:hover { background: #eef2f6; }
.sb-icon { font-size: 1.5rem; }

/* 手帳サマリー・手帳ページ */
#sb-techo-summary-box { background: #fff; border: 1px solid var(--sb-line); border-radius: 10px; padding: 16px; }
.sb-open-techo { display: inline-flex; align-items: center; background: var(--sb-navy); color: #fff !important; border-radius: 8px; padding: 10px 20px; font-weight: 700; text-decoration: none; min-height: 44px; }
.sb-techo-items { list-style: none; padding: 0; margin: 0; }
.sb-techo-item { background: #fff; border: 1px solid var(--sb-line); border-radius: 10px; padding: 14px 16px; margin: 10px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.sb-techo-item.applied { background: var(--sb-green-bg); }
.sb-techo-main { flex: 1 1 300px; font-weight: 700; }
.sb-techo-acts { display: flex; align-items: center; gap: 14px; }
.sb-techo-acts label { display: inline-flex; align-items: center; gap: 6px; }
.sb-techo-acts input { width: 22px; height: 22px; }
.sb-remove { background: #fff; border: 1px solid var(--sb-line); color: var(--sb-ink-sub); border-radius: 8px; padding: 8px 14px; cursor: pointer; min-height: 40px; }

/* 記事の手帳ボタン */
.sb-techo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0 4px; }
.sb-save-btn { background: var(--sb-navy); color: #fff; border: 2px solid var(--sb-navy); border-radius: 8px; padding: 10px 18px; font-size: 1rem; font-weight: 700; cursor: pointer; min-height: 44px; }
.sb-save-btn.saved { background: var(--sb-green-bg); color: var(--sb-green); border-color: var(--sb-green); }
.sb-applied-wrap { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.sb-applied-wrap input { width: 22px; height: 22px; }

/* マイ条件フォーム */
.sb-profile-form fieldset { border: 1px solid var(--sb-line); border-radius: 10px; background: #fff; margin: 0 0 16px; padding: 14px 18px; }
.sb-profile-form legend { font-weight: 700; padding: 0 6px; }
.sb-profile-form label { display: inline-flex; align-items: center; gap: 6px; margin: 6px 18px 6px 0; min-height: 40px; }
.sb-profile-form input[type="radio"] { width: 22px; height: 22px; }
.sb-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.sb-save { background: var(--sb-green); color: #fff; border: none; border-radius: 8px; padding: 12px 26px; font-size: 1.05rem; font-weight: 700; cursor: pointer; min-height: 48px; }
.sb-clear { background: #fff; color: var(--sb-red); border: 2px solid var(--sb-red); border-radius: 8px; padding: 12px 20px; font-size: 1rem; cursor: pointer; min-height: 48px; }
.sb-save-done { display: none; margin: 12px 0; padding: 12px; background: var(--sb-green-bg); border: 1px solid var(--sb-green); border-radius: 8px; color: var(--sb-green); font-weight: 700; }
.sb-save-done.show { display: block; }

/* ステップ(手帳ページの使い方でも流用) */
.sb-steps { list-style: none; padding: 0; counter-reset: sbstep; }
.sb-steps li { counter-increment: sbstep; border: 1px solid var(--sb-line); border-radius: 8px; padding: 14px 16px 14px 58px; margin: 10px 0; position: relative; background: #fff; }
.sb-steps li::before {
  content: counter(sbstep); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px;
  background: var(--sb-navy); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
/* 手順名だけをブロック表示にする(本文中の数値強調 .sb-fig を巻き込まないようクラスで限定) */
.sb-steps li strong.sb-step-title { display: block; margin-bottom: 2px; }

@media print {
  .sb-hero, .sb-techo-actions, .st-header, .st-nav, .st-footer { display: none !important; }
}
