/*
Theme Name: カナエルキャリア適職診断LP
Theme URI: http://xs1989a0625.xsrv.jp/
Author: カナエルキャリア
Description: 20〜35歳向け・完全無料の適職診断LPテーマ
Version: 1.0.0
*/

@charset "UTF-8";

/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
  --color-main: #2CB7F8;
  --color-accent: #00C853;
  --color-cta: #FF9800;
  --color-cta-hover: #f57c00;
  --color-bg: #F7FAFC;
  --color-text: #2D3748;
  --color-text-sub: #718096;
  --color-white: #FFFFFF;
  --color-error: #E53E3E;
  
  --font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-card: 20px;
  --radius-btn: 50px;
  --shadow-sm: 0 4px 10px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px rgba(44, 183, 248, 0.15);
  --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.12);
  --transition-fast: 0.25s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family) !important;
  background-color: var(--color-bg) !important;
  color: var(--color-text) !important;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #EDF2F7;
  padding: 12px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--color-text);
}

.logo-accent {
  color: var(--color-main);
}

.header-badge {
  background: var(--color-bg);
  color: var(--color-main);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--color-main);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  font-size: 1.125rem;
  font-weight: 700;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--color-main);
  color: var(--color-white);
  box-shadow: 0 8px 20px rgba(44, 183, 248, 0.35);
}

.btn-cta {
  background: linear-gradient(135deg, #FFB74D 0%, #FF9800 100%);
  color: var(--color-white);
  box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4);
  font-size: 1.25rem;
}

.btn-cta:hover {
  background: linear-gradient(135deg, #FFA726 0%, #F57C00 100%);
}

.btn-pulse {
  animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
  0% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(255, 152, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 40px 0 30px;
  text-align: center;
}

.hero-badge-tag {
  display: inline-block;
  background: #E1F5FE;
  color: #0288D1;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 16px;
}

.hero-title .highlight {
  color: var(--color-main);
  font-size: 2.2rem;
  background: linear-gradient(transparent 60%, #B3E5FC 60%);
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-sub);
  margin-bottom: 24px;
}

.features-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--color-white);
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.icon-green { color: var(--color-accent); }

/* ==========================================================================
   Diagnosis Section & Card UI
   ========================================================================== */
.diag-section {
  padding: 20px 0 40px;
}

.card-shadow {
  background: var(--color-white);
  border-radius: var(--radius-card);
  padding: 28px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid #EDF2F7;
}

.progress-container {
  margin-bottom: 28px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-sub);
  margin-bottom: 8px;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background-color: #EDF2F7;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-main), var(--color-accent));
  transition: width 0.4s ease;
  border-radius: 10px;
}

.quiz-step {
  display: none;
}

.quiz-step.active {
  display: block;
  animation: fadeInStep 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.question-title {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.options-grid.grid-2 {
  grid-template-columns: 1fr;
}

@media(min-width: 480px) {
  .options-grid { grid-template-columns: 1fr 1fr; }
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-bg);
  border: 2px solid #E2E8F0;
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
  outline: none;
}

.option-btn:hover, .option-btn:focus {
  border-color: var(--color-main);
  background: #EBF8FF;
}

.option-btn:active {
  transform: scale(0.98);
}

.option-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-white);
  color: var(--color-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.option-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */
.diag-loading-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.diag-loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.loading-content {
  text-align: center;
  padding: 20px;
}

.spinner-ring {
  width: 80px;
  height: 80px;
  border: 6px solid #E2E8F0;
  border-top-color: var(--color-main);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-percentage {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--color-main);
  margin-bottom: 8px;
}

.loading-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.loading-sub {
  font-size: 0.85rem;
  color: var(--color-text-sub);
}

/* ==========================================================================
   Result & Form Section
   ========================================================================== */
.result-form-section {
  padding: 20px 0 40px;
}

.result-card {
  margin-bottom: 24px;
  border-top: 6px solid var(--color-main);
}

.result-header {
  text-align: center;
  margin-bottom: 16px;
}

.result-badge {
  background: #E8F5E9;
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
}

.result-type {
  font-size: 1.3rem;
  margin: 8px 0;
}

.type-highlight {
  color: var(--color-main);
  font-size: 1.5rem;
}

.star-rating {
  color: #FFB300;
  font-weight: 700;
}

.result-matched-label {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tag-cloud {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tag {
  background: #E1F5FE;
  color: #0288D1;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.result-blur-box {
  position: relative;
  background: #F8FAFC;
  padding: 16px;
  border-radius: 12px;
  overflow: hidden;
}

.blur-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
}

.blur-overlay i {
  font-size: 1.5rem;
  color: var(--color-main);
  margin-bottom: 6px;
}

.blur-overlay p {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
}

.dummy-text {
  filter: blur(3px);
  user-select: none;
  font-size: 0.8rem;
  color: #CBD5E0;
}

/* Form Styles */
.form-header {
  text-align: center;
  margin-bottom: 24px;
}

.form-time-badge {
  display: inline-block;
  background: #FFF3E0;
  color: #E65100;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.form-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .col { flex: 1; }

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.badge-req {
  background: #FFEEEF;
  color: var(--color-error);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid #E2E8F0;
  border-radius: 12px;
  outline: none;
  background: var(--color-white);
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--color-main);
}

.form-control.invalid {
  border-color: var(--color-error);
  background-color: #FFF5F5;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.error-msg {
  color: var(--color-error);
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 4px;
  display: none;
}

.form-control.invalid + .error-msg {
  display: block;
}

.privacy-note {
  font-size: 0.75rem;
  color: var(--color-text-sub);
  text-align: center;
  margin-top: 14px;
}

/* ==========================================================================
   Complete Section & TimeTree CTA
   ========================================================================== */
.complete-card {
  text-align: center;
  padding: 36px 20px;
}

.complete-icon {
  font-size: 3.5rem;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.complete-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.complete-desc {
  font-size: 0.95rem;
  color: var(--color-text-sub);
  margin-bottom: 28px;
}

.timetree-card {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  border: 2px dashed var(--color-accent);
  border-radius: 16px;
  padding: 24px 18px;
  position: relative;
  margin-top: 20px;
}

.timetree-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 14px;
  border-radius: 10px;
}

.timetree-title {
  font-size: 1.15rem;
  color: #1B5E20;
  margin-bottom: 8px;
}

.timetree-text {
  font-size: 0.85rem;
  color: #2E7D32;
  margin-bottom: 16px;
}

.btn-timetree {
  background: #2E7D32;
  color: var(--color-white);
  box-shadow: 0 6px 18px rgba(46, 125, 50, 0.3);
}

.btn-timetree:hover {
  background: #1B5E20;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
  padding: 40px 0;
}

.section-title {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.faq-item {
  background: var(--color-white);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  text-align: left;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--color-text);
}

.faq-answer {
  padding: 0 20px 16px;
  font-size: 0.88rem;
  color: var(--color-text-sub);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(45deg);
}

.faq-toggle-icon {
  transition: transform 0.2s ease;
  color: var(--color-main);
}

/* ==========================================================================
   Bottom CTA & Floating CTA & Modal
   ========================================================================== */
.bottom-cta-section {
  padding: 40px 0 60px;
  background: #E1F5FE;
}

.bottom-cta-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.highlight-orange { color: var(--color-cta); }

.floating-cta {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 480px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-cta.visible {
  opacity: 1;
  pointer-events: auto;
}

.floating-btn {
  padding: 14px 20px;
  font-size: 1rem;
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top:0; left:0; width:100%; height:100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  padding: 28px 20px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none;
  font-size: 1.8rem; color: var(--color-text-sub);
  cursor: pointer;
}

.modal-icon { font-size: 2.5rem; margin-bottom: 8px; }

.modal-title { font-size: 1.2rem; margin-bottom: 8px; }

.modal-text { font-size: 0.85rem; color: var(--color-text-sub); margin-bottom: 20px; }

.footer {
  background: #2D3748;
  color: #A0AEC0;
  text-align: center;
  padding: 20px 0 80px;
  font-size: 0.75rem;
}
/* ボタンのタップ領域・最前面化の強化 */
.option-btn {
  position: relative !important;
  z-index: 10 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.option-btn * {
  pointer-events: none !important; /* ボタン内のアイコンや文字がクリックを邪魔しないように設定 */
}

.quiz-step {
  display: none;
}

.quiz-step.active {
  display: block !important;
}
/* JS表示切替との衝突防止用クリア処理 */
.quiz-step {
  display: none;
}

.option-btn {
  cursor: pointer !important;
  pointer-events: auto !important;
  user-select: none !important;
}

.option-btn * {
  pointer-events: none !important;
}