/* ========================================
   カイゴノトリセツ - Design Spec v1.0
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@700&display=swap');

:root {
  --bg-page: #FBF7F0;
  --bg-section: #FFF9F0;
  --bg-green-light: #EEF5E8;
  --bg-orange-light: #FFF3E0;
  --bg-white: #FFFFFF;
  --accent-orange: #D4631A;
  --accent-orange-hover: #B8521A;
  --accent-green: #3A7D2C;
  --accent-yellow: #E8A000;
  --text-dark: #1A1208;
  --text-mid: #3D2E10;
  --text-muted: #5C4A2A;
  --text-on-orange: #FFFFFF;
  --border-light: #D4C4A0;
  --border-green: #A8C890;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-main: 'Noto Sans JP', sans-serif;
  --font-serif: 'Noto Serif JP', serif;
}

/* --- リセット・ベース --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  color: var(--text-mid);
  line-height: 1.8;
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent-green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-orange); }
img { max-width: 100%; height: auto; }
ul { list-style: none; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0; }

/* --- コンテナ --- */
.section-inner { max-width: 960px; margin: 0 auto; padding: 0 2rem; }
.container { max-width: 960px; margin: 0 auto; padding: 0 2rem; }

/* --- ボタン --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius-md);
  font-size: 16px; font-weight: 700; font-family: var(--font-main);
  text-align: center; cursor: pointer; border: 2px solid transparent;
  transition: all 0.2s; text-decoration: none; line-height: 1.4;
}
.btn-primary { background: var(--accent-orange); color: var(--text-on-orange); border-color: var(--accent-orange); }
.btn-primary:hover { background: var(--accent-orange-hover); border-color: var(--accent-orange-hover); color: #fff; }
.btn-secondary { background: var(--bg-white); color: var(--accent-green); border-color: var(--accent-green); }
.btn-secondary:hover { background: var(--bg-green-light); color: var(--accent-green); }
.btn-white { background: var(--bg-white); color: var(--accent-green); border-color: var(--bg-white); }
.btn-white:hover { background: var(--bg-green-light); }
.btn-white-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-white-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn-outline { background: transparent; color: var(--accent-green); border-color: var(--accent-green); }
.btn-outline:hover { background: var(--bg-green-light); }
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 16px 40px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- ナビゲーション (5-1) --- */
.site-header {
  background: var(--bg-white);
  border-bottom: 2px solid var(--border-green);
  position: sticky; top: 0; z-index: 100;
  height: 64px;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 960px; margin: 0 auto; padding: 0 2rem;
}
.logo {
  font-family: var(--font-serif); font-size: 20px; font-weight: 700;
  color: var(--accent-green);
}
.logo:hover { color: var(--accent-green); }
.main-nav { display: flex; align-items: center; gap: 1rem; }
.main-nav a {
  color: var(--text-mid); font-size: 14px; font-weight: 500;
  padding: 6px 12px; border-radius: var(--radius-sm); transition: all 0.2s;
}
.main-nav a:hover { background: var(--bg-green-light); color: var(--accent-green); }
.user-menu { position: relative; cursor: pointer; }
.user-name {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: var(--radius-sm); background: var(--bg-green-light);
  font-size: 14px; font-weight: 500; color: var(--text-mid);
}
.user-menu .dropdown {
  display: none; position: absolute; right: 0; top: 100%; margin-top: 4px;
  background: var(--bg-white); border: 1.5px solid var(--border-light); border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08); min-width: 160px; z-index: 200;
}
.user-menu:hover .dropdown { display: block; }
.user-menu .dropdown a { display: block; padding: 10px 16px; color: var(--text-mid); font-size: 14px; border-radius: 0; }
.user-menu .dropdown a:hover { background: var(--bg-green-light); }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--text-dark); margin: 5px 0; transition: 0.3s; }

/* --- アラート --- */
.alert { padding: 12px 16px; border-radius: var(--radius-md); margin: 1rem 0; font-size: 14px; font-weight: 500; }
.alert-success { background: var(--bg-green-light); color: var(--accent-green); border: 1.5px solid var(--border-green); }
.alert-error { background: #fee2e2; color: #991b1b; border: 1.5px solid #fecaca; }
.alert-info { background: var(--bg-orange-light); color: var(--accent-orange); border: 1.5px solid var(--border-light); }

/* --- メインコンテンツ --- */
.main-content { flex: 1; }

/* --- ヒーロー (6) --- */
.hero {
  background: linear-gradient(135deg, var(--bg-page) 0%, var(--bg-green-light) 50%, var(--bg-orange-light) 100%);
  padding: 80px 2rem 60px; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(168,200,144,0.3);
}
.hero::after {
  content: ''; position: absolute; bottom: -40px; left: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(212,99,26,0.1);
}
.hero h1 {
  font-family: var(--font-serif); font-size: clamp(28px, 5vw, 48px);
  font-weight: 700; color: var(--text-dark); line-height: 1.4; margin-bottom: 16px;
  position: relative; z-index: 1;
}
.hero-sub { font-size: 16px; color: var(--text-mid); margin-bottom: 8px; position: relative; z-index: 1; }
.hero-note { font-size: 13px; color: var(--text-muted); margin-bottom: 32px; position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }

/* --- Stats (実績) --- */
.stats {
  background: var(--bg-white); padding: 32px 2rem;
  border-top: 2px solid var(--border-green); border-bottom: 2px solid var(--border-green);
}
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 960px; margin: 0 auto; text-align: center; }
.stats-item .stats-number { font-family: var(--font-serif); font-size: clamp(28px,4vw,40px); font-weight: 700; color: var(--accent-orange); }
.stats-item .stats-label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* --- セクション共通 --- */
.section-title {
  font-family: var(--font-serif); text-align: center;
  font-size: clamp(22px, 3.5vw, 32px); font-weight: 700;
  color: var(--text-dark); margin-bottom: 40px;
}

/* --- 特徴カード (5-3) --- */
.features { padding: 64px 2rem; background: var(--bg-section); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--bg-white); border: 1.5px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 24px; border-left: 4px solid var(--accent-green); position: relative;
}
.feature-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--bg-green-light); display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px; font-size: 26px;
}
.feature-card h3 { font-size: 16px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* --- 利用の流れ (5-4, 5-5) --- */
.how-it-works { padding: 64px 2rem; background: var(--bg-page); }
.flow-tabs {
  display: flex; justify-content: center; gap: 0; margin-bottom: 32px;
  background: var(--bg-white); border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 6px; width: fit-content; margin-left: auto; margin-right: auto;
}
.flow-tab {
  padding: 10px 24px; border-radius: var(--radius-md); font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; background: transparent; color: var(--text-muted);
  font-family: var(--font-main); transition: all 0.2s;
}
.flow-tab[aria-selected="true"], .flow-tab.active { background: var(--accent-orange); color: #fff; }
.flow-panel { display: none; }
.flow-panel.active { display: block; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.step-card {
  background: #FFF8EC; border: 1.5px solid var(--border-light); border-radius: var(--radius-lg);
  padding: 24px 16px; text-align: center; position: relative;
}
.step-card::after {
  content: '›'; position: absolute; right: -12px; top: 50%; transform: translateY(-50%);
  font-size: 24px; color: var(--text-muted); font-weight: 700;
}
.step-card:last-child::after { display: none; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-orange); color: #fff; font-weight: 700; font-size: 18px;
  margin: 0 auto 12px;
}
.step-card h4 { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.step-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* --- 資格タグ (5-6) --- */
.target-qualifications {
  padding: 64px 2rem; background: var(--bg-green-light);
  border-top: 2px solid var(--border-green); border-bottom: 2px solid var(--border-green);
}
.qual-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.qual-tag {
  padding: 10px 22px; background: var(--bg-white); color: var(--text-dark);
  border-radius: 40px; font-size: 15px; font-weight: 700;
  border: 2px solid var(--border-green);
}

/* --- CTA バナー (6) --- */
.cta {
  padding: 64px 2rem; background: var(--accent-green); color: #fff; text-align: center;
}
.cta h2 { font-family: var(--font-serif); font-size: clamp(22px,3.5vw,32px); margin-bottom: 12px; color: #fff; }
.cta p { font-size: 16px; opacity: 0.9; margin-bottom: 28px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- フッター (6) --- */
.site-footer { background: var(--text-dark); color: rgba(255,255,255,0.85); padding: 48px 2rem 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 32px; max-width: 960px; margin-left: auto; margin-right: auto; }
.footer-col h3 { font-family: var(--font-serif); color: #fff; font-size: 18px; margin-bottom: 12px; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.footer-col p { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,0.7); }
.footer-note { font-size: 12px; opacity: 0.5; margin-top: 8px; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul a { color: rgba(255,255,255,0.7); font-size: 13px; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15); padding-top: 20px; text-align: center;
  font-size: 12px; color: rgba(255,255,255,0.5); max-width: 960px; margin: 0 auto;
}

/* --- フォーム --- */
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: var(--text-dark); }
.form-group .required::after { content: " *"; color: var(--accent-orange); }
.form-control {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md); font-size: 16px; color: var(--text-dark);
  background: var(--bg-white); transition: border-color 0.2s; font-family: var(--font-main);
}
.form-control:focus { outline: none; border-color: var(--accent-green); box-shadow: 0 0 0 3px rgba(58,125,44,0.1); }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { appearance: auto; }
.form-error { color: #dc2626; font-size: 13px; margin-top: 4px; }
.form-help { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-row-responsive { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

/* --- カード --- */
.card {
  background: var(--bg-white); border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px;
}
.card-header { margin-bottom: 16px; }
.card-title { font-size: 16px; font-weight: 700; color: var(--text-dark); }

/* --- ページレイアウト --- */
.page-header { padding: 24px 0; background: var(--bg-white); border-bottom: 1.5px solid var(--border-light); }
.page-header h1 { font-family: var(--font-serif); font-size: clamp(22px,3.5vw,28px); color: var(--text-dark); }
.page-body { padding: 32px 0; }
.content-narrow { max-width: 640px; margin: 0 auto; }
.content-medium { max-width: 800px; margin: 0 auto; }

/* --- バッジ --- */
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 40px;
  font-size: 12px; font-weight: 700;
}
.badge-verified { background: var(--bg-green-light); color: var(--accent-green); border: 1px solid var(--border-green); }
.badge-pending { background: var(--bg-orange-light); color: var(--accent-orange); border: 1px solid var(--border-light); }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-freelance { background: var(--bg-green-light); color: var(--accent-green); border: 1px solid var(--border-green); }

/* --- テーブル --- */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-light); }
th { background: var(--bg-green-light); font-size: 13px; font-weight: 700; color: var(--text-dark); }
td { font-size: 14px; }

/* --- ページネーション --- */
.pagination { display: flex; justify-content: center; gap: 4px; margin: 32px 0; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm); font-size: 14px;
  border: 1.5px solid var(--border-light);
}
.pagination a:hover { background: var(--bg-green-light); }
.pagination .active { background: var(--accent-green); color: #fff; border-color: var(--accent-green); }

/* --- 星評価 --- */
.stars { color: var(--accent-yellow); font-size: 16px; }

/* --- エラーページ --- */
.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-family: var(--font-serif); font-size: 64px; color: var(--border-light); margin-bottom: 16px; }
.error-page p { font-size: 16px; color: var(--text-muted); margin-bottom: 28px; }

/* --- スキルタグ --- */
.skill-tags-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.skill-tag-label {
  font-size: 13px; cursor: pointer;
  padding: 6px 14px; border: 1.5px solid var(--border-light); border-radius: 40px;
  transition: all 0.2s; background: var(--bg-white); color: var(--text-mid);
}
.skill-tag-label:has(input:checked) { background: var(--bg-green-light); border-color: var(--border-green); color: var(--accent-green); }
.skill-tag-label input { display: none; }

/* --- PC/SP切替 --- */
.hide-sp { display: block; }
.hide-pc { display: none; }

/* --- レスポンシブ --- */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.active {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: var(--bg-white); padding: 16px;
    border-bottom: 2px solid var(--border-green); box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  }
  .mobile-menu-btn { display: block; }
  .hero { padding: 48px 1.5rem 40px; }
  .hero h1 { font-size: 28px; }
  .features { padding: 48px 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .step-card::after { display: none; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .form-row, .form-row-responsive { grid-template-columns: 1fr; }
  .hide-sp { display: none; }
  .hide-pc { display: block; }
  .content-medium { padding: 0 1rem; }
  .card { padding: 16px; }
  .page-header h1 { font-size: 22px; }
  .section-inner, .container { padding: 0 1.5rem; }
  .how-it-works { padding: 48px 1.5rem; }
  .target-qualifications { padding: 48px 1.5rem; }
  .cta { padding: 48px 1.5rem; }
}

@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .cta-actions { flex-direction: column; align-items: center; }
  .cta-actions .btn { width: 100%; justify-content: center; }
}
