* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

body {
  background-color: #f8fafc;
  color: #1e293b;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px 16px;
  position: relative;
}

/* 画面端に固定する「トップへ戻る」ボタン */
.fixed-top-back-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  padding: 8px 14px;
  border-radius: 9999px;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  z-index: 100;
}

@media (hover: hover) and (pointer: fine) {
  .fixed-top-back-btn:hover {
    background-color: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(-2px);
  }
}

.container {
  width: 100%;
  max-width: 520px;
}

#quiz-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 28px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.card-header {
  margin-bottom: 24px;
}

.progress-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #4f46e5;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.question-text {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.45;
  color: #0f172a;
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  background-color: #f1f5f9;
  color: #1e293b;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  line-height: 1.4;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .option-btn:hover {
    background-color: #e0e7ff;
    border-color: #818cf8;
    color: #312e81;
  }
}

.option-btn:active {
  background-color: #c7d2fe;
  border-color: #4f46e5;
}

/* 結果画面用パーツ */
.result-image-wrap {
  margin: 16px 0 20px;
  width: 100%;
}

.result-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.share-btn-primary {
  display: block;
  text-align: center;
  background: #000;
  color: #fff;
  border: none;
  text-decoration: none;
  margin-bottom: 16px;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 0.88rem;
}

.nav-links-row a {
  text-decoration: none;
}

.nav-links-row a.sub-link {
  color: #64748b;
  text-decoration: underline;
}

.nav-links-row a.main-link {
  color: #4f46e5;
  font-weight: 600;
}

/* --- 共通：診断説明（イントロ）画面用スタイル --- */
#intro-view {
  text-align: center;
}

.intro-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4f46e5;
  background: #eef2ff;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.intro-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 14px;
}

.intro-desc {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.6;
  text-align: left;
  margin-bottom: 24px;
}

.intro-meta-box {
  display: flex;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 24px;
  justify-content: space-around;
}

.intro-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.meta-val {
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 700;
}

.start-btn-primary {
  display: block;
  width: 100%;
  background-color: #4f46e5;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.start-btn-primary:hover {
  background-color: #4338ca;
  transform: translateY(-1px);
}

.start-btn-primary:active {
  transform: translateY(0);
}
