/* ===========================
   Theory Page (theory.html)
   消化器-甲状腺軸の理論ページ
   =========================== */

/* ── Hero ── */
.theory-hero {
  padding-top: calc(var(--nav-height) + var(--space-xl));
  padding-bottom: var(--space-2xl);
  background-color: var(--bg-secondary);
}

.theory-hero__title {
  font-family: var(--font-mincho);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-top: var(--space-md);
}

.theory-hero__lead {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-top: var(--space-lg);
  max-width: var(--text-max);
}

/* ── Sections ── */
.theory-section {
  padding-block: var(--section-pad);
}

.theory-section + .theory-section:not(.theory-section--alt) {
  border-top: 1px solid var(--border);
}

.theory-section--alt {
  background-color: var(--bg-secondary);
}

/* ── Text Body ── */
.theory-body {
  max-width: var(--text-max);
  margin-inline: auto;
}

.theory-body p {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: var(--lh-body);
}

.theory-body p + p {
  margin-top: 1.3em;
}

.theory-body strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Insight Callout ── */
.theory-insight {
  max-width: var(--text-max);
  margin-inline: auto;
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background-color: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

.theory-insight__text {
  font-family: var(--font-mincho);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--text-primary);
}

.theory-insight__text strong {
  color: var(--cta);
  font-weight: 600;
}


/* ── Flow Diagram (消化器-甲状腺軸) ── */
.theory-flow {
  max-width: 560px;
  margin: var(--space-xl) auto;
}

.theory-flow__step {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-lg);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) ease;
}

.theory-flow__step:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--accent-subtle);
}

.theory-flow__step--result {
  border-color: var(--accent-subtle);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-faint) 100%);
}

.theory-flow__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.theory-flow__title {
  font-family: var(--font-mincho);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5em;
  letter-spacing: 0.03em;
}

.theory-flow__text {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.85;
}

.theory-flow__text strong {
  color: var(--text-primary);
  font-weight: 500;
}

.theory-flow__arrow {
  display: flex;
  justify-content: center;
  padding: var(--space-sm) 0;
  color: var(--accent-subtle);
}


/* ── Compare Cards (エネルギー比較) ── */
.theory-compare {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xl);
}

@media (min-width: 640px) {
  .theory-compare {
    grid-template-columns: 1fr 1fr;
  }
}

.theory-compare__card {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.theory-compare__card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.theory-compare__card--good {
  background-color: var(--bg-card);
  border-color: var(--cta-light);
}

.theory-compare__card--good .theory-compare__title {
  color: var(--cta);
}

.theory-compare__card--poor {
  background-color: var(--bg-card);
  border-color: var(--accent-subtle);
}

.theory-compare__card--poor .theory-compare__title {
  color: var(--accent);
}

.theory-compare__title {
  font-family: var(--font-mincho);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
}

.theory-compare__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.theory-compare__list li {
  position: relative;
  padding-left: 1.5em;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.85;
}

.theory-compare__list li + li {
  margin-top: 0.5em;
}

.theory-compare__card--good .theory-compare__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--cta-light);
}

.theory-compare__card--poor .theory-compare__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-subtle);
}


/* ── Nutrition Cards ── */
.theory-nutrition-cards {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xl);
}

@media (min-width: 640px) {
  .theory-nutrition-cards {
    grid-template-columns: 1fr 1fr;
  }
}

.theory-nutrition-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-card);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}

.theory-nutrition-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.theory-nutrition-card__header {
  padding: var(--space-sm) var(--space-md);
}

.theory-nutrition-card__header--caution {
  background-color: #F5EDE0;
  border-bottom: 1px solid var(--accent-subtle);
}

.theory-nutrition-card__header--positive {
  background-color: #E8F0EB;
  border-bottom: 1px solid var(--cta-light);
}

.theory-nutrition-card__badge {
  display: inline-block;
  font-family: var(--font-gothic);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 0.15em 0.75em;
  border-radius: 2px;
  margin-bottom: 0.5em;
}

.theory-nutrition-card__header--caution .theory-nutrition-card__badge {
  background-color: var(--accent);
  color: #fff;
}

.theory-nutrition-card__header--positive .theory-nutrition-card__badge {
  background-color: var(--cta);
  color: #fff;
}

.theory-nutrition-card__header h3 {
  font-family: var(--font-mincho);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.03em;
}

.theory-nutrition-card__body {
  padding: var(--space-md);
}

.theory-nutrition-card__body p {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.85;
}

.theory-nutrition-card__body p + p {
  margin-top: 1em;
}

.theory-nutrition-card__note {
  font-size: 0.8125rem !important;
  color: var(--text-muted) !important;
  font-style: italic;
}


/* ── Bridge (東洋医学 ↔ 現代医学) ── */
.theory-bridge {
  display: grid;
  gap: var(--space-md);
  align-items: center;
  margin-block: var(--space-xl);
  padding: var(--space-lg);
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

@media (min-width: 768px) {
  .theory-bridge {
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-lg);
    padding: var(--space-xl);
  }
}

.theory-bridge__side {
  padding: var(--space-sm);
}

.theory-bridge__title {
  font-family: var(--font-mincho);
  font-size: clamp(0.9375rem, 1.3vw, 1.0625rem);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.theory-bridge__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.theory-bridge__list li {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.85;
  padding-left: 1em;
  position: relative;
}

.theory-bridge__list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent-subtle);
  font-weight: 700;
}

.theory-bridge__list li + li {
  margin-top: 0.5em;
}

.theory-bridge__list li strong {
  color: var(--text-primary);
  font-weight: 500;
}

.theory-bridge__connector {
  display: flex;
  justify-content: center;
  align-items: center;
}

.theory-bridge__connector span {
  font-family: var(--font-latin);
  font-size: 2rem;
  color: var(--accent-subtle);
  font-weight: 300;
}


/* ── Acupuncture Grid ── */
.theory-acupuncture-grid {
  display: grid;
  gap: var(--space-lg);
  margin-block: var(--space-xl);
}

@media (min-width: 640px) {
  .theory-acupuncture-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.theory-acupoint {
  padding: var(--space-lg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) ease;
}

.theory-acupoint:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--accent-subtle);
}

.theory-acupoint__num {
  font-family: var(--font-latin);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent-subtle);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: var(--space-xs);
}

.theory-acupoint__title {
  font-family: var(--font-mincho);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
}

.theory-acupoint__text {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.85;
}


/* ── Summary Section ── */
.theory-section--summary {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding-block: var(--section-pad);
}

.theory-summary {
  max-width: var(--text-max);
  margin-inline: auto;
  text-align: center;
}

.theory-summary__title {
  font-family: var(--font-mincho);
  font-size: var(--fs-h2);
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.06em;
}

.theory-section--summary .divider--center {
  background-color: var(--accent-subtle);
}

.theory-summary__steps {
  list-style: none;
  padding: 0;
  margin: var(--space-xl) 0;
  text-align: left;
}

.theory-summary__steps li {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md) 0;
}

.theory-summary__steps li + li {
  border-top: 1px solid var(--border-dark);
}

.theory-summary__step-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent-subtle);
  border-radius: 50%;
  font-family: var(--font-latin);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-subtle);
}

.theory-summary__steps li strong {
  display: block;
  font-family: var(--font-mincho);
  font-size: clamp(0.9375rem, 1.3vw, 1.0625rem);
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.04em;
  margin-bottom: 0.3em;
}

.theory-summary__steps li p {
  font-size: var(--fs-small);
  color: var(--text-light-secondary);
  line-height: 1.75;
}

.theory-summary__note {
  font-size: var(--fs-small);
  color: var(--text-light-secondary);
  line-height: var(--lh-body);
  text-align: center;
  margin-top: var(--space-lg);
}

.theory-summary__note strong {
  color: var(--text-light);
  font-weight: 500;
}


/* ── CTA Section ── */
.theory-cta-section {
  padding-block: var(--space-2xl);
  text-align: center;
}

.theory-cta-content {
  max-width: var(--text-max);
  margin-inline: auto;
}

.theory-cta-content__lead {
  font-family: var(--font-mincho);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--text-primary);
  line-height: var(--lh-heading);
  letter-spacing: 0.04em;
}

.theory-cta-content__sub {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: var(--lh-body);
  margin-top: var(--space-md);
}


/* ── SP-only break ── */
.sp-only {
  display: none;
}

@media (max-width: 639px) {
  .sp-only {
    display: inline;
  }

  .theory-flow__step {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .theory-bridge__connector span {
    display: block;
    text-align: center;
    font-size: 1.5rem;
  }
}
