/* ============================================================
 * 申請準備アシスト — prep.css（../styles.css を拡張）
 * ============================================================ */

/* ===== Hero ===== */
.prep-hero .hero-inner { grid-template-columns: 1.1fr .9fr; }
.prep-hero-panel { display: flex; justify-content: center; }

.readiness-card {
  width: min(360px, 100%);
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 26px 22px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.readiness-head { width: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.readiness-label { font-size: 13px; font-weight: 800; color: var(--ink); }
.readiness-sub { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.readiness-ring-wrap { position: relative; width: 150px; height: 150px; }
.readiness-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--bg-2); stroke-width: 11; }
.ring-fg {
  fill: none; stroke: url(#ringGrad), var(--brand); stroke: var(--brand);
  stroke-width: 11; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .3, 1), stroke .3s;
}
.readiness-score {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1px;
}
.readiness-score strong { font-size: 38px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.readiness-score small { font-size: 14px; font-weight: 700; color: var(--ink-3); margin-top: 12px; }
.readiness-points { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.readiness-points li { font-size: 12px; color: var(--ink-2); line-height: 1.7; padding-left: 16px; position: relative; }
.readiness-points li::before { content: "・"; position: absolute; left: 0; color: var(--brand); font-weight: 800; }
.readiness-btn { width: 100%; }

/* ===== Flow ===== */
.flow-section { background: var(--white); border-block: 1px solid var(--line); }
.flow-steps {
  list-style: none; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; counter-reset: flow;
}
.flow-step {
  position: relative; counter-increment: flow;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px 14px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.flow-step:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); background: var(--white); }
.flow-step::before {
  content: counter(flow, decimal-leading-zero);
  font-size: 12px; font-weight: 800; letter-spacing: .08em;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.flow-step strong { display: block; font-size: 14px; font-weight: 750; margin-top: 6px; line-height: 1.5; }
.flow-step p { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; line-height: 1.7; }
.flow-step.is-prep { border-color: #cfcaff; background: linear-gradient(160deg, #fdfdff, #f6f5ff); }
.flow-step.is-prep::after {
  content: "このサイトの守備範囲"; position: absolute; top: -9px; right: 10px;
  font-size: 9.5px; font-weight: 800; background: var(--grad); color: #fff;
  padding: 2px 9px; border-radius: 999px; letter-spacing: .02em;
}
.flow-warns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 22px; }
.flow-warn {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--warn-bg); border: 1px solid #f3ddb8; border-radius: var(--radius);
  padding: 16px 18px;
}
.flow-warn-icon { font-size: 20px; line-height: 1.4; }
.flow-warn strong { font-size: 13.5px; font-weight: 800; color: var(--warn); }
.flow-warn p { font-size: 12px; color: var(--ink-2); margin-top: 3px; line-height: 1.75; }

/* ===== Wizard ===== */
.wizard-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 34px 24px; box-shadow: var(--shadow-sm); max-width: 780px;
}
.wizard-progress { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin-bottom: 26px; }
.wizard-progress-bar { height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width .35s cubic-bezier(.2, .8, .3, 1); }
.wizard-q h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.wizard-q .wizard-hint { font-size: 12.5px; color: var(--ink-3); margin-bottom: 16px; }
.wizard-opts { display: flex; flex-wrap: wrap; gap: 9px; }
.wizard-opts .chip { font-size: 14px; padding: 11px 20px; }
.wizard-opts.is-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.wizard-opts.is-grid .chip { text-align: left; border-radius: 14px; display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; }
.wizard-opts .chip small { font-size: 11px; font-weight: 500; opacity: .75; }
.wizard-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.wizard-step-label { font-size: 12px; color: var(--ink-3); font-weight: 700; }
.wizard-nav .btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }

/* ===== Wizard result ===== */
.wizard-result { margin-top: 30px; }
.wr-head {
  background: linear-gradient(120deg, #f4f3ff, #f0fbfd);
  border: 1px solid #e2e0f7; border-radius: var(--radius-lg);
  padding: 24px 28px; margin-bottom: 20px;
}
.wr-head h3 { font-size: 19px; font-weight: 800; }
.wr-head p { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.wr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.wr-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 18px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 9px;
}
.wr-card.is-top { border-color: #cfcaff; background: linear-gradient(160deg, #fdfdff, #f8f7ff); }
.wr-rank { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; color: var(--brand); }
.wr-card h4 { font-size: 15.5px; font-weight: 750; line-height: 1.5; }
.wr-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.wr-meta span { font-size: 11px; font-weight: 700; background: var(--bg-2); color: var(--ink-2); padding: 3px 9px; border-radius: 999px; }
.wr-meta .wr-amount { background: var(--brand-soft); color: var(--brand); }
.wr-why { font-size: 12px; color: var(--ink-2); line-height: 1.75; }
.wr-prep { font-size: 11.5px; color: var(--ink-3); border-top: 1px dashed var(--line-2); padding-top: 9px; }
.wr-prep strong { color: var(--warn); }
.wr-foot { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Karte ===== */
.karte-section { background: var(--white); border-block: 1px solid var(--line); }
.local-note { font-size: 11.5px; font-weight: 600; color: var(--ok); background: var(--ok-bg); padding: 4px 12px; border-radius: 999px; vertical-align: middle; margin-left: 10px; }
.karte-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.karte-cat {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 16px;
}
.karte-cat h3 { font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.karte-cat h3 .karte-ico { font-size: 16px; }
.karte-cat h3 .karte-count { margin-left: auto; font-size: 11px; color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.karte-items { display: flex; flex-direction: column; gap: 4px; }
.karte-item {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer; user-select: none;
  padding: 7px 9px; border-radius: 9px; transition: background .12s;
}
.karte-item:hover { background: var(--white); }
.karte-item input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; margin-top: 3px; flex-shrink: 0; }
.karte-item .karte-label { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.6; }
.karte-item .karte-note { display: block; font-size: 11px; color: var(--ink-3); font-weight: 500; margin-top: 1px; }
.karte-item input:checked ~ div .karte-label { color: var(--ok); }
.karte-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ===== Checklist ===== */
.checklist-empty {
  background: var(--white); border: 1px dashed var(--line-2); border-radius: var(--radius-lg);
  padding: 40px 30px; text-align: center; font-size: 14px; color: var(--ink-3);
}
.checklist-empty a { color: var(--brand); font-weight: 700; }
.checklist-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.checklist-tab {
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--white); color: var(--ink-2); transition: all .14s;
  display: inline-flex; align-items: center; gap: 8px;
}
.checklist-tab .tab-pct { font-size: 11px; font-weight: 800; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; }
.checklist-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.checklist-tab.active .tab-pct { background: rgba(255, 255, 255, .18); color: #fff; }

.cl-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 30px 22px; box-shadow: var(--shadow-sm); }
.cl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.cl-head h3 { font-size: 19px; font-weight: 800; line-height: 1.5; }
.cl-head .cl-head-meta { font-size: 12px; color: var(--ink-3); margin-top: 5px; display: flex; flex-wrap: wrap; gap: 12px; }
.cl-head .cl-head-meta strong { color: var(--warn); }
.cl-deadline { flex-shrink: 0; }
.cl-progress-wrap { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; }
.cl-progress { flex: 1; height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.cl-progress-bar { height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width .4s cubic-bezier(.2, .8, .3, 1); }
.cl-progress-num { font-size: 12.5px; font-weight: 800; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.cl-phase { margin-top: 22px; }
.cl-phase-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.cl-phase-head h4 { font-size: 14px; font-weight: 800; }
.cl-phase-head .cl-phase-lead { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.cl-items { display: flex; flex-direction: column; }
.cl-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 10px; border-top: 1px solid var(--line);
  transition: background .12s;
}
.cl-item:hover { background: var(--bg); }
.cl-item input { width: 17px; height: 17px; accent-color: var(--ok); cursor: pointer; margin-top: 3px; flex-shrink: 0; }
.cl-item.is-done .cl-label { text-decoration: line-through; color: var(--ink-3); }
.cl-item.is-auto .cl-label::after {
  content: "カルテから自動チェック"; font-size: 10px; font-weight: 700; color: var(--ok);
  background: var(--ok-bg); border-radius: 999px; padding: 2px 8px; margin-left: 8px; text-decoration: none; display: inline-block;
}
.cl-item-body { flex: 1; min-width: 0; }
.cl-label { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.6; cursor: pointer; }
.cl-desc { font-size: 12px; color: var(--ink-2); line-height: 1.75; margin-top: 3px; }
.cl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.cl-tags span { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg-2); color: var(--ink-3); }
.cl-tags .cl-lead-tag { background: var(--warn-bg); color: var(--warn); }
.cl-tags a { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.cl-tags a:hover { text-decoration: underline; }
.checklist-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ===== AI roadmap ===== */
.ai-section { background: var(--white); border-block: 1px solid var(--line); }
.ai-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.ai-phase {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; position: relative;
  transition: transform .18s, box-shadow .18s;
}
.ai-phase:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ai-phase.is-now { border-color: #cfcaff; background: linear-gradient(160deg, #fdfdff, #f6f5ff); }
.ai-phase-tag {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  background: var(--muted-bg); color: var(--ink-3); padding: 4px 12px; border-radius: 999px;
}
.ai-phase.is-now .ai-phase-tag { background: var(--grad); color: #fff; }
.ai-phase h3 { font-size: 16.5px; font-weight: 800; margin: 14px 0 8px; }
.ai-phase p { font-size: 13px; color: var(--ink-2); line-height: 1.85; }
.ai-note { margin-top: 20px; font-size: 12px; color: var(--ink-3); }

.footer-by { font-weight: 600; font-size: 12px; color: var(--ink-3); }

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .prep-hero .hero-inner { grid-template-columns: 1fr; }
  .wizard-panel { padding: 22px 20px 18px; }
  .cl-panel { padding: 20px 16px 16px; }
}

/* ===== Print（チェックリストのみ） ===== */
@media print {
  .site-header, .prep-hero, .flow-section, .wizard-section, .karte-section,
  .ai-section, .contact-section, .site-footer,
  .checklist-tabs, .checklist-actions, .checklist-empty { display: none !important; }
  body { background: #fff; }
  .checklist-section { padding: 0; }
  .checklist-section .section-head { margin-bottom: 14px; }
  .cl-panel { border: none; box-shadow: none; padding: 0; }
  .cl-item { break-inside: avoid; }
  .checklist-body::after {
    content: "出典: 申請準備アシスト by 補助金ナビ / subsidy.uneetoile.jp/prep/ ｜ 要件・締切は必ず公式公募要領でご確認ください。";
    display: block; font-size: 10px; color: #666; margin-top: 14px;
  }
}
