:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #1e293b;
  --muted: #64748b;
  --border: #d7e0ea;
  --primary: #2563eb;
  --primary-weak: #dbeafe;
  --success: #16a34a;
  --warning: #f97316;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
}

button:disabled {
  cursor: not-allowed;
}

.app-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 32px auto;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.hero__badge {
  display: inline-block;
  background: var(--primary-weak);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  line-height: 1.35;
}

.hero__lead {
  color: var(--muted);
  margin: 16px auto 0;
  max-width: 640px;
}

.hero__notes {
  list-style: none;
  padding: 0;
  margin: 22px auto 0;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__notes li {
  background: #e0f2fe;
  color: #0369a1;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.progress {
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}

.progress__bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  transition: width 0.25s ease;
}

.form-block {
  margin-bottom: 34px;
}

.form-block__header h2 {
  margin: 0;
  font-size: 1.22rem;
}

.form-block__header p {
  margin: 4px 0 18px;
  color: var(--muted);
}

.subhead {
  font-weight: 700;
  margin-bottom: 12px;
}

.subhead__hint {
  color: var(--primary);
  margin-left: 8px;
  font-weight: 600;
}

.region-step {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.choice-grid--salary {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.choice-grid--region {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.choice-grid--prefecture {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.choice-btn {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 15px 14px;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.choice-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.choice-btn:active {
  transform: scale(0.98);
}

.choice-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.cta-row {
  text-align: center;
  margin-top: 38px;
}

.diagnose-btn {
  background: var(--warning);
  color: #fff;
  padding: 18px 42px;
  border-radius: 14px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.2);
}

.diagnose-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.diagnose-btn:disabled {
  background: #cbd5e1;
  color: #f8fafc;
  box-shadow: none;
}

.cta-row__hint {
  color: var(--muted);
  margin-top: 12px;
}

.result {
  margin-top: 48px;
  border-top: 2px solid #e5e7eb;
  padding-top: 36px;
  animation: fadeUp 0.45s ease;
}

.result__eyebrow {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}

.result__title {
  margin: 18px 0 26px;
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  text-align: center;
}

.result__main {
  text-align: center;
  margin-bottom: 32px;
}

.result__range {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  color: var(--primary);
  line-height: 1.1;
}

.result__sub {
  margin-top: 10px;
  color: var(--success);
  font-size: 1.15rem;
  font-weight: 800;
}

.result__detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.result-card {
  background: var(--surface-soft);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.result-card__label {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.result-card__value {
  font-size: 1.25rem;
  font-weight: 800;
}

.result__region-boost {
  margin-top: 26px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 20px 22px;
}

.result__region-boost-title {
  font-weight: 800;
  color: #1d4ed8;
  margin-bottom: 10px;
}

.result__region-boost-body {
  color: #0f172a;
  line-height: 1.9;
}

.result__note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.affiliate-slot {
  margin-top: 34px;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 22px;
  background: #fafafa;
}

.affiliate-slot__label {
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 12px;
}

.affiliate-slot__placeholder {
  background: #fff;
  border-radius: 12px;
  padding: 42px 18px;
  text-align: center;
  color: #94a3b8;
  min-height: 180px;
  display: grid;
  place-items: center;
}

.footer {
  margin-top: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .result__detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-shell {
    width: min(100%, calc(100% - 16px));
    margin: 16px auto;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 1.68rem;
  }

  .hero__lead {
    font-size: 0.95rem;
  }

  .hero__notes {
    flex-direction: column;
    align-items: center;
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid--salary {
    grid-template-columns: 1fr;
  }

  .choice-grid--prefecture {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagnose-btn {
    width: 100%;
    padding: 18px 16px;
    font-size: 1rem;
  }

  .result__range {
    font-size: 2.25rem;
  }

  .affiliate-slot__placeholder {
    min-height: 220px;
  }
}

@media (min-width: 1200px) {
  .app-shell {
    max-width: 1080px;
  }
}
