/* ============================================
   ToMo指数診断 - Modern Card Design
   tomo.php / tomo_score.php 専用
   ============================================ */

/* --- 共通アニメーション --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- ヘッダー背景オーバーライド --- */
#pm-theory .heading {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2c78c5 100%);
  position: relative;
}
#pm-theory .heading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(99,179,237,0.15) 0%, transparent 60%);
  pointer-events: none;
}
#pm-theory .heading__ttl {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  letter-spacing: 0.08em;
}

/* ========== 設問ページ ========== */

.theory {
  padding-top: 48px;
  padding-bottom: 60px;
  background: linear-gradient(180deg, #f0f4f8 0%, #fff 100%);
}

.theory .sec__container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.theory .sub-head {
  padding: 32px 40px;
  border-bottom: none;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  animation: fadeInUp 0.5s ease both;
}
@media (max-width: 950px) {
  .theory .sub-head {
    padding: 24px 20px;
    margin: 0 0 16px 0;
    border-radius: 12px;
  }
}

.theory .sub-head p {
  font-size: 15px;
  line-height: 1.9;
  color: #334155;
}

.theory .bibliography {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.theory .bibliography .inner-wrap {
  float: none;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.theory .bibliography h4 {
  background: linear-gradient(135deg, #2c78c5, #1e5fa8);
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 0;
}
.theory .bibliography h4 span {
  font-size: 12px;
  color: #fff;
}
.theory .bibliography p {
  font-size: 14px;
  margin: 0;
}

/* 質問ヘッダー */
.theory .pm-theory__content h3 {
  padding-top: 40px;
  padding-bottom: 32px;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  text-align: center;
  letter-spacing: 0.03em;
}
@media (max-width: 950px) {
  .theory .pm-theory__content h3 {
    font-size: 16px;
    padding: 28px 16px 24px;
  }
}

/* 質問カード */
.theory .pm_diagnosis__box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 36px 40px 32px;
  margin-bottom: 24px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  animation: fadeInUp 0.5s ease both;
}
.theory .pm_diagnosis__box:nth-child(1) { animation-delay: 0.05s; }
.theory .pm_diagnosis__box:nth-child(2) { animation-delay: 0.10s; }
.theory .pm_diagnosis__box:nth-child(3) { animation-delay: 0.15s; }
.theory .pm_diagnosis__box:nth-child(4) { animation-delay: 0.20s; }
.theory .pm_diagnosis__box:nth-child(5) { animation-delay: 0.25s; }
.theory .pm_diagnosis__box:nth-child(6) { animation-delay: 0.30s; }

.theory .pm_diagnosis__box:hover {
  box-shadow: 0 6px 24px rgba(44,120,197,0.12);
  transform: translateY(-2px);
}
@media (max-width: 950px) {
  .theory .pm_diagnosis__box {
    padding: 24px 20px 20px;
    margin-bottom: 16px;
    border-radius: 12px;
  }
}

/* 質問テキスト */
.theory .pm_diagnosis__box h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
  color: #1e293b;
  margin-bottom: 28px;
  padding-left: 0;
}
.theory .pm_diagnosis__box h4 .contents_important {
  color: #2c78c5;
  background: linear-gradient(transparent 60%, rgba(44,120,197,0.12) 60%);
  padding: 0 2px;
}
@media (max-width: 950px) {
  .theory .pm_diagnosis__box h4 {
    font-size: 14px;
    padding: 0;
    margin-bottom: 20px;
  }
}

/* ラジオボタン行 */
.theory .form-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  font-size: 0;
  text-align: center;
}
@media (max-width: 950px) {
  .theory .form-row {
    gap: 4px;
  }
}

/* 個別回答 */
.theory .answer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  flex: 0 0 auto;
  min-width: 56px;
}
@media (max-width: 950px) {
  .theory .answer {
    min-width: 0;
    flex: 1;
  }
}

/* ラジオボタン（非表示） */
.theory .answer input[type=radio] {
  display: none;
}

/* ラジオボタンのラベル（丸ボタン） */
.theory .answer label.button {
  position: relative;
  width: 52px;
  height: 52px;
  margin: 0 auto 8px;
  padding: 0;
  border: 3px solid #cbd5e1;
  border-radius: 50%;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.theory .answer label.button:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(44,120,197,0.08);
}
.theory .answer label.button:before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c78c5, #3b82f6);
  content: "";
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 950px) {
  .theory .answer label.button {
    width: 42px;
    height: 42px;
  }
  .theory .answer label.button:before {
    width: 20px;
    height: 20px;
  }
}

/* 選択済み状態 */
.theory .answer input[type=radio]:checked + label.button {
  border-color: #2c78c5;
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(44,120,197,0.15);
}
.theory .answer input[type=radio]:checked + label.button:before {
  transform: translate(-50%, -50%) scale(1);
}

/* 端ラベルテキスト */
.theory .answer .button-text {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
  min-height: 28px;
  display: flex;
  align-items: center;
}
@media (max-width: 950px) {
  .theory .answer .button-text {
    font-size: 10px;
  }
}

/* 送信ボタン */
.theory .inquirypage {
  max-width: 640px;
  margin: 12px auto 0;
  padding: 0;
  animation: fadeInUp 0.5s ease 0.35s both;
}
.theory .inquirypage .inquiry-submit button,
.theory .inquirypage button[type="submit"] {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 18px 32px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2c78c5 0%, #1d5fa0 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.08em;
  box-shadow: 0 4px 16px rgba(44,120,197,0.3);
  transition: all 0.3s ease;
}
.theory .inquirypage .inquiry-submit button:hover,
.theory .inquirypage button[type="submit"]:hover {
  background: linear-gradient(135deg, #3b8bdb 0%, #2c78c5 100%);
  box-shadow: 0 6px 24px rgba(44,120,197,0.4);
  transform: translateY(-2px);
}


/* ========== 結果ページ ========== */

.theory-fin {
  background: linear-gradient(180deg, #f0f4f8 0%, #fff 100%);
}

.theory-fin .sec__container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* スコア表示 */
.theory-fin .result__content {
  text-align: center;
  margin-bottom: 48px;
  animation: fadeInUp 0.5s ease both;
}
.theory-fin .result__content > p {
  font-size: 16px;
  color: #475569;
  line-height: 1.9;
}
@media (max-width: 640px) {
  .theory-fin .result__content > p {
    font-size: 13px;
  }
}

.theory-fin .result__content h3 {
  font-size: 48px;
  font-weight: 800;
  padding: 16px 0;
  letter-spacing: 0.02em;
}
.theory-fin .result__content h3 .contents_important {
  background: linear-gradient(135deg, #2c78c5, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
@media (max-width: 640px) {
  .theory-fin .result__content h3 {
    font-size: 32px;
  }
}

/* スコアテーブル */
.theory-fin .result__content .score-box {
  max-width: 600px;
  width: 100%;
  margin: 24px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 8px;
  overflow: hidden;
}
.theory-fin .result__content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 15px;
  overflow: hidden;
  border-radius: 12px;
}
@media (max-width: 640px) {
  .theory-fin .result__content table {
    border: none;
    font-size: 13px;
  }
}

.theory-fin .result__content table thead th {
  padding: 14px 16px;
  background: linear-gradient(135deg, #1e3a5f, #2c78c5);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
}
.theory-fin .result__content table thead th:first-child {
  border-radius: 8px 0 0 0;
}
.theory-fin .result__content table thead th:last-child {
  border-radius: 0 8px 0 0;
}

.theory-fin .result__content table th,
.theory-fin .result__content table td {
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
}
.theory-fin .result__content table tbody th {
  background: #f8fafc;
  color: #334155;
  font-weight: 600;
  font-size: 14px;
}
.theory-fin .result__content table tbody td {
  background: #fff;
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
}
.theory-fin .result__content table tbody tr:last-child th,
.theory-fin .result__content table tbody tr:last-child td {
  border-bottom: none;
}
.theory-fin .result__content table td span {
  font-size: 14px;
  font-weight: 400;
  color: #64748b;
}

/* シェアボックス */
.theory-fin .result__content .share-box {
  padding-top: 36px;
}
.theory-fin .result__content .share-box h4 {
  font-size: 15px;
  color: #475569;
  margin-bottom: 16px;
}
.theory-fin .result__content .share-box h4:before,
.theory-fin .result__content .share-box h4:after {
  background: #94a3b8;
}

/* 回答詳細セクション */
.theory-fin .commentary__content {
  max-width: 860px;
  margin: 0 auto 60px;
  animation: fadeInUp 0.5s ease 0.15s both;
}
.theory-fin .commentary__content .content__inner {
  max-width: 100%;
}

.theory-fin .commentary__content .detail-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 0 36px 36px;
  margin-bottom: 32px;
  border-bottom: none;
}
@media (max-width: 640px) {
  .theory-fin .commentary__content .detail-box {
    padding: 0 20px 24px;
    border-radius: 12px;
  }
}

.theory-fin .commentary__content .detail-box .inner {
  padding-top: 32px;
}
.theory-fin .commentary__content .detail-box h4 {
  font-size: 16px;
  color: #1e293b;
  margin-bottom: 32px;
  padding-top: 28px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
}

/* 回答の丸表示 */
.theory-fin .commentary__content .detail-box .a .box {
  background: #f1f5f9;
  border-radius: 8px;
  height: 38px;
}
.theory-fin .commentary__content .detail-box .a .box:before {
  width: 22px;
  height: 22px;
  background: #e2e8f0;
  border: 2px solid #cbd5e1;
}
.theory-fin .commentary__content .detail-box .a .box:after {
  display: none;
}
.theory-fin .commentary__content .detail-box .a .selected .box {
  background: #eff6ff;
}
.theory-fin .commentary__content .detail-box .a .selected .box:before {
  background: linear-gradient(135deg, #2c78c5, #3b82f6);
  border-color: #2c78c5;
}

/* Q&A テキスト */
.theory-fin .commentary__content .detail-box .q p {
  font-size: 14px;
  color: #334155;
  line-height: 1.8;
}
.theory-fin .commentary__content .detail-box .q p .contents_important {
  color: #2c78c5;
}

/* 参考文献カード */
.theory-fin .sub-head {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 28px 36px;
  margin: 0 auto 40px;
  max-width: 860px;
}
.theory-fin .bibliography {
  padding-top: 0;
}
.theory-fin .bibliography .inner-wrap {
  float: none;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.theory-fin .bibliography h4 {
  background: linear-gradient(135deg, #2c78c5, #1e5fa8);
  border-radius: 6px;
}

/* お問い合わせリンク */
.theory-fin .inquiry__content {
  max-width: 860px;
}
.theory-fin .inquiry__content h3 {
  color: #1e3a5f;
  border-color: #1e3a5f;
}
