/**
 * record.css — 내신 기록 페이지 전용 스타일
 * (apply.css가 :root 변수 + 공통 클래스(.page-wrap/.back/h1/.page-sub) 제공)
 */

.page-wrap { max-width: 1180px !important; }

/* 요약 */
.rc-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: #fff; border: 1px solid #f0e0e6; border-radius: 18px;
  padding: 16px; margin-bottom: 22px;
}
@media (max-width: 760px) { .rc-summary { grid-template-columns: repeat(2, 1fr); } }
.rc-stat { text-align: center; }
.rc-stat .lbl { font-size: 11px; font-weight: 800; color: #999; margin-bottom: 4px; letter-spacing: 0.3px; }
.rc-stat .num { font-size: 26px; font-weight: 900; color: var(--main, #ff8fa3); line-height: 1.1; }
.rc-stat .sub { font-size: 10px; color: #aaa; font-weight: 700; margin-top: 2px; }

/* 학년 가중치 preset 셀렉터 */
.rc-preset {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 10px 0 14px; padding: 10px 14px;
  background: #fff; border: 1px solid #f0e0e6; border-radius: 14px;
}
.rc-preset-label {
  font-size: 11px; font-weight: 900; color: var(--main, #ff8fa3); letter-spacing: 0.3px;
}
.rc-preset-select {
  flex: 1; min-width: 220px; padding: 6px 10px;
  border: 1.5px solid #f0e0e6; border-radius: 10px;
  background: #fafafa; font-size: 12px; font-weight: 700; color: #333;
  outline: none; cursor: pointer;
}
.rc-preset-hint { font-size: 10px; color: #999; font-weight: 700; }

/* 카드 그리드 — 접힌 상태는 3열, 펼친 카드는 풀폭 */
.rc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
@media (max-width: 980px) { .rc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rc-grid { grid-template-columns: 1fr; } }
.rc-card {
  background: #fff; border: 2px solid #f0e0e6; border-radius: 18px;
  padding: 18px; transition: all .25s;
  cursor: pointer; user-select: none;
}
.rc-card.filled { border-color: var(--main, #ff8fa3); }
.rc-card.expanded {
  grid-column: 1 / -1;
  cursor: default;
  background: linear-gradient(180deg, #fff7fa 0%, #fff 80px);
}
.rc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rc-head-l { display: flex; align-items: baseline; gap: 8px; }
.rc-title { font-size: 14px; font-weight: 900; color: #333; }
.rc-grade-pill {
  font-size: 9px; font-weight: 900; padding: 2px 8px; border-radius: 999px;
  background: #f4e7eb; color: #999;
}
.rc-card.filled .rc-grade-pill { background: var(--main-light, #FFE5EB); color: var(--main, #ff8fa3); }
.rc-avg {
  font-size: 24px; font-weight: 900; color: var(--main, #ff8fa3); line-height: 1;
}
.rc-avg.unfilled { color: #ccc; font-size: 18px; }

/* 펼침 영역 */
.rc-detail { display: none; margin-top: 16px; }
.rc-card.expanded .rc-detail { display: block; }
.rc-tip {
  font-size: 11px; color: #888; margin-bottom: 12px; line-height: 1.6;
}
.rc-tip b { color: var(--main, #ff8fa3); }

/* 모드 토글 */
.rc-mode-toggle {
  display: flex; justify-content: flex-end; margin-bottom: 8px;
}
.rc-mode-toggle-inner {
  display: inline-flex; background: #f4e7eb; border-radius: 10px; padding: 3px;
  font-size: 10px; font-weight: 900;
}
.rc-mode-btn {
  padding: 6px 12px; border: none; border-radius: 8px; cursor: pointer;
  background: transparent; color: #888;
}
.rc-mode-btn.active { background: var(--main, #ff8fa3); color: #fff; }

/* 과목 행 */
.rc-subj-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.rc-subj-tbl thead th {
  font-size: 9px; font-weight: 900; color: #aaa; padding: 6px 4px;
  text-align: center; letter-spacing: 0.3px; border-bottom: 1px solid #f0e0e6;
}
.rc-subj-tbl thead th.col-name { text-align: left; }
.rc-subj-tbl thead .group-h {
  font-size: 10px; color: var(--main, #ff8fa3); font-weight: 900;
  padding: 4px 0; border-bottom: 1px dashed #f0d0d8;
}
.rc-subj-row td {
  padding: 6px 3px; border-bottom: 1px solid #f7eef1; vertical-align: middle;
}
.rc-subj-row .col-name-cell { font-weight: 800; color: #444; }
.rc-subj-row input {
  width: 100%; padding: 5px 6px; border-radius: 8px;
  border: 1.5px solid #f0e0e6; background: #fafafa;
  font-size: 12px; font-weight: 700; color: #333; outline: none;
  text-align: center;
}
.rc-subj-row input:focus { border-color: var(--main, #ff8fa3); background: #fff; }
.rc-subj-row .col-final {
  font-weight: 900; font-size: 14px; color: var(--main, #ff8fa3); text-align: center;
}
.rc-subj-row .col-final.unfilled { color: #ccc; font-size: 12px; }
.rc-subj-row .col-del button {
  background: none; border: none; color: #ccc; font-size: 14px; cursor: pointer;
}
.rc-subj-row .col-del button:hover { color: #ef4444; }
.rc-subj-name-input {
  border: 1px dashed #f0e0e6 !important; background: transparent !important;
  text-align: left !important; padding-left: 8px !important;
}

/* 과목 추가 / 푸터 */
.rc-add-row {
  display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap;
}
.rc-add-row button {
  padding: 6px 12px; border: 1.5px dashed #f0d0d8; background: #fff;
  color: var(--main, #ff8fa3); font-size: 11px; font-weight: 900;
  border-radius: 999px; cursor: pointer; transition: all .2s;
}
.rc-add-row button:hover { background: var(--main-light, #FFE5EB); border-style: solid; }
.rc-detail-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0e0e6;
  font-size: 12px; color: #666;
}
.rc-detail-foot .lbl { font-weight: 800; }
.rc-detail-foot .val {
  font-size: 18px; font-weight: 900; color: var(--main, #ff8fa3);
}
.rc-close {
  background: none; border: none; color: #bbb; font-size: 11px;
  font-weight: 700; cursor: pointer;
}
.rc-close:hover { color: var(--main, #ff8fa3); }

/* 추이 미니 차트 */
.rc-trend {
  display: flex; gap: 4px; align-items: flex-end; height: 48px;
  background: #fff; border-radius: 12px; padding: 8px;
  margin-top: 4px;
}
.rc-trend-bar {
  flex: 1; background: linear-gradient(to top, var(--main-light, #FFB0C8), var(--main, #FF7096));
  border-radius: 4px 4px 0 0; min-height: 4px; position: relative;
}
.rc-trend-bar.empty { background: #f4e7eb; }
.rc-trend-label {
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
  font-size: 8px; font-weight: 800; color: #aaa; white-space: nowrap;
}

/* 소스 노트 / 초기화 */
.rc-source-note {
  margin-top: 18px; padding: 12px 14px; border-radius: 12px;
  background: #fbf4f6; border: 1px dashed #f0d0d8;
  font-size: 11px; color: #888; font-weight: 600; line-height: 1.6;
}
.rc-source-note b { color: var(--main, #ff8fa3); }
.rc-clear {
  margin-top: 10px; background: none; border: none;
  color: #bbb; font-size: 11px; font-weight: 700; cursor: pointer;
}
.rc-clear:hover { color: var(--main, #ff8fa3); }
