/* =========================================================
   起業前ドック スタイルシート
   仕様書 §9 UI / UX 仕様に準拠
   ========================================================= */

:root {
  /* Brand */
  --navy: #0F2742;
  --deep-blue: #1E5B9A;
  --light-blue: #EAF4FF;
  --gold: #C9A24D;
  --coral: #E97A5F;
  --soft-pink: #FCEDEA;
  --greige: #F7F5F1;

  /* Section accents */
  --why-bg: #FCEDEA;
  --why-fg: #993C1D;
  --why-border: #F5C4B3;

  --eff-bg: #EAF4FF;
  --eff-fg: #185FA5;
  --eff-border: #85B7EB;

  /* Semantic */
  --warn: #E97A5F;
  --warn-bg: #FAECE7;
  --success: #1D9E75;
  --success-bg: #E1F5EE;

  /* Neutral */
  --text: #1b2432;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #fbfaf7;
  --card: #ffffff;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--deep-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

/* ---------- Typography ---------- */
h1 { font-size: 22px; font-weight: 500; margin: 0 0 12px; color: var(--navy); }
h2 { font-size: 18px; font-weight: 500; margin: 24px 0 12px; color: var(--navy); }
h3 { font-size: 16px; font-weight: 500; margin: 16px 0 8px; color: var(--navy); }
p { margin: 0 0 12px; }
small { font-size: 12px; color: var(--muted); }
.caption { font-size: 11px; color: var(--muted); }

/* ---------- Layout ---------- */
.container { max-width: 720px; margin: 0 auto; padding: 24px 16px; }
.container-wide { max-width: 960px; margin: 0 auto; padding: 24px 16px; }
.container-narrow { max-width: 520px; margin: 0 auto; padding: 24px 16px; }

.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo {
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--deep-blue), var(--navy));
  color: #fff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 500;
}
.nav { display: flex; gap: 16px; align-items: center; font-size: 13px; }
.nav a { color: var(--text); }
.nav a:hover { color: var(--deep-blue); }

.footer {
  margin-top: 48px;
  padding: 32px 16px;
  background: var(--navy);
  color: #dce3ed;
  font-size: 12px;
  text-align: center;
}
.footer a { color: #a7c1e0; }
.footer .disclaimer {
  max-width: 720px;
  margin: 16px auto 0;
  font-size: 11px;
  line-height: 1.8;
  color: #94a4bb;
  text-align: left;
  border-top: 1px solid #2a4063;
  padding-top: 16px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}
.card-sm { padding: 14px; border-radius: 12px; }
.card-emph {
  background: var(--light-blue);
  border-color: var(--eff-border);
}
.card-why { background: var(--why-bg); border-color: var(--why-border); color: var(--why-fg); }
.card-eff { background: var(--eff-bg); border-color: var(--eff-border); color: var(--eff-fg); }
.card-warn { background: var(--warn-bg); border-color: var(--warn); color: var(--why-fg); }
.card-success { background: var(--success-bg); border-color: var(--success); color: #0d6847; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  min-height: 44px;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--deep-blue);
  color: #fff;
}
.btn-primary:hover { background: var(--navy); }
.btn-secondary {
  background: #fff;
  color: var(--navy);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--deep-blue); color: var(--deep-blue); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { filter: brightness(0.95); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { filter: brightness(0.95); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 8px 14px; min-height: 36px; font-size: 13px; }
.btn[disabled], .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 18px; }
.label { display: block; font-size: 13px; font-weight: 500; color: var(--navy); margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--deep-blue);
  box-shadow: 0 0 0 3px rgba(30, 91, 154, 0.12);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Scale 1..5 options ---------- */
.scale-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.scale-opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.15s;
  min-height: 60px;
}
.scale-opt:hover { border-color: var(--deep-blue); color: var(--deep-blue); }
.scale-opt input { display: none; }
.scale-opt .num { font-size: 16px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.scale-opt.selected {
  background: var(--light-blue);
  border-color: var(--deep-blue);
  color: var(--deep-blue);
}
.scale-opt.selected .num { color: var(--deep-blue); }
.scale-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- Question card ---------- */
.question {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
}
.question-num {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.question-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.6;
}

/* ---------- Progress ---------- */
.progress {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 16px;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--deep-blue), var(--gold));
  transition: width 0.3s;
}

/* ---------- Score card ---------- */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.score-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.score-card .score-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.score-card .score-value {
  font-size: 26px;
  font-weight: 500;
  color: var(--navy);
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
}
.score-card .score-unit { font-size: 12px; color: var(--muted); margin-left: 2px; }
.score-card.why .score-value { color: var(--why-fg); }
.score-card.eff .score-value { color: var(--eff-fg); }
.score-card.gold .score-value { color: var(--gold); }

/* ---------- Sub score bar ---------- */
.sub-score {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
}
.sub-score-label { width: 120px; color: var(--navy); font-weight: 500; }
.sub-score-bar {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.sub-score-bar > span {
  display: block;
  height: 100%;
  background: var(--deep-blue);
}
.sub-score-bar.why > span { background: var(--coral); }
.sub-score-bar.eff > span { background: var(--deep-blue); }
.sub-score-value { width: 40px; text-align: right; font-weight: 500; color: var(--navy); }

/* ---------- 2x2 Matrix ---------- */
.matrix-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 24px auto;
  aspect-ratio: 1;
}
.matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--border);
}
.matrix-cell {
  background: #fff;
  padding: 14px;
  font-size: 12px;
  position: relative;
}
.matrix-cell .cell-title { font-weight: 500; color: var(--navy); margin-bottom: 4px; }
.matrix-cell.active { background: var(--light-blue); outline: 2px solid var(--deep-blue); z-index: 1; border-radius: 10px; }
.matrix-axis-y, .matrix-axis-x {
  position: absolute;
  font-size: 11px;
  color: var(--muted);
}
.matrix-axis-y {
  left: -40px;
  top: 50%;
  transform: rotate(-90deg) translateX(50%);
  transform-origin: left top;
}
.matrix-axis-x {
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
}

/* ---------- Chat ---------- */
.chat-wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.chat-messages {
  min-height: 320px;
  padding: 12px 0;
}
.msg {
  margin: 8px 0;
  display: flex;
  gap: 8px;
}
.msg.user { justify-content: flex-end; }
.msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.msg.assistant .msg-bubble {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-top-left-radius: 4px;
}
.msg.user .msg-bubble {
  background: var(--deep-blue);
  color: #fff;
  border-top-right-radius: 4px;
}
.chat-input-row {
  display: flex; gap: 8px;
  padding: 12px 0;
  position: sticky;
  bottom: 0;
  background: var(--bg);
}
.chat-input-row .textarea { min-height: 52px; }

.mode-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.mode-tab {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.mode-tab.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Hero (LP) ---------- */
.hero {
  background: linear-gradient(135deg, #f5f8fd 0%, var(--light-blue) 60%, #dfe9f7 100%);
  padding: 56px 16px 64px;
  text-align: center;
}
.hero h1 {
  font-size: 28px;
  line-height: 1.5;
  max-width: 680px;
  margin: 0 auto 18px;
}
.hero-lead {
  max-width: 620px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.feature-grid .card { margin: 0; }
.feature-icon {
  width: 40px; height: 40px;
  background: var(--light-blue);
  color: var(--deep-blue);
  border-radius: 10px;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 500;
  margin-bottom: 10px;
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.price-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.price-card.highlight {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 77, 0.14);
}
.price-badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 10px;
  align-self: flex-start;
}
.price-tier { font-size: 14px; font-weight: 500; color: var(--navy); margin-bottom: 4px; }
.price-amount {
  font-size: 28px;
  font-weight: 500;
  color: var(--navy);
  font-family: 'Inter', sans-serif;
}
.price-amount small { font-size: 14px; color: var(--muted); margin-left: 4px; }
.price-features { list-style: none; padding: 0; margin: 14px 0 18px; font-size: 13px; }
.price-features li { padding: 4px 0; color: var(--text); }
.price-features li::before { content: '✓ '; color: var(--success); }
.price-card .btn { margin-top: auto; }

/* ---------- Disclaimer ---------- */
.disclaimer-card {
  background: var(--greige);
  border: 1px dashed #d4cec0;
  border-radius: 10px;
  padding: 14px;
  font-size: 11px;
  line-height: 1.8;
  color: #6b6356;
  margin: 24px 0;
}

/* ---------- Flash ---------- */
.flash {
  padding: 10px 14px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 13px;
}
.flash-info { background: var(--light-blue); color: var(--eff-fg); border: 1px solid var(--eff-border); }
.flash-success { background: var(--success-bg); color: #0d6847; border: 1px solid var(--success); }
.flash-error { background: var(--warn-bg); color: var(--why-fg); border: 1px solid var(--warn); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-navy { color: var(--navy); }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-gap-8 { gap: 8px; }
.flex-gap-16 { gap: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-col { flex-direction: column; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hidden { display: none !important; }
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--light-blue);
  color: var(--eff-fg);
}
.badge-gold { background: #f5ecd5; color: #8a6d1e; }
.badge-coral { background: var(--soft-pink); color: var(--why-fg); }
.badge-muted { background: var(--greige); color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  h1 { font-size: 20px; }
  .hero h1 { font-size: 22px; }
  .hero { padding: 40px 16px 48px; }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .scale-options { gap: 4px; }
  .scale-opt { font-size: 11px; padding: 8px 2px; }
  .nav { font-size: 12px; gap: 10px; }
}
