/* ========================================
   MUSUBU 適職診断 - style.css
   Mobile-first design
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
  --color-accent: #7EBFBB;
  --color-accent-dark: #5EA8A4;
  --color-line: #06C755;
  --color-line-dark: #05A847;
  --color-bg: #F2F8F7;
  --color-surface: #FFFFFF;
  --color-text: #1F2937;
  --color-text-sub: #6B7280;
  --color-border: #E5E7EB;
  --color-error: #EF4444;
  --color-progress-bg: #E5E7EB;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition: 0.25s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", "Meiryo", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ---------- Screen System ---------- */
.screen {
  display: none;
  min-height: 100vh;
  opacity: 0;
  transition: opacity var(--transition);
}

.screen.active {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

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

/* ---------- LP SECTIONS ---------- */
.lp-section {
  width: 100%;
  padding: 48px 24px;
  box-sizing: border-box;
  text-align: center;
}
.lp-section-alt {
  background: rgba(255,255,255,0.55);
}
.lp-section-a {
  background: #F1F9F9;
}
.lp-section-b {
  background: #E6F4F3;
}
.lp-section-title {
  font-size: 22px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 28px;
  position: relative;
  display: inline-block;
}
.lp-section-title::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #5EA8A4, #A0D4D1);
  border-radius: 2px;
  margin-top: 8px;
}
.lp-section-desc {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent-dark);
  margin-bottom: 20px;
  margin-top: -16px;
}

/* 診断からわかる5つの情報 */
.lp-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.lp-info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 4px 4px 0 #87BFBA;
  border: 1px solid #D6EFED;
}

.lp-info-num {
  width: 44px;
  min-width: 44px;
  font-size: 38px;
  font-weight: 900;
  color: rgba(94, 168, 164, 0.30);
  line-height: 1;
  flex-shrink: 0;
  margin-top: -2px;
  letter-spacing: -0.02em;
}

.lp-info-body {
  flex: 1;
}

.lp-info-title {
  font-size: 15px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 5px;
}

.lp-info-desc {
  font-size: 13px;
  color: #4B5563;
  line-height: 1.8;
}

.lp-info-arrow {
  font-size: 12px;
  color: var(--color-text-sub);
  font-style: italic;
}

/* 活用法 */
.lp-usage-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.lp-usage-item {
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(74, 148, 145, 0.18);
  overflow: hidden;
}

.lp-usage-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #87BFBA;
  padding: 14px 18px;
}

.lp-usage-check {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lp-usage-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

.lp-usage-desc {
  background: #fff;
  padding: 12px 16px 14px;
  text-align: center;
}

.lp-usage-target {
  font-size: 12px;
  color: var(--color-text-sub);
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: 0;
}


.lp-usage-target::after {
  content: "▾";
  display: block;
  text-align: center;
  color: rgba(94, 168, 164, 0.45);
  font-size: 16px;
  margin: 4px 0;
}

.lp-usage-content {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.8;
  margin: 0;
}


/* 診断でわかること */
.lp-cards-3 {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.lp-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px;
  width: 140px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  flex: 1;
  min-width: 100px;
  max-width: 160px;
}
.lp-card-icon { font-size: 28px; margin-bottom: 8px; }
.lp-card-label { font-size: 13px; font-weight: 700; color: var(--color-accent-dark); margin-bottom: 6px; }
.lp-card-desc { font-size: 11px; color: var(--color-text-sub); line-height: 1.6; }

/* 6タイプ */
.lp-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.lp-type-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 12px 20px;
  border: 1.5px solid #B8DDD9;
  box-shadow: 0 4px 12px rgba(74, 148, 145, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.lp-type-name {
  font-size: 16px;
  font-weight: 800;
  color: #374151;
  letter-spacing: 0.03em;
}

/* タイプ別カラー：カード上部ライン */
.lp-type-card:nth-child(1) { border-top: 3px solid #C98A00; }
.lp-type-card:nth-child(2) { border-top: 3px solid #D06080; }
.lp-type-card:nth-child(3) { border-top: 3px solid #4A7EC7; }
.lp-type-card:nth-child(4) { border-top: 3px solid #8B62CC; }
.lp-type-card:nth-child(5) { border-top: 3px solid #3D9E6A; }
.lp-type-card:nth-child(6) { border-top: 3px solid #D4621A; }
.lp-type-divider {
  width: 100%;
  border: none;
  border-top: 1.5px solid #D6EFED;
  margin: 0;
}
.lp-type-icon {
  font-size: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
}
.lp-type-catch {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
  text-align: center;
  line-height: 1.6;
}

/* 診断の流れ */
.lp-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.lp-step {
  background: #fff;
  border-radius: 12px;
  padding: 16px 12px;
  width: 100px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  flex: 1;
  min-width: 90px;
  max-width: 130px;
}
.lp-step-num {
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}
.lp-step-label { font-size: 13px; font-weight: 700; color: var(--color-accent-dark); margin-bottom: 6px; }
.lp-step-desc { font-size: 11px; color: var(--color-text-sub); line-height: 1.6; }
.lp-step-arrow {
  font-size: 18px;
  color: var(--color-accent);
  align-self: center;
  flex-shrink: 0;
}

/* FAQ */
.lp-faq {
  margin-top: 20px;
  text-align: left;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lp-faq-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 3px 10px rgba(74, 148, 145, 0.12);
  border: 1px solid #C8E4E3;
}
.lp-faq-q {
  font-size: 14px;
  font-weight: 700;
  color: #5EA8A4;
  border-left: 3px solid #7EBFBB;
  padding-left: 12px;
  margin-bottom: 8px;
}
.lp-faq-a {
  font-size: 13px;
  color: #374151;
  line-height: 1.8;
  padding-left: 15px;
}
.lp-faq-note {
  font-size: 12px;
  color: #6B7280;
  display: block;
  margin-top: 6px;
}
.faq-diff-lead {
  font-weight: 700;
  margin-bottom: 12px;
}
.faq-diff-block {
  border-top: 1px solid #D6EFED;
  padding-top: 12px;
  margin-top: 12px;
}
.faq-diff-title {
  font-weight: 700;
  color: #5EA8A4;
  margin-bottom: 8px;
}
.faq-diff-desc {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.7;
  padding-left: 1em;
  border-left: 2px solid rgba(94, 168, 164, 0.3);
  margin-top: 4px;
}

/* MUSUBUについて */
.lp-about { background: var(--color-accent-dark); }
.lp-about .lp-section-title { color: #fff; }
.lp-about-text {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  line-height: 1.9;
  max-width: 440px;
  margin: 16px auto 0;
}

/* スクロール追従CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #E5E7EB;
  padding: 12px 24px 20px;
  z-index: 200;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.sticky-cta.visible {
  transform: translateY(0);
}

.sticky-cta .btn-primary {
  background: #F97316;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.4);
}

.sticky-cta .btn-primary:hover {
  background: #EA6C0A;
}

/* 下部CTA */
.lp-bottom-cta {
  width: 100%;
  padding: 48px 24px;
  text-align: center;
  box-sizing: border-box;
  background: #7EBFBB;
}
.lp-bottom-cta-text {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
}
.lp-bottom-cta .btn-primary {
  background: #fff;
  color: #4A9491;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* ---------- START SCREEN ---------- */
#screen-start {
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 24px,
      rgba(255,255,255,0.07) 24px,
      rgba(255,255,255,0.07) 25px
    ),
    linear-gradient(160deg, #F0F8F7 0%, #D9EFEE 60%, #B8E2E0 100%);
  padding-bottom: 90px;
  position: relative;
  overflow: hidden;
}


#btn-start {
  background: #F97316;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.4);
}

#btn-start:hover {
  background: #EA6C0A;
}

#screen-start.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.start-inner {
  padding: 28px 24px 32px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.start-header {
  width: 100%;
  max-width: 100%;
  background: #7EBFBB;
  padding: 12px 20px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  box-sizing: border-box;
  align-self: stretch;
  position: relative;
  z-index: 1;
}

.start-header-logo {
  height: 28px;
  width: auto;
}

.ai-badge {
  display: inline-block;
  background: linear-gradient(135deg, #A0D4D1, #5EA8A4);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 24px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.start-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text);
  margin-bottom: 16px;
}

.start-desc {
  font-size: 15px;
  color: var(--color-text-sub);
  margin-bottom: 28px;
  line-height: 1.9;
}

.start-desc-em {
  font-size: 22px;
  font-weight: 800;
  color: #5EA8A4;
}

.start-features {
  list-style: none;
  margin-bottom: 36px;
  text-align: left;
  display: inline-block;
}

.start-features li {
  font-size: 14px;
  color: var(--color-text);
  padding: 6px 0;
  padding-left: 4px;
  position: relative;
}

.start-features li::first-letter {
  color: var(--color-accent-dark);
  font-weight: 800;
}

.start-cta-note {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-accent-dark);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

/* ---------- BLOCK HEADER / PROGRESS ---------- */
.block-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--color-surface);
  padding: 8px 20px;
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.progress-wrap {
  max-width: 640px;
  margin: 0 auto;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.progress-block {
  font-size: 13px;
  color: var(--color-text-sub);
}

.progress-block strong {
  font-size: 16px;
  color: var(--color-accent);
  font-weight: 700;
}

.progress-range {
  font-size: 12px;
  color: var(--color-text-sub);
}

.progress-track {
  height: 6px;
  background: linear-gradient(90deg, #B8E2E0 0%, #7EBFBB 55%, #4A9491 100%);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: transparent;
  border-radius: 999px;
  transition: width 0.4s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 100%;
  width: 100vw;
  bottom: 0;
  background: var(--color-progress-bg);
}

/* ---------- QUESTIONS CONTAINER ---------- */
.questions-container {
  padding: 4px 16px 20px;
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- QUESTION CARD ---------- */
.question-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.question-card.answered {
  border-color: #B8E2E0;
  background-color: #EFF8F7;
}

.question-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.question-text {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 16px;
}

/* ---------- 5段階スケール ---------- */
.scale-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-sub);
  padding: 0 2px;
}

.scale-options {
  display: flex;
  gap: 6px;
}

.scale-label {
  flex: 1;
  cursor: pointer;
}

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

.scale-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  border-radius: 10px;
  border: 2px solid var(--color-border);
  background-color: var(--color-surface);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text-sub);
  transition: border-color var(--transition), background-color var(--transition), color var(--transition);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.scale-label input[type="radio"]:checked + .scale-btn {
  border-color: var(--color-accent);
  background-color: #EFF8F7;
  color: var(--color-accent);
  font-weight: 700;
}

.scale-label:active .scale-btn {
  background-color: #D9EFEE;
}

/* ---------- RESTART BANNER ---------- */
.restart-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #FEF9EC;
  border-bottom: 1px solid #F3E6B0;
  padding: 10px 16px;
  font-size: 12px;
  color: var(--color-text-sub);
}

.restart-banner-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--color-text-sub);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.restart-banner-btn:hover {
  border-color: var(--color-error);
  color: var(--color-error);
}

/* ---------- BLOCK FOOTER ---------- */
.block-footer {
  padding: 16px 16px 40px;
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  padding: 14px 20px;
  min-height: 52px;
}

.btn:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
  width: 100%;
  border-radius: 999px;
  letter-spacing: 0.03em;
  box-shadow: 0 3px 10px rgba(126, 191, 187, 0.35);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
}

.btn-large {
  font-size: 17px;
  min-height: 56px;
  border-radius: 999px;
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-sub);
  border: 1px solid var(--color-border);
  width: 100%;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
}

.btn-line {
  background-color: var(--color-line);
  color: #FFFFFF;
  width: 100%;
}

.btn-line:hover {
  background-color: var(--color-line-dark);
}

.line-icon {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background-color: rgba(255,255,255,0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ---------- RESULT SCREEN ---------- */
#screen-result {
  background: var(--color-bg);
}

#screen-result.active {
  display: block;
}

/* ---- Hero ---- */
.result-hero {
  padding: 28px 24px 32px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #7EBFBB, #4A9491);
}

.result-hero-inner {
  max-width: 480px;
  margin: 0 auto;
}

.result-badge-white {
  display: inline-block;
  background: #fff;
  color: var(--color-accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 6px 20px;
  border-radius: 999px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.result-emoji {
  font-size: 58px;
  line-height: 1;
  margin-bottom: 6px;
  animation: bounceIn 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes bounceIn {
  0%   { transform: scale(0.2); opacity: 0; }
  60%  { transform: scale(1.15); }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1);   opacity: 1; }
}

.result-title-label {
  font-size: 28px;
  font-weight: 700;
  opacity: 0.95;
  margin-bottom: 4px;
}

.result-type-name {
  font-size: 34px;
  font-weight: 900;
  margin-bottom: 12px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.result-tagline {
  display: block;
  font-size: 15px;
  font-style: italic;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-top: 14px;
  letter-spacing: 0.02em;
}

/* ---- Body ---- */
.result-body {
  padding: 20px 16px 60px;
  max-width: 480px;
  margin: 0 auto;
}

/* ---- AI統合カード ---- */
.ai-card {
  padding: 0;
  overflow: hidden;
}

.ai-main-section {
  padding: 20px 20px 16px;
}

.ai-title-row {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 14px;
}

.ai-title-row .result-card-title {
  align-self: flex-start;
}

.ai-title-row .result-card-title {
  margin-bottom: 0;
  flex: 1;
}

.ai-card-badge {
  display: inline-block;
  background: linear-gradient(135deg, #7EBFBB, #4A9491);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ai-sub-section {
  background: rgba(126, 191, 187, 0.05);
  border-top: 1px solid rgba(126, 191, 187, 0.2);
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-sub-item {
  border-left: 3px solid var(--color-accent);
  padding-left: 14px;
}

.ai-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent-dark);
  margin-bottom: 6px;
}

.type-card {
  background: rgba(126, 191, 187, 0.07);
  border-top-color: rgba(126, 191, 187, 0.4);
}

.result-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  border-top: 2px solid rgba(126, 191, 187, 0.5);
}

.result-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-accent-dark);
  margin-bottom: 16px;
}

#result-name-analysis {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text);
}

/* ---- Axis Map ---- */
.axis-map-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ---- Score Bars ---- */
.score-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.score-item:last-child {
  margin-bottom: 0;
}

.score-label {
  width: 104px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  flex-shrink: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.score-track {
  flex: 1;
  height: 10px;
  background: var(--color-progress-bg);
  border-radius: 999px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 0.8s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.score-value {
  width: 30px;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  flex-shrink: 0;
  color: var(--color-text-sub);
}

.score-item:not(.is-top):not(.is-sub) {
  opacity: 0.45;
}

.score-item.is-sub {
  opacity: 0.75;
  background: rgba(126, 191, 187, 0.05);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-left: -12px;
  margin-right: -12px;
  border: 1px solid rgba(126, 191, 187, 0.15);
}

.score-item.is-top {
  background: rgba(126, 191, 187, 0.1);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-left: -12px;
  margin-right: -12px;
  border: 1px solid rgba(126, 191, 187, 0.3);
}

.score-item.is-top .score-label,
.score-item.is-sub .score-label {
  font-weight: 700;
  color: var(--color-text);
  width: 104px;
}

.score-item.is-top .score-value {
  color: var(--color-accent-dark);
  font-size: 13px;
}

.score-label-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.score-label-name {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.score-rank-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.score-rank-badge.is-main {
  background: var(--color-accent);
  color: #fff;
}

.score-rank-badge.is-sub-badge {
  background: rgba(126, 191, 187, 0.2);
  color: var(--color-accent-dark);
  border: 1px solid rgba(126, 191, 187, 0.4);
}


/* ---- Description ---- */
.result-desc-text {
  font-size: 14px;
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 20px;
}

/* ---- Traits Grid ---- */
.result-traits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.trait-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bg);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.trait-chip-icon {
  font-size: 22px;
  flex-shrink: 0;
}

/* ---- Sub Type ---- */
.result-subtype {
  margin-top: 6px;
  margin-bottom: 16px;
}

.result-subtype-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.result-subtype-prefix {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-accent-dark);
  background: #fff;
  padding: 2px 8px;
  border-radius: 999px;
}

.result-subtype-name {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

/* ---- AI Analysis / Loading ---- */
.analysis-loading {
  padding: 20px 4px;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: stepAppear 0.4s ease forwards;
}

.loading-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.loading-step-dot.is-active {
  background: var(--color-accent);
  animation: dotPulse 1s ease-in-out 3.6s infinite;
}

.loading-step-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-sub);
}

/* ステップが順番に出現したらドットを塗る */
.loading-step:nth-child(1) .loading-step-dot { animation: stepAppear 0.4s ease forwards, dotFill 0.3s ease 0.3s forwards; }
.loading-step:nth-child(2) .loading-step-dot { animation: stepAppear 0.4s ease 1.2s forwards, dotFill 0.3s ease 1.5s forwards; }
.loading-step:nth-child(3) .loading-step-dot { animation: stepAppear 0.4s ease 2.4s forwards, dotFill 0.3s ease 2.7s forwards; }

@keyframes stepAppear {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes dotFill {
  to { background: var(--color-accent); }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%       { transform: scale(0.6); opacity: 0.4; }
}

.loading-spinner {
  display: none;
}

.loading-dot {
  display: none;
}

.loading-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-sub);
  padding: 16px 0 4px;
}

.analysis-text {
  font-size: 14px;
  line-height: 1.9;
  color: var(--color-text);
  white-space: pre-wrap;
  margin-bottom: 4px;
}

.analysis-item {
  background: linear-gradient(135deg, rgba(126,191,187,0.07) 0%, rgba(126,191,187,0.03) 100%);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 12px;
  border-left: 3px solid var(--color-accent);
}

.analysis-item-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-accent-dark);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.analysis-item-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text);
  margin: 0;
}

/* ---- Advisor Memo ---- */
.advisor-memo-box {
  background: var(--color-bg);
  border-radius: 10px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-text);
  white-space: pre-wrap;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", monospace;
  margin-bottom: 12px;
  border: 1px solid var(--color-border);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-sub);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
}

.btn-copy:hover {
  background: var(--color-bg);
}

.btn-copy.copied {
  color: #06C755;
  border-color: #06C755;
}

/* ---- CTA ---- */
.result-cta-wrap {
  text-align: center;
  margin-bottom: 16px;
}

.result-cta-text {
  font-size: 14px;
  color: var(--color-text-sub);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ---- 面談誘導バナー ---- */
.cta-banner {
  background: linear-gradient(135deg, #7EBFBB 0%, #4A9491 100%);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(126, 191, 187, 0.35);
}

.cta-banner-emoji {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 12px;
}

.cta-banner-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.6;
  margin-bottom: 10px;
}

.cta-banner-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 2;
  margin-bottom: 16px;
  display: table;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.cta-banner-sub2 {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: 20px;
}

.cta-banner-note {
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
}

.cta-banner-btn {
  display: inline-block;
  background: #fff;
  color: var(--color-accent-dark);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: opacity var(--transition), transform var(--transition);
}

.cta-banner-btn:active {
  opacity: 0.85;
  transform: scale(0.97);
}

/* ---------- USER INFO SCREEN ---------- */
#screen-userinfo {
  background: linear-gradient(160deg, #7EBFBB 0%, #5EA8A4 50%, #4A9491 100%);
}

#screen-userinfo.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.userinfo-inner {
  padding: 36px 20px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.userinfo-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.7);
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

/* ---- Item loading dots ---- */
.item-loading {
  padding: 14px 4px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.item-loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-border);
  animation: itemDotBounce 1.2s ease-in-out infinite;
}

.item-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.item-loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes itemDotBounce {
  0%, 80%, 100% { transform: translateY(0);   background: var(--color-border); }
  40%            { transform: translateY(-5px); background: var(--color-accent); }
}

.userinfo-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.userinfo-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
  line-height: 1.7;
}

.userinfo-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 8px 32px rgba(74, 148, 145, 0.25);
  text-align: left;
}

.userinfo-form {
  text-align: left;
}

.form-group-row {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
}

.form-group-row .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--color-accent);
}

.form-input.error {
  border-color: var(--color-error);
}

.userinfo-note {
  font-size: 13px;
  color: var(--color-text-sub);
  margin-bottom: 20px;
  line-height: 1.7;
  background: rgba(126, 191, 187, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: left;
  border-left: 3px solid var(--color-accent);
}

/* ---------- VALIDATION ERROR ---------- */
.validation-msg {
  background-color: #FEF2F2;
  color: var(--color-error);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid #FECACA;
  text-align: center;
}

/* ---------- DESKTOP ---------- */
@media (min-width: 640px) {
  .start-title {
    font-size: 30px;
  }

  .question-card {
    padding: 24px 20px;
    margin-bottom: 16px;
  }

  .question-text {
    font-size: 16px;
  }

  .questions-container {
    padding: 24px 24px;
  }

  .block-footer {
    padding: 20px 24px 48px;
  }
}
