/* ===================================
   副業診断ツール v2.0
   hukugyo-guide.com
   =================================== */

#shindan-app {
  --sd-primary: #2563eb;
  --sd-primary-dark: #1d4ed8;
  --sd-secondary: #7c3aed;
  --sd-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --sd-bg: #f1f5f9;
  --sd-card: #ffffff;
  --sd-text: #1e293b;
  --sd-text-sub: #64748b;
  --sd-border: #e2e8f0;
  --sd-accent-green: #10b981;
  --sd-accent-orange: #f59e0b;
  --sd-accent-red: #ef4444;
  --sd-radius: 16px;
  --sd-radius-sm: 10px;
  --sd-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --sd-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* === Container === */
#shindan-app {
  max-width: 560px;
  margin: 32px auto;
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--sd-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
#shindan-app *, #shindan-app *::before, #shindan-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* === Header === */
#shindan-app .sd-header {
  background: var(--sd-gradient);
  color: #fff;
  text-align: center;
  padding: 28px 20px 24px;
  border-radius: var(--sd-radius) var(--sd-radius) 0 0;
  position: relative;
  overflow: hidden;
}
#shindan-app .sd-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255,255,255,0.2);
}
#shindan-app .sd-header-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
#shindan-app .sd-header-sub {
  font-size: 0.88rem;
  opacity: 0.85;
  font-weight: 400;
}

/* === Body card === */
#shindan-app .sd-body {
  background: var(--sd-card);
  border-radius: 0 0 var(--sd-radius) var(--sd-radius);
  box-shadow: var(--sd-shadow);
  padding: 0;
  overflow: hidden;
}

/* === Start screen === */
#shindan-app .sd-start {
  padding: 36px 24px 32px;
  text-align: center;
  animation: sdFadeUp 0.5s ease;
}
#shindan-app .sd-start-icon {
  font-size: 3.2rem;
  margin-bottom: 12px;
}
#shindan-app .sd-start-lead {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--sd-text);
  margin-bottom: 18px;
  line-height: 1.6;
}
#shindan-app .sd-features {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
#shindan-app .sd-feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f4ff;
  color: var(--sd-primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
}
#shindan-app .sd-start-btn {
  display: inline-block;
  background: var(--sd-gradient);
  color: #fff;
  font-size: 1.12rem;
  font-weight: 700;
  padding: 16px 48px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  letter-spacing: 0.04em;
}
#shindan-app .sd-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.45);
}
#shindan-app .sd-start-btn:active {
  transform: translateY(0);
}
#shindan-app .sd-start-note {
  font-size: 0.78rem;
  color: var(--sd-text-sub);
  margin-top: 12px;
}

/* === Progress bar === */
#shindan-app .sd-progress-wrap {
  padding: 20px 24px 0;
}
#shindan-app .sd-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
#shindan-app .sd-progress-step {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sd-primary);
}
#shindan-app .sd-progress-pct {
  font-size: 0.78rem;
  color: var(--sd-text-sub);
}
#shindan-app .sd-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--sd-border);
  border-radius: 3px;
  overflow: hidden;
}
#shindan-app .sd-progress-fill {
  height: 100%;
  background: var(--sd-gradient);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Question === */
#shindan-app .sd-question-wrap {
  padding: 24px 24px 28px;
  animation: sdFadeUp 0.35s ease;
}
#shindan-app .sd-question-text {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--sd-text);
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.65;
}

/* === Options === */
#shindan-app .sd-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#shindan-app .sd-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--sd-bg);
  border: 2px solid transparent;
  border-radius: var(--sd-radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#shindan-app .sd-option:hover {
  border-color: var(--sd-primary);
  background: #f0f4ff;
}
#shindan-app .sd-option:active {
  transform: scale(0.98);
}
#shindan-app .sd-option-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  transition: all 0.18s ease;
  position: relative;
}
#shindan-app .sd-option:hover .sd-option-radio {
  border-color: var(--sd-primary);
}
#shindan-app .sd-option-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--sd-text);
  line-height: 1.5;
}
#shindan-app .sd-option-desc {
  font-size: 0.8rem;
  color: var(--sd-text-sub);
  margin-top: 2px;
}

/* Selected state */
#shindan-app .sd-option.selected {
  border-color: var(--sd-primary);
  background: #eff3ff;
}
#shindan-app .sd-option.selected .sd-option-radio {
  border-color: var(--sd-primary);
  background: var(--sd-primary);
}
#shindan-app .sd-option.selected .sd-option-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

/* === Navigation === */
#shindan-app .sd-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px 24px;
  gap: 12px;
}
#shindan-app .sd-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 2px solid var(--sd-border);
  color: var(--sd-text-sub);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--sd-radius-sm);
  cursor: pointer;
  transition: all 0.18s;
}
#shindan-app .sd-nav-back:hover {
  border-color: var(--sd-primary);
  color: var(--sd-primary);
}

/* === Results === */
#shindan-app .sd-result {
  padding: 28px 20px 32px;
  animation: sdFadeUp 0.6s ease;
}
#shindan-app .sd-result-intro {
  text-align: center;
  margin-bottom: 24px;
}
#shindan-app .sd-result-intro-label {
  font-size: 0.82rem;
  color: var(--sd-text-sub);
  font-weight: 500;
  margin-bottom: 4px;
}
#shindan-app .sd-result-type-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--sd-text);
  margin-bottom: 8px;
}
#shindan-app .sd-result-type-desc {
  font-size: 0.92rem;
  color: var(--sd-text-sub);
  line-height: 1.65;
}

/* Profile bars */
#shindan-app .sd-profile {
  background: var(--sd-bg);
  border-radius: var(--sd-radius-sm);
  padding: 18px 16px;
  margin-bottom: 24px;
}
#shindan-app .sd-profile-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sd-text);
  margin-bottom: 14px;
  text-align: center;
}
#shindan-app .sd-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
#shindan-app .sd-profile-row:last-child {
  margin-bottom: 0;
}
#shindan-app .sd-profile-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sd-text-sub);
  min-width: 72px;
  text-align: right;
}
#shindan-app .sd-profile-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
#shindan-app .sd-profile-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
#shindan-app .sd-profile-bar-fill.blue { background: var(--sd-primary); }
#shindan-app .sd-profile-bar-fill.purple { background: var(--sd-secondary); }
#shindan-app .sd-profile-bar-fill.green { background: var(--sd-accent-green); }
#shindan-app .sd-profile-bar-fill.orange { background: var(--sd-accent-orange); }

/* Top 3 section */
#shindan-app .sd-top3-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--sd-text);
  text-align: center;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Job cards */
#shindan-app .sd-job-card {
  background: var(--sd-card);
  border: 1.5px solid var(--sd-border);
  border-radius: var(--sd-radius);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
#shindan-app .sd-job-card:hover {
  box-shadow: var(--sd-shadow);
}
#shindan-app .sd-job-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#shindan-app .sd-job-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
#shindan-app .sd-job-rank.rank-1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
#shindan-app .sd-job-rank.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
#shindan-app .sd-job-rank.rank-3 { background: linear-gradient(135deg, #d97706, #b45309); }
#shindan-app .sd-job-info {
  flex: 1;
  min-width: 0;
}
#shindan-app .sd-job-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--sd-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
#shindan-app .sd-job-score-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
#shindan-app .sd-job-score-bar {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  max-width: 120px;
}
#shindan-app .sd-job-score-fill {
  height: 100%;
  background: var(--sd-gradient);
  border-radius: 3px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
#shindan-app .sd-job-score-pct {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--sd-primary);
  min-width: 40px;
}
#shindan-app .sd-job-toggle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sd-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s;
  font-size: 0.75rem;
  color: var(--sd-text-sub);
}
#shindan-app .sd-job-card.open .sd-job-toggle {
  transform: rotate(180deg);
}

/* Job detail */
#shindan-app .sd-job-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#shindan-app .sd-job-card.open .sd-job-detail {
  max-height: 800px;
}
#shindan-app .sd-job-detail-inner {
  padding: 0 16px 18px;
  border-top: 1px solid var(--sd-border);
}

/* Job meta tags */
#shindan-app .sd-job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
#shindan-app .sd-job-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--sd-bg);
  color: var(--sd-text);
}
#shindan-app .sd-job-tag.income { background: #ecfdf5; color: #047857; }
#shindan-app .sd-job-tag.time { background: #eff6ff; color: #1d4ed8; }
#shindan-app .sd-job-tag.diff { background: #fef3c7; color: #b45309; }
#shindan-app .sd-job-tag.cost { background: #fce7f3; color: #be185d; }

/* Pros & Cons */
#shindan-app .sd-job-proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
#shindan-app .sd-pc-box {
  background: var(--sd-bg);
  border-radius: 8px;
  padding: 10px 12px;
}
#shindan-app .sd-pc-title {
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
}
#shindan-app .sd-pc-title.pro { color: var(--sd-accent-green); }
#shindan-app .sd-pc-title.con { color: var(--sd-accent-red); }
#shindan-app .sd-pc-list {
  list-style: none;
  font-size: 0.8rem;
  color: var(--sd-text);
  line-height: 1.55;
}
#shindan-app .sd-pc-list li {
  margin-bottom: 3px;
  padding-left: 14px;
  position: relative;
}
#shindan-app .sd-pc-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
#shindan-app .sd-pc-list.pro li::before { background: var(--sd-accent-green); }
#shindan-app .sd-pc-list.con li::before { background: var(--sd-accent-red); }

/* Steps */
#shindan-app .sd-job-steps-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sd-text);
  margin-bottom: 10px;
}
#shindan-app .sd-job-steps {
  list-style: none;
}
#shindan-app .sd-job-steps li {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.85rem;
  line-height: 1.5;
}
#shindan-app .sd-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sd-gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* CTA in card */
#shindan-app .sd-job-cta {
  display: block;
  text-align: center;
  background: var(--sd-gradient);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--sd-radius-sm);
  text-decoration: none;
  margin-top: 14px;
  transition: opacity 0.18s;
  letter-spacing: 0.02em;
}
#shindan-app .sd-job-cta:hover {
  opacity: 0.9;
  color: #fff;
}

/* Bottom actions */
#shindan-app .sd-result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--sd-border);
}
#shindan-app .sd-share-row {
  display: flex;
  gap: 10px;
}
#shindan-app .sd-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--sd-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.18s;
  text-decoration: none;
  color: #fff;
}
#shindan-app .sd-share-btn:hover { opacity: 0.85; color: #fff; }
#shindan-app .sd-share-btn.twitter { background: #1da1f2; }
#shindan-app .sd-share-btn.line { background: #06c755; }
#shindan-app .sd-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 2px solid var(--sd-border);
  color: var(--sd-text-sub);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 28px;
  border-radius: var(--sd-radius-sm);
  cursor: pointer;
  transition: all 0.18s;
}
#shindan-app .sd-retry-btn:hover {
  border-color: var(--sd-primary);
  color: var(--sd-primary);
}

/* === Animations === */
@keyframes sdFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 600px) {
  #shindan-app {
    margin: 16px 8px;
  }
  #shindan-app .sd-header {
    padding: 22px 16px 20px;
  }
  #shindan-app .sd-header-title {
    font-size: 1.2rem;
  }
  #shindan-app .sd-start {
    padding: 28px 16px 24px;
  }
  #shindan-app .sd-question-wrap {
    padding: 20px 16px 24px;
  }
  #shindan-app .sd-progress-wrap {
    padding: 16px 16px 0;
  }
  #shindan-app .sd-nav {
    padding: 0 16px 20px;
  }
  #shindan-app .sd-result {
    padding: 20px 14px 28px;
  }
  #shindan-app .sd-job-proscons {
    grid-template-columns: 1fr;
  }
  #shindan-app .sd-job-card-header {
    padding: 14px 12px 12px;
  }
  #shindan-app .sd-job-detail-inner {
    padding: 0 12px 16px;
  }
}
