/* ====================================================
   マイエッセイ フィードバック専用CSS
   ==================================================== */

/* --------------------------------------------------
   Alert 共通リセット（Bootstrap上書き）
   -------------------------------------------------- */
.article main .alert {
  border: none !important;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  box-shadow: none;
  margin-bottom: 0;
}

.article main .alert ul {
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.article main .alert ul li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.article main .alert ul li:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------
   Task / フィードバック情報（alert-light）
   -------------------------------------------------- */
.article main .alert-light {
  background: #f2f5f9;
  color: #35393C;
}

/* --------------------------------------------------
   受講生の原文（alert-dark）
   ※ 読みやすい薄いクリーム背景
   -------------------------------------------------- */
.article main .alert-dark {
  background: #f5f2eb;
  color: #2e2e2e;
}

.article main .alert-dark .alert-title {
  color: #7a6f5e;
  background: rgba(122, 111, 94, 0.1);
}

.article main .alert-dark .ja {
  color: #9a8f7e;
}

/* --------------------------------------------------
   スコアリング（alert-info）
   -------------------------------------------------- */
.article main .alert-info {
  background: #f8fbff;
  color: #35393C;
}

/* 最終スコア数値（<li class="blue">） */
.article main .alert-info li.blue {
  font-size: 3.75rem !important;
  font-weight: 800 !important;
  color: #046DB5 !important;
  line-height: 1;
  padding: 0.2rem 0 0;
  display: block;
  letter-spacing: -0.02em;
}

/* グリッドレイアウト：最終スコア（左）＋内訳（右）を一列に */
.article main .alert-info ul {
  display: grid;
  grid-template-columns: minmax(110px, 140px) repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 0.4rem 1rem;
  align-items: start;
}

/* デフォルト上書きリセット */
.article main .alert-info ul li {
  flex: unset;
}

/* 最終スコア ラベル（1番目） */
.article main .alert-info ul li:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

/* 最終スコア 数値（2番目） */
.article main .alert-info ul li:nth-child(2) {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
}

/* 内訳 ラベル（3番目） */
.article main .alert-info ul li:nth-child(3) {
  grid-column: 2 / span 4;
  grid-row: 1;
}

/* 内訳カード 各列（min-width:0 でコンテンツによる列幅の拡張を防ぎ均等幅を保つ） */
.article main .alert-info ul li:nth-child(4) { grid-column: 2; grid-row: 2; min-width: 0; }
.article main .alert-info ul li:nth-child(5) { grid-column: 3; grid-row: 2; min-width: 0; }
.article main .alert-info ul li:nth-child(6) { grid-column: 4; grid-row: 2; min-width: 0; }
.article main .alert-info ul li:nth-child(7) { grid-column: 5; grid-row: 2; min-width: 0; }

/* 解説セクション（li 8以降）：グリッド全幅に戻す */
.article main .alert-info ul li:nth-child(n+8) {
  grid-column: 1 / -1;
}

/* 内訳カード 共通スタイル */
.article main .alert-info ul li:nth-child(4),
.article main .alert-info ul li:nth-child(5),
.article main .alert-info ul li:nth-child(6),
.article main .alert-info ul li:nth-child(7) {
  background: #ffffff;
  border-radius: 8px;
  padding: 0.75rem 0.6rem 0.9rem;
  line-height: 1.4;
  color: #35393C;
  text-align: center;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
}

/* 内訳カード：ラベルバッジ（<span class="score-label">） */
.article main .alert-info ul li:nth-child(n+4) .score-label {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(4, 109, 181, 0.1);
  color: #046DB5;
  padding: 0.18rem 0.55rem;
  border-radius: 50px;
  letter-spacing: 0.04em;
  white-space: normal;
  word-break: break-word;
  text-align: center;
}

/* 内訳カード：スコア数値（<span class="score-num">） */
.article main .alert-info ul li:nth-child(n+4) .score-num {
  display: block;
  font-size: 3.2rem;
  font-weight: 800;
  color: #046DB5;
  line-height: 1;
  letter-spacing: -0.02em;
}

@media (max-width: 860px) {
  .article main .alert-info ul {
    grid-template-columns: minmax(100px, 120px) repeat(2, 1fr);
    grid-template-rows: auto auto auto;
  }
  .article main .alert-info ul li:nth-child(3) {
    grid-column: 2 / span 2;
    grid-row: 1;
  }
  .article main .alert-info ul li:nth-child(4) { grid-column: 2; grid-row: 2; }
  .article main .alert-info ul li:nth-child(5) { grid-column: 3; grid-row: 2; }
  .article main .alert-info ul li:nth-child(6) { grid-column: 2; grid-row: 3; }
  .article main .alert-info ul li:nth-child(7) { grid-column: 3; grid-row: 3; }
}

@media (max-width: 500px) {
  .article main .alert-info ul {
    grid-template-columns: 1fr;
  }
  .article main .alert-info ul li:nth-child(1),
  .article main .alert-info ul li:nth-child(2),
  .article main .alert-info ul li:nth-child(3),
  .article main .alert-info ul li:nth-child(4),
  .article main .alert-info ul li:nth-child(5),
  .article main .alert-info ul li:nth-child(6),
  .article main .alert-info ul li:nth-child(7) {
    grid-column: 1;
    grid-row: auto;
  }
  .article main .alert-info ul li:nth-child(3) {
    grid-column: 1;
  }
}

/* --------------------------------------------------
   モデルアンサー / 総評（alert-primary）
   -------------------------------------------------- */
.article main .alert-primary {
  background: #eef5ff;
  color: #1a3550;
}

.article main .alert-primary .alert-title {
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.08);
}

/* --------------------------------------------------
   Alert 内タイトル行（alert-title）
   -------------------------------------------------- */
.alert-title {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #46A2DA;
  background: rgba(70, 162, 218, 0.1);
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------
   日本語訳テキスト（.ja）
   -------------------------------------------------- */
.ja {
  font-size: 0.85rem;
  color: #8a96a3;
  font-style: italic;
}

/* --------------------------------------------------
   青色テキスト（.blue）
   -------------------------------------------------- */
.blue {
  color: #046DB5;
}

/* --------------------------------------------------
   青枠ボタン（btn-blue-border）
   -------------------------------------------------- */
.btn-blue-border {
  color: #46A2DA;
  border-color: #46A2DA;
}
.btn-blue-border:hover {
  background-color: #46A2DA;
  border-color: #46A2DA;
  color: #fff;
}

/* --------------------------------------------------
   エッセイセクション（フィードバック付き本文）
   -------------------------------------------------- */
.essay-section {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.75rem 2rem;
  font-size: 0.95rem;
  line-height: 1.9;
  color: #35393C;
}

.essay-section > ul {
  padding-left: 0 !important;
  margin-bottom: 0 !important;
}

.essay-section > ul > li {
  margin-bottom: 0 !important;
}

/* --------------------------------------------------
   添削マーク
   -------------------------------------------------- */
.strike {
  color: #bfc2c4;
  text-decoration: line-through;
}

.insert {
  color: #EB4878;
  text-decoration: underline;
}

.comment {
  font-size: 0.78rem;
  color: #c73066;
  font-style: italic;
}

.trcc {
  background-color: #fde8ef;
  border-radius: 2px;
  padding: 0 2px;
}

.lrgr {
  font-weight: 900;
}

/* --------------------------------------------------
   ピンク枠バッジ（TR&CC / LR / GR）
   -------------------------------------------------- */
.pink-border {
  border: 1px solid #EB4878 !important;
  color: #EB4878 !important;
  background-color: #fff0f5 !important;
  font-size: 0.62rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  vertical-align: middle;
  border-radius: 4px !important;
  padding: 0.15rem 0.4rem !important;
}
