/* 補助金マッチング＆事業計画ドラフト生成 スタイル */
header { background: linear-gradient(135deg, #1e3a8a, #1d4ed8, #3b82f6); color: white; padding: 20px 24px 16px; }
header h1 { font-size: 22px; }
header p  { font-size: 13px; opacity: .85; margin-top: 4px; }

.tab-nav { display: flex; background: #1e40af; padding: 0 24px; overflow-x: auto; }
.tab { padding: 10px 20px; color: rgba(255,255,255,.65); font-size: 14px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab:hover { color: white; }
.tab.active { color: white; border-bottom-color: white; font-weight: bold; }

.container { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.box { background: white; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.box h2 { font-size: 15px; color: #1e293b; margin-bottom: 14px; font-weight: 700; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.full { grid-column: span 2; }
@media(max-width:640px){ .form-grid{grid-template-columns:1fr;} .full{grid-column:span 1;} }
label { display: block; font-size: 12px; color: #64748b; margin-bottom: 4px; font-weight: 600; }
.req { color: #dc2626; font-size: 10px; background: #fee2e2; padding: 1px 5px; border-radius: 4px; margin-left: 4px; }

.goal-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.goal-chip { display: flex; align-items: center; gap: 6px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 20px; padding: 5px 12px; cursor: pointer; font-size: 12px; font-weight: normal; transition: background .15s; }
.goal-chip:has(input:checked) { background: #2563eb; color: white; border-color: #2563eb; }
.goal-chip:hover { background: #eff6ff; }
.goal-chip:has(input:checked):hover { background: #1d4ed8; }

.btn-row { margin-top: 16px; }
.btn-primary  { background: #2563eb; color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-copy-all { background: #1e40af; color: white; border: none; }
.btn-copy-all:hover { background: #1e3a8a; }

.progress-wrap { margin-top: 12px; }
.progress-bar  { background: #dbeafe; border-radius: 8px; height: 8px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, #2563eb, #60a5fa); height: 100%; transition: width .4s; width: 0%; }
.progress-text { font-size: 12px; color: #1d4ed8; margin-top: 6px; }

.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── 検索結果カード ── */
.subsidy-card { background: white; border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.subsidy-title { font-size: 14px; font-weight: 700; color: #1e293b; line-height: 1.5; }
.subsidy-meta { font-size: 12px; color: #64748b; margin-top: 8px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.subsidy-limit, .subsidy-period { color: #475569; }
.badge-area { background: #dbeafe; color: #1d4ed8; font-size: 11px; font-weight: bold; padding: 2px 10px; border-radius: 20px; }

/* ── 選択中の補助金 ── */
.selected-subsidy { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px 16px; }

/* ── 適合度診断 ── */
.match-score-wrap { text-align: center; padding: 16px 0; border-bottom: 1px solid #f1f5f9; margin-bottom: 14px; }
.match-score { font-size: 48px; font-weight: 800; line-height: 1; }
.match-score-unit { font-size: 18px; font-weight: 600; color: #94a3b8; }
.match-score-label { font-size: 13px; color: #64748b; margin-top: 6px; font-weight: 600; }
.score-high { color: #16a34a; }
.score-mid  { color: #d97706; }
.score-low  { color: #dc2626; }

.match-section { margin-bottom: 14px; }
.match-section h3 { font-size: 13px; color: #1e293b; margin-bottom: 6px; font-weight: 700; }
.match-section ul { padding-left: 20px; font-size: 13px; color: #475569; line-height: 1.7; }
.match-section p { font-size: 13px; color: #475569; line-height: 1.7; }

/* ── 事業計画ドラフト ── */
.plan-title { font-size: 16px; color: #1e3a8a; margin-bottom: 12px; font-weight: 800; }
.plan-section { margin-bottom: 16px; }
.plan-section h4 { font-size: 13px; color: #1e293b; margin-bottom: 6px; font-weight: 700; border-left: 3px solid #2563eb; padding-left: 8px; }
.plan-section p { font-size: 13px; color: #475569; line-height: 1.7; white-space: pre-wrap; }
.plan-section ul { padding-left: 20px; font-size: 13px; color: #475569; line-height: 1.7; }
.plan-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 4px; }
.plan-table th, .plan-table td { border: 1px solid #e2e8f0; padding: 6px 10px; text-align: left; }
.plan-table th { background: #f8fafc; color: #475569; font-weight: 700; }
.plan-table td { color: #1e293b; }

.ai-note { font-size: 11px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 12px; margin-top: 12px; line-height: 1.6; }
