/* ================================================================
   Reme 採用コスト・人材流出リスク診断
   Brand: Navy #2D2B6B / Purple #7B3FA0
================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #2D2B6B;
  --purple:  #7B3FA0;
  --navy-light: #3D3B8B;
  --bg:      #F4F6FB;
  --white:   #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100:#F1F5F9;
  --gray-200:#E2E8F0;
  --gray-400:#94A3B8;
  --gray-600:#475569;
  --gray-800:#1E293B;
  --risk-high:   #DC2626;
  --risk-medium: #D97706;
  --risk-low:    #059669;
}

body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1A1850 50%, var(--purple) 100%);
  padding: 48px 24px 40px;
  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(123, 63, 160, 0.25);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.logo-img {
  width: 250px;
  height: auto;
  object-fit: contain;
  margin-bottom: 16px;
  border-radius: 6px;
  position: relative;
  z-index: 1;
}

.logo-img-sm {
  width: 140px;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.hero-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.meta-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ===== RESULT HERO ===== */
.result-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1A1850 50%, var(--purple) 100%);
  padding: 32px 24px 28px;
  text-align: center;
}

.result-hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
  letter-spacing: 2px;
  font-weight: 700;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ===== QUESTION CARD ===== */
.question-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1.5px solid transparent;
  transition: border-color 0.2s;
}

.question-card.answered {
  border-color: var(--navy);
}

.question-number {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--purple);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.question-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 16px;
  line-height: 1.5;
}

.question-note {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 14px;
  margin-top: -10px;
}

.options-grid {
  display: grid;
  gap: 8px;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  color: var(--gray-800);
}

.option-label:hover {
  border-color: var(--navy);
  background: var(--gray-50);
}

.option-label input[type="radio"] {
  display: none;
}

.option-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  flex-shrink: 0;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-label input:checked ~ .option-dot,
.option-label.selected .option-dot {
  border-color: var(--navy);
  background: var(--navy);
}

.option-label input:checked ~ .option-dot::after,
.option-label.selected .option-dot::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

.option-label input:checked + .option-dot + .option-text,
.option-label.selected .option-text {
  color: var(--navy);
  font-weight: 700;
}

/* selected state via JS */
.option-label.selected {
  border-color: var(--navy);
  background: rgba(45, 43, 107, 0.04);
}

.option-text {
  flex: 1;
}

/* ===== PROGRESS ===== */
.progress-wrapper {
  margin-bottom: 20px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.progress-bar-bg {
  height: 4px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--purple));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ===== SUBMIT BUTTON ===== */
.submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--navy), var(--purple));
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.submit-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45, 43, 107, 0.3);
}

/* ===== HIDDEN ===== */
.hidden { display: none !important; }

/* ===== RISK LEVEL SECTION ===== */
.risk-level-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  border-top: 4px solid var(--risk-high);
}

.risk-level-card.medium {
  border-top-color: var(--risk-medium);
}

.risk-level-card.low {
  border-top-color: var(--risk-low);
}

.risk-level-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--gray-400);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.risk-level-badge {
  display: inline-block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 8px 28px;
  border-radius: 40px;
  margin-bottom: 16px;
}

.risk-badge-high {
  background: rgba(220, 38, 38, 0.1);
  color: var(--risk-high);
}

.risk-badge-medium {
  background: rgba(217, 119, 6, 0.1);
  color: var(--risk-medium);
}

.risk-badge-low {
  background: rgba(5, 150, 105, 0.1);
  color: var(--risk-low);
}

.risk-level-desc {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ===== RISK METER ===== */
.risk-meter {
  display: flex;
  height: 8px;
  border-radius: 8px;
  overflow: hidden;
  gap: 3px;
  margin-top: 16px;
}

.risk-meter-seg {
  flex: 1;
  border-radius: 4px;
  background: var(--gray-200);
  transition: background 0.4s;
}

.risk-meter-seg.active-high   { background: var(--risk-high); }
.risk-meter-seg.active-medium { background: var(--risk-medium); }
.risk-meter-seg.active-low    { background: var(--risk-low); }

/* ===== COST SECTION ===== */
.cost-card {
  background: linear-gradient(135deg, var(--navy) 0%, #1A1850 60%, var(--purple) 100%);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 16px;
  text-align: center;
  color: var(--white);
  box-shadow: 0 4px 16px rgba(45, 43, 107, 0.25);
}

.cost-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.cost-amount {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}

.cost-unit {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  margin-bottom: 12px;
}

.cost-note {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

/* ===== BREAKDOWN ===== */
.breakdown-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

.breakdown-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
}

.breakdown-row:last-child {
  border-bottom: none;
  padding-top: 14px;
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
}

.breakdown-key {
  color: var(--gray-600);
  flex: 1;
}

.breakdown-val {
  color: var(--gray-800);
  font-weight: 700;
  text-align: right;
}

/* ===== ADVICE ===== */
.advice-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.07);
}

.advice-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 14px;
}

.advice-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}

.advice-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== CTA ===== */
.cta-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 28px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(45, 43, 107, 0.15);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: linear-gradient(135deg, #F59E0B, #7B3FA0, #2D2B6B);
  z-index: -1;
}

.cta-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--purple));
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.cta-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--gray-800);
  margin-bottom: 12px;
  line-height: 1.3;
}

.cta-desc {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.9;
  margin-bottom: 24px;
}

.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  padding: 17px 24px;
  border-radius: 14px;
  transition: all 0.2s;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.cta-btn-primary {
  background: linear-gradient(135deg, #F59E0B, #F97316);
  color: var(--white);
  font-size: 16px;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45);
  animation: pulse-gold 2.5s ease-in-out infinite;
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 6px 24px rgba(245, 158, 11, 0.45); }
  50%       { box-shadow: 0 8px 32px rgba(245, 158, 11, 0.7); }
}

.cta-btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--gray-200);
}

.cta-btn:hover {
  transform: translateY(-2px);
}

.cta-btn-primary:hover {
  box-shadow: 0 10px 36px rgba(245, 158, 11, 0.6);
  animation: none;
}

.cta-btn-secondary:hover {
  border-color: var(--navy);
}

.cta-btn-arrow {
  display: inline-block;
  font-size: 18px;
  transition: transform 0.2s;
}

.cta-btn:hover .cta-btn-arrow {
  transform: translateX(4px);
}

.cta-urgency {
  margin-top: 14px;
  font-size: 12px;
  color: var(--gray-400);
}

/* ===== RESTART ===== */
.restart-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--gray-400);
  font-size: 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s;
}

.restart-btn:hover {
  color: var(--gray-600);
  border-color: var(--gray-400);
}

/* ===== PROFILE CARD ===== */
.profile-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-left: 4px solid var(--navy);
}

.profile-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.profile-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-item label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
}

.required {
  font-size: 10px;
  font-weight: 800;
  color: var(--white);
  background: var(--purple);
  padding: 2px 6px;
  border-radius: 4px;
}

.profile-item input {
  padding: 12px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 15px;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.15s;
  background: var(--white);
}

.profile-item input:focus {
  border-color: var(--navy);
}

.profile-item input::placeholder {
  color: var(--gray-400);
}

/* ===== CONSENT ===== */
.consent-box {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  margin-top: 4px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--navy);
  cursor: pointer;
}

.consent-text {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.7;
}

.consent-text a {
  color: var(--navy);
  text-decoration: underline;
}

/* ===== LOADING ===== */
#loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

.loading-content {
  text-align: center;
  padding: 40px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.loading-sub {
  font-size: 13px;
  color: var(--gray-400);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 400px) {
  .hero-title { font-size: 22px; }
  .cost-amount { font-size: 40px; }
  .risk-level-badge { font-size: 22px; }
}
