/* =============================================
   ミライコンパス - 勉強法・メンタルページ CSS
   ============================================= */

/* ヒーロー */
.mental-hero {
  background: var(--navy);
  border-radius: 20px;
  padding: 40px 40px 36px;
  margin-bottom: 32px;
}
.mental-hero .eyebrow {
  display: inline-block;
  background: var(--secondary); color: #04342C;
  font-size: 0.72rem; font-weight: 900; letter-spacing: 2px;
  padding: 4px 14px; border-radius: 999px;
  margin-bottom: 14px;
}
.mental-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 900; color: white; line-height: 1.4;
  margin-bottom: 10px;
}
.mental-hero p { font-size: 0.9rem; color: rgba(255,255,255,0.5); line-height: 1.8; }

/* ページ内タブナビ */
.mental-page-nav {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 40px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0;
}
.mpn-btn {
  padding: 10px 20px; border-radius: 999px 999px 0 0;
  border: none; background: none;
  font-size: 0.88rem; font-weight: 900;
  color: #aaa; cursor: pointer;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.mpn-btn:hover { color: var(--navy); }
.mpn-btn.on { color: var(--navy); border-bottom-color: var(--primary); }

/* セクション */
.mental-section { display: none; }
.mental-section.on { display: block; animation: fadeInUp 0.4s ease both; }

/* ===== ① メンタル攻略 ===== */
.pain-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 32px;
}
.pain-card {
  background: white; border-radius: 16px;
  border: 2px solid #f0f0f0; padding: 20px 16px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.pain-dot { width: 12px; height: 12px; border-radius: 50%; margin: 0 auto 10px; }
.pain-title { font-size: 0.88rem; font-weight: 900; color: var(--navy); margin-bottom: 4px; }
.pain-sub   { font-size: 0.76rem; color: #888; line-height: 1.5; }

.method-list { display: grid; gap: 12px; margin-bottom: 32px; }
.method-card {
  background: white; border-radius: 16px;
  border: 2px solid #f0f0f0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  overflow: hidden;
}
.method-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 20px; cursor: pointer;
}
.method-num {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 900; flex-shrink: 0;
}
.method-hbody { flex: 1; }
.method-title { font-size: 0.95rem; font-weight: 900; color: var(--navy); margin-bottom: 4px; }
.method-desc  { font-size: 0.82rem; color: #666; line-height: 1.5; }
.method-tip {
  display: inline-block; margin-top: 8px;
  font-size: 0.72rem; font-weight: 900;
  padding: 3px 10px; border-radius: 999px;
}
.method-arr {
  font-size: 0.72rem; color: #ccc;
  align-self: center; flex-shrink: 0;
  transition: transform 0.2s;
}
.method-arr.open { transform: rotate(180deg); }
.method-detail {
  display: none;
  border-top: 1px solid #f5f5f5;
  padding: 14px 20px 18px 70px;
}
.method-detail.open { display: block; }
.method-detail p { font-size: 0.88rem; color: #555; line-height: 1.9; }

.truth-grid { display: grid; gap: 10px; margin-bottom: 32px; }
.truth-card {
  background: #f9f9f9; border-radius: 12px;
  padding: 14px 16px;
  display: flex; gap: 12px; align-items: flex-start;
}
.truth-bar { width: 3px; border-radius: 999px; flex-shrink: 0; align-self: stretch; }
.truth-card p { font-size: 0.88rem; color: #444; line-height: 1.7; }

/* タイプタブ */
.type-tabs-wrap { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.type-tab-btn {
  padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid #e8e8e8; background: white;
  font-size: 0.78rem; font-weight: 900; color: #888;
  cursor: pointer; font-family: 'Zen Kaku Gothic New', sans-serif;
  transition: all 0.15s; white-space: nowrap;
}
.type-tab-btn.on { color: white; border-color: transparent; }
.type-panel { display: none; }
.type-panel.on { display: block; }

.type-card-wrap {
  background: white; border-radius: 16px;
  border: 2px solid #f0f0f0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  overflow: hidden;
  margin-bottom: 4px;
}
.tc-head {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #f5f5f5;
}
.tc-illust {
  width: 68px; height: 68px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tc-num  { font-size: 0.7rem; font-weight: 900; letter-spacing: 2px; margin-bottom: 4px; }
.tc-name { font-size: 1.05rem; font-weight: 900; color: var(--navy); margin-bottom: 6px; }
.tc-chip {
  display: inline-block; font-size: 0.72rem; font-weight: 900;
  padding: 2px 10px; border-radius: 999px; margin-right: 4px;
}
.tc-body { display: grid; grid-template-columns: repeat(3, 1fr); }
.tc-col {
  padding: 16px 18px;
  border-right: 1px solid #f5f5f5;
}
.tc-col:last-child { border-right: none; }
.tc-col-label {
  font-size: 0.68rem; font-weight: 900; letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.tc-fact { display: flex; gap: 7px; align-items: flex-start; margin-bottom: 6px; }
.tc-dot  { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.tc-fact p { font-size: 0.8rem; color: #555; line-height: 1.6; }
.arrow-item { margin-bottom: 10px; }
.arrow-from { font-size: 0.72rem; color: #bbb; text-decoration: line-through; margin-bottom: 2px; }
.arrow-arr  { font-size: 0.68rem; color: #ccc; }
.arrow-to   { font-size: 0.82rem; font-weight: 900; color: var(--navy); }

/* ===== ② 科目別 ===== */
.subj-tabs-wrap { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.subj-tab-btn {
  padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid #e8e8e8; background: white;
  font-size: 0.88rem; font-weight: 900; color: #888;
  cursor: pointer; font-family: 'Zen Kaku Gothic New', sans-serif;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.subj-tab-btn.on { color: white; border-color: transparent; }
.subj-badge {
  font-size: 0.68rem; padding: 1px 8px; border-radius: 999px; font-weight: 900;
}
.subj-panel { display: none; }
.subj-panel.on { display: block; }

.sp-head {
  border-radius: 16px; padding: 20px 24px;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 18px;
}
.sp-illust { width: 64px; height: 64px; flex-shrink: 0; }
.sp-label  { font-size: 0.7rem; font-weight: 900; letter-spacing: 1.5px; margin-bottom: 4px; }
.sp-name   { font-size: 1.1rem; font-weight: 900; color: var(--navy); margin-bottom: 4px; }
.sp-desc   { font-size: 0.82rem; line-height: 1.6; }

.step-list { display: grid; gap: 10px; margin-bottom: 16px; }
.step-item {
  background: white; border-radius: 14px;
  border: 2px solid #f0f0f0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  overflow: hidden;
}
.step-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; cursor: pointer;
}
.step-num-badge {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 900; flex-shrink: 0;
}
.step-head-body { flex: 1; }
.step-h-title { font-size: 0.92rem; font-weight: 900; color: var(--navy); margin-bottom: 3px; }
.step-h-short { font-size: 0.78rem; color: #888; line-height: 1.5; }
.step-arr2 { font-size: 0.72rem; color: #ccc; align-self: center; flex-shrink: 0; transition: transform 0.2s; }
.step-arr2.open { transform: rotate(180deg); }
.step-body2 {
  display: none;
  border-top: 1px solid #f5f5f5;
  padding: 14px 18px 16px 58px;
}
.step-body2.open { display: block; }
.do-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.do-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.do-row p { font-size: 0.84rem; color: #555; line-height: 1.7; }

.ng-box {
  background: rgba(226,75,74,0.05);
  border: 1px solid rgba(226,75,74,0.2);
  border-radius: 8px; padding: 8px 12px;
  margin-top: 8px; display: flex; gap: 8px;
}
.ng-label { font-size: 0.68rem; font-weight: 900; color: #A32D2D; flex-shrink: 0; padding-top: 1px; }
.ng-box p  { font-size: 0.8rem; color: #A32D2D; line-height: 1.6; }

.tpl-box {
  background: #f9f9f9; border-radius: 10px;
  padding: 10px 14px; margin-top: 10px;
}
.tpl-label { font-size: 0.68rem; font-weight: 900; letter-spacing: 1px; color: #aaa; margin-bottom: 8px; }
.tpl-row   { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 4px; }
.tpl-n {
  width: 18px; height: 18px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 900; flex-shrink: 0;
}
.tpl-row p { font-size: 0.8rem; color: #555; line-height: 1.5; }

.conc-bar {
  border-left: 4px solid; border-radius: 0 12px 12px 0;
  padding: 12px 16px; margin-bottom: 24px;
}
.conc-bar p { font-size: 0.9rem; font-weight: 900; line-height: 1.5; }

/* ===== 共通ルール・優先順位 ===== */
.common-card {
  background: white; border-radius: 16px;
  border: 2px solid #f0f0f0; overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.common-head {
  background: var(--navy); padding: 14px 20px;
}
.common-head h3 { font-size: 0.95rem; font-weight: 900; color: white; }
.common-cols { display: grid; grid-template-columns: repeat(3, 1fr); }
.common-col {
  padding: 16px 18px;
  border-right: 1px solid #f5f5f5;
}
.common-col:last-child { border-right: none; }
.common-col h4 { font-size: 0.72rem; font-weight: 900; color: #aaa; letter-spacing: 1px; margin-bottom: 10px; }
.common-col p  { font-size: 0.84rem; color: #444; line-height: 1.7; }

.priority-card {
  background: white; border-radius: 16px;
  border: 2px solid #f0f0f0; overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.priority-head { background: var(--primary); padding: 14px 20px; }
.priority-head h3 { font-size: 0.95rem; font-weight: 900; color: white; }
.priority-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
}
.priority-row:last-child { border-bottom: none; }
.priority-rank {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 900; color: white; flex-shrink: 0;
}
.priority-row h4 { font-size: 0.9rem; font-weight: 900; color: var(--navy); margin-bottom: 2px; }
.priority-row p  { font-size: 0.78rem; color: #666; }

.final-box {
  background: rgba(255,107,53,0.05);
  border: 1.5px solid rgba(255,107,53,0.25);
  border-radius: 14px; padding: 18px 20px;
  display: flex; gap: 14px;
}
.final-bar { width: 3px; border-radius: 999px; background: var(--primary); flex-shrink: 0; align-self: stretch; }
.final-box h4 { font-size: 0.92rem; font-weight: 900; color: var(--navy); margin-bottom: 6px; }
.final-box p  { font-size: 0.84rem; color: #555; line-height: 1.7; }

/* レスポンシブ */
@media (max-width: 768px) {
  .mental-hero { padding: 28px 20px; }
  .pain-grid { grid-template-columns: 1fr; }
  .tc-body { grid-template-columns: 1fr; }
  .tc-col { border-right: none; border-bottom: 1px solid #f5f5f5; }
  .tc-col:last-child { border-bottom: none; }
  .common-cols { grid-template-columns: 1fr; }
  .common-col { border-right: none; border-bottom: 1px solid #f5f5f5; }
  .common-col:last-child { border-bottom: none; }
  .sp-head { flex-direction: column; align-items: flex-start; }
  .step-body2 { padding-left: 18px; }
  .method-detail { padding-left: 20px; }
}
