/* ============================================
   DIAGNOSIS PAGE STYLES v3.0
   16 Gene Types / 10 Questions
   ============================================ */

.diag {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  position: relative;
  overflow-x: hidden;
}
.diag__back {
  position: fixed;
  top: 24px;
  left: 24px;
  font-size: 0.75rem;
  color: var(--text-muted, #A09A94);
  letter-spacing: 0.2em;
  z-index: 10;
  transition: color 0.3s;
}
.diag__back:hover { color: var(--pink, #E8B4B8); }

/* ── Screens ── */
.diag__screen {
  max-width: 640px;
  width: 100%;
  text-align: center;
  animation: fadeInUp 0.6s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Intro ── */
.diag__intro-device {
  margin-bottom: 2rem;
}
.diag__intro-title {
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 400;
  line-height: 2;
  margin-bottom: 2rem;
  color: var(--white, #F5F0EB);
}
.diag__intro-sub {
  font-size: 0.9rem;
  color: var(--text-dim, #C8C4BF);
  line-height: 2.4;
  margin-bottom: 3rem;
}
.diag__intro-sub em {
  color: var(--text-muted, #A09A94);
  font-style: italic;
}

/* ── Question ── */
.diag__q-counter {
  font-family: var(--font-en, 'Cormorant Garamond', serif);
  font-size: 0.75rem;
  color: var(--pink, #E8B4B8);
  letter-spacing: 0.4em;
  margin-bottom: 3rem;
}
.diag__q-text {
  font-size: clamp(1rem, 3vw, 1.3rem);
  line-height: 2;
  margin-bottom: 3rem;
  min-height: 80px;
  color: var(--white, #F5F0EB);
  white-space: pre-line;
}
.diag__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}
.diag__option {
  display: block;
  width: 100%;
  padding: 18px 24px;
  background: transparent;
  border: 1px solid #2a2a2a;
  color: var(--white, #F5F0EB);
  font-family: var(--font-jp, 'Noto Serif JP', serif);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  line-height: 1.8;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s;
}
.diag__option:hover {
  border-color: var(--pink, #E8B4B8);
  background: rgba(232, 180, 184, 0.03);
}
.diag__option:active {
  background: rgba(232, 180, 184, 0.08);
}
.diag__option:disabled {
  cursor: default;
  opacity: 0.6;
}

/* ── Analyzing ── */
.diag__screen--analyzing {
  flex-direction: column;
  align-items: center;
}
.diag__screen--analyzing[hidden] {
  display: none !important;
}
.diag__screen--analyzing:not([hidden]) {
  display: flex;
}
.diag__helix-anim {
  width: 120px;
  height: 120px;
  margin-bottom: 2rem;
}
#diag-helix-canvas {
  width: 100%;
  height: 100%;
}
.diag__analyzing-text {
  font-size: 0.85rem;
  color: var(--text-muted, #A09A94);
  letter-spacing: 0.2em;
}
.diag__dots::after {
  content: '';
  animation: dots 1.5s infinite;
}
@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

/* ── Result ── */
.diag__result-label {
  font-size: 0.8rem;
  color: var(--text-muted, #A09A94);
  letter-spacing: 0.3em;
  margin-bottom: 2rem;
}
.diag__result-card {
  border: 1px solid #2a2a2a;
  padding: 48px 32px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
  text-align: left;
  transition: border-color 0.5s;
}
.diag__result-type {
  font-family: var(--font-en, 'Cormorant Garamond', serif);
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  color: var(--text-muted, #A09A94);
  margin-bottom: 0.5rem;
  text-align: center;
}
.diag__result-name {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 600;
  margin-bottom: 0.3rem;
  text-align: center;
}
.diag__result-en {
  font-family: var(--font-en, 'Cormorant Garamond', serif);
  font-size: 1rem;
  color: var(--text-muted, #A09A94);
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
  font-style: italic;
  text-align: center;
}
.diag__result-bar {
  width: 60px;
  height: 3px;
  margin: 0 auto 2rem;
}
.diag__result-definition {
  font-size: 1rem;
  line-height: 2;
  color: var(--white, #F5F0EB);
  text-align: center;
  margin-bottom: 2rem;
  font-style: italic;
}

/* ── Duality (闇と光) ── */
.diag__duality {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #1a1a1a;
}
@media (max-width: 640px) {
  .diag__duality { grid-template-columns: 1fr; }
}
.diag__duality-side h3 {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}
.diag__duality--dark h3 { color: #ff6b6b; }
.diag__duality--light h3 { color: #E8B4B8; }
.diag__duality-side p {
  font-size: 0.85rem;
  line-height: 2;
  color: var(--text-dim, #C8C4BF);
}

/* ── Philosophy ── */
.diag__philosophy {
  padding-top: 2rem;
  border-top: 1px solid #1a1a1a;
  margin-bottom: 2rem;
}
.diag__philosophy h3 {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--pink, #E8B4B8);
  margin-bottom: 0.8rem;
}
.diag__philosophy p {
  font-size: 0.85rem;
  line-height: 2;
  color: var(--text-dim, #C8C4BF);
}

/* ── Coordinates (三毒・六道・十牛図) ── */
.diag__coordinates {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #1a1a1a;
}
.diag__coord {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 16px 8px;
  border: 1px solid #1a1a1a;
}
.diag__coord-label {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--text-muted, #A09A94);
  margin-bottom: 8px;
}
.diag__coord-value {
  display: block;
  font-size: 0.8rem;
  color: var(--white, #F5F0EB);
  line-height: 1.6;
}

/* ── Seal / Commandment ── */
.diag__result-seal {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #1a1a1a;
}
.diag__seal-label {
  font-size: 0.7rem;
  color: var(--pink, #E8B4B8);
  letter-spacing: 0.2em;
  margin-bottom: 0.8rem;
}
.diag__seal-commandment {
  font-size: 0.9rem;
  color: var(--gold, #B33A3A);
  line-height: 2;
  padding-left: 16px;
  border-left: 2px solid var(--gold, #B33A3A);
  margin: 0 0 0 0;
  font-style: italic;
}
.diag__seal-text {
  font-size: 0.85rem;
  color: var(--text-dim, #C8C4BF);
  line-height: 2;
}

/* ── Share / Actions ── */
.diag__result-actions {
  margin-bottom: 2rem;
  text-align: center;
}
.diag__share-prompt {
  font-size: 0.85rem;
  color: var(--text-muted, #A09A94);
  line-height: 2;
  margin-bottom: 1.5rem;
}
.diag__share-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.diag__share-btn {
  font-size: 0.8rem;
  padding: 12px 24px;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .diag {
    padding: 60px 16px;
    align-items: flex-start;
  }
  .diag__screen {
    max-width: 100%;
    padding: 0;
  }
  .diag__intro-device {
    margin-bottom: 1.2rem;
  }
  .diag__intro-title {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
  }
  .diag__intro-sub {
    font-size: 0.82rem;
    line-height: 2;
    margin-bottom: 2rem;
  }
  .diag__q-text {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 2rem;
  }
  .diag__option {
    padding: 14px 16px;
    font-size: 0.82rem;
  }
  .diag__result-card {
    padding: 28px 16px;
    margin-bottom: 2rem;
  }
  .diag__result-name {
    font-size: 1.3rem;
  }
  .diag__result-definition {
    font-size: 0.9rem;
  }
  .diag__coordinates {
    gap: 8px;
  }
  .diag__coord {
    min-width: 80px;
    padding: 12px 6px;
  }
  .diag__coord-label {
    font-size: 0.55rem;
  }
  .diag__coord-value {
    font-size: 0.72rem;
  }
  .diag__share-btns {
    gap: 8px;
  }
  .diag__share-btn {
    padding: 10px 16px;
    font-size: 0.72rem;
  }
  .diag__result-actions {
    margin-bottom: 1rem;
  }
  .diag__result-actions .btn {
    padding: 12px 20px;
    font-size: 0.75rem;
  }
  .diag__back {
    top: 16px;
    left: 16px;
    font-size: 0.65rem;
  }
  .page-lang {
    top: 16px;
    right: 16px;
  }
  .section-label {
    font-size: 0.7rem;
  }
}
