/* 学习页样式 · 暖色调，与小小喜欢整体风格一致 */

.study-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
@media (max-width: 820px) { .study-grid { grid-template-columns: 1fr; } }

/* 陪伴学习角：压成紧凑场景，让小人在首屏就能看见 */
.study-companion .scene-wrap {
  position: relative;
  height: 286px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #eadfd2;
}
.study-companion .scene-wrap .lh-room.room { height: 286px; }
.study-companion .scene-wrap .lh-character { width: 172px; height: 222px; }
.study-companion .scene-wrap .ll-climate-ribbon,
.study-companion .scene-wrap .lh-room-caption { display: none; }
.study-companion .scene-wrap .lh-speech { font-size: 12px; max-width: 62%; }
.study-companion .room-hint { margin-top: 10px; }

@media (max-width: 700px) {
  .study-companion .scene-wrap { height: 246px; }
  .study-companion .scene-wrap .lh-room.room { height: 246px; }
  .study-companion .scene-wrap .lh-character { width: 150px; height: 194px; }
}

.study-side { display: flex; flex-direction: column; gap: 16px; }
.study-exam-card {
  background: linear-gradient(160deg, #fff 0%, #fff5f2 100%);
  border: 1px solid #f0d9d0;
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow: 0 6px 18px rgba(200, 150, 140, 0.08);
}
.study-exam-card h3 { margin: 4px 0 12px; font-size: 1.15rem; color: #7a4a44; }
.study-exam-card .eyebrow { margin: 0; }

.exam-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  border-radius: 12px; background: #fff; border: 1px solid #f3e3dc;
}
.exam-row > div:first-child { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.exam-row strong { color: #6b4640; font-size: 0.98rem; }
.exam-row small { color: #a98c84; font-size: 0.78rem; }
.exam-days { font-weight: 700; font-size: 0.92rem; white-space: nowrap; }
.exam-soon .exam-days { color: #d96b5f; }
.exam-near .exam-days { color: #d18b3f; }
.exam-far .exam-days { color: #7aa66f; }
.exam-past { opacity: 0.6; }
.exam-past .exam-days { color: #b0a09a; }
.exam-tools { display: flex; gap: 4px; }
.exam-tools .icon-button { width: 28px; height: 28px; border-radius: 8px; }

.study-stats-mini {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  background: #fff; border: 1px solid #f0e3dc; border-radius: 18px; padding: 14px;
}
.study-stats-mini > div { text-align: center; padding: 10px 4px; background: #fdf7f3; border-radius: 12px; }
.study-stats-mini strong { display: block; font-size: 1.5rem; color: #c2695f; }
.study-stats-mini small { color: #a98c84; font-size: 0.78rem; }

/* 今日待复习 */
.study-due-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 22px; }
.due-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; padding: 14px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(160deg, #fff 0%, #fff7ec 100%);
  border: 1px solid #f0dcc4; box-shadow: 0 4px 12px rgba(200, 160, 120, 0.1);
  transition: transform .15s ease, box-shadow .15s ease;
}
.due-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(200, 160, 120, 0.18); }
.due-num { font-weight: 800; color: #b5793a; font-size: 1.05rem; }
.due-cat { color: #7a5a3a; font-size: 0.85rem; font-weight: 600; }
.due-meta { color: #a98c6a; font-size: 0.75rem; }
.due-go { margin-top: 4px; color: #c2695f; font-weight: 700; font-size: 0.85rem; }

/* 筛选 */
.study-filters { margin-bottom: 22px; }
.study-filters .category-tabs { flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.study-filter-count { margin: 10px 0 0; color: #a98c84; font-size: 0.85rem; }
.study-filter-count b { color: #c2695f; }

/* 错题本 */
.study-mistake-book { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.mistake-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; padding: 11px 14px; border-radius: 12px; cursor: pointer;
  background: #fff; border: 1px solid #f0e3dc; transition: background .15s ease;
}
.mistake-row:hover { background: #fdf7f3; }
.m-num { font-weight: 800; color: #b5793a; min-width: 44px; }
.m-cat { flex: 1; color: #6b4640; font-size: 0.9rem; font-weight: 600; }
.m-diff { color: #a98c84; font-size: 0.78rem; }
.m-status { font-size: 0.78rem; }
.m-go { color: #c2695f; font-weight: 700; font-size: 0.82rem; }
.tag-mastered { background: #e2f0e2; color: #5a8a5a; padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.tag-due { background: #fde2dc; color: #c2594f; padding: 3px 10px; border-radius: 20px; font-weight: 700; }
.tag-scheduled { background: #fdf0d6; color: #b07d2f; padding: 3px 10px; border-radius: 20px; font-weight: 600; }

/* 知识地图 */
.study-knowledge-map { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.km-row { background: #fff; border: 1px solid #f0e3dc; border-radius: 12px; padding: 10px 14px; }
.km-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.km-head span { color: #6b4640; font-weight: 600; font-size: 0.92rem; }
.km-head small { color: #a98c84; font-size: 0.75rem; }
.km-bar { height: 10px; background: #f3ece6; border-radius: 6px; overflow: hidden; }
.km-fill { height: 100%; border-radius: 6px; transition: width .4s ease; }

/* 专注 */
.study-focus-card {
  background: linear-gradient(160deg, #fff 0%, #f3f8ff 100%);
  border: 1px solid #d6e3f0; border-radius: 18px; padding: 20px;
  text-align: center; margin-bottom: 22px;
}
.focus-idle p { color: #6b4640; margin-bottom: 14px; }
.focus-idle p b { color: #5a7fa6; font-size: 1.2rem; }
.focus-running .focus-circle {
  width: 130px; height: 130px; margin: 0 auto 12px; border-radius: 50%;
  background: conic-gradient(#7aa6d6 var(--p, 0%), #e8eef5 0);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: #4a6a8a;
  box-shadow: 0 6px 18px rgba(100, 140, 180, 0.2);
}
.focus-running p { color: #6b4640; margin: 8px 0 14px; }

/* 热力图 */
.study-heatmap { margin-bottom: 22px; }
.hm-grid { display: grid; grid-template-columns: repeat(auto-fill, 14px); gap: 3px; justify-content: center; }
.hm-cell { width: 14px; height: 14px; border-radius: 3px; background: #f0e8e0; }
.hm-0 { background: #f0e8e0; }
.hm-1 { background: #f6d3bd; }
.hm-2 { background: #e8a07a; }
.hm-3 { background: #c2695f; }
.hm-legend { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; color: #a98c84; font-size: 0.75rem; }
.hm-legend .hm-cell { width: 12px; height: 12px; }

/* 练习弹窗 */
.practice-card .practice-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.practice-desc { color: #6b4640; line-height: 1.7; margin: 6px 0 14px; }
.study-code {
  background: #2d2a35; color: #e8e0d4; padding: 16px; border-radius: 12px;
  font-family: ui-monospace, "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: 0.82rem; line-height: 1.7; overflow-x: auto; white-space: pre;
  margin: 0 0 14px; position: relative;
}
.blank-input {
  display: inline-block; min-width: 90px; padding: 2px 8px; margin: 0 2px;
  border-radius: 6px; border: 1px dashed #e8a07a; background: #3a3545;
  color: #ffd9a8; font: inherit; vertical-align: baseline;
}
.blank-input:focus { outline: 2px solid #f0b27a; background: #443d52; }
.blank-graded { display: inline-block; padding: 1px 8px; margin: 0 2px; border-radius: 6px; font: inherit; }
.blank-graded.ok { background: #2f4a35; color: #b6e3b6; border: 1px solid #4a7a52; }
.blank-graded.bad { background: #4a2f33; color: #f0b0a8; border: 1px solid #7a4a4f; text-decoration: line-through; }
.grade-banner { padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 700; text-align: center; }
.grade-ok { background: #e6f3e6; color: #4a7a4a; }
.grade-bad { background: #fdecea; color: #a04a42; }
.answer-list { list-style: none; padding: 0; margin: 0 0 14px; }
.answer-list li { padding: 8px 12px; margin-bottom: 6px; border-radius: 10px; background: #fbf7f0; font-size: 0.85rem; line-height: 1.6; }
.answer-list li.ok { border-left: 4px solid #8fc9a3; }
.answer-list li.bad { border-left: 4px solid #e8a59a; }
.answer-list code { background: #fff; padding: 1px 6px; border-radius: 5px; font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
.answer-list li.ok b { color: #4a7a4a; }
.answer-list li.bad b { color: #a04a42; }
.practice-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
