 :root {
      --bg: #fff8fa; --card: #ffffff; --main: #ff6b95;
      --main-pale: #fff0f4; --accent: #ff3d71;
      --gray: #888; --gray-light: #f4f4f4;
      --border: #ffe0e8; --dark: #2d2032; --private: #7b8cde;
      --radius: 20px; --shadow: 0 8px 30px rgba(255,107,149,0.08);
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body { background: var(--bg); font-family: 'Pretendard', sans-serif; color: var(--dark); min-height: 100vh; padding: 20px 20px 100px; display: flex; flex-direction: column; align-items: center; }
    .app-container { width: 100%; max-width: 1100px; }
    .top-nav-wrapper { margin-bottom: 20px; }
    .back-btn { font-size: 13px; color: var(--gray); background: none; border: none; cursor: pointer; font-weight: 600; margin-bottom: 8px; display: block; }
    .page-title { font-size: 26px; font-weight: 800; color: var(--dark); }
    .toggle-area { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 16px; }
    .toggle-group { display: flex; background: var(--gray-light); border-radius: 30px; padding: 4px; gap: 2px; }
    .toggle-btn { padding: 8px 16px; border-radius: 26px; border: none; font-size: 11px; font-weight: 700; cursor: pointer; transition: 0.2s; background: transparent; color: var(--gray); }
    .toggle-btn.active { background: var(--main); color: white; box-shadow: 0 4px 10px rgba(255,107,149,0.25); }
    .dashboard-grid { display: grid!important; grid-template-columns: 6fr 4fr!important; gap: 20px; margin-bottom: 20px; align-items: stretch; }
    .db-card { background: var(--card); border-radius: var(--radius); border: 1.5px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; }
    .chart-container { padding: 24px; flex: 1; }
    .card-label { font-size: 14px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
    .legend { display: flex; gap: 12px; font-size: 10px; color: var(--gray); margin-bottom: 12px; }
    .legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
    .chart-wrap { flex: 1; position: relative; width: 100%; min-height: 380px; display: flex; align-items: center; justify-content: center; }
    .score-panel { padding: 0; overflow: hidden; }
    .score-grid-wrapper { display: grid; grid-template-columns: 1fr 1fr; flex: 1; }
    .score-chip { padding: 18px 10px; text-align: center; border-bottom: 1.5px solid var(--border); border-right: 1.5px solid var(--border); display: flex; flex-direction: column; justify-content: center; }
    .score-chip:nth-child(2n) { border-right: none; }
    .score-chip:nth-last-child(-n+2) { border-bottom: none; }
    .score-chip .subj { font-size: 11px; color: var(--gray); font-weight: 700; margin-bottom: 4px; }
    .score-chip .val { font-size: 22px; font-weight: 900; color: var(--main); }
    .score-chip .gr { font-size: 11px; color: var(--gray); margin-top: 4px; }
    .goal-toggle-btn { background: var(--main-pale); border: none; border-top: 1.5px solid var(--border); padding: 16px 24px; width: 100%; display: flex; justify-content: space-between; font-weight: 800; color: var(--main); cursor: pointer; font-size: 13px; transition: background 0.2s; }
    .goal-toggle-btn:hover { background: #ffe4ec; }
    .goal-content { max-height: 0; overflow: hidden; transition: 0.4s ease; background: white; }
    .goal-content.open { max-height: 300px; border-top: 1.5px solid var(--border); }
    .goal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 15px; }
    .goal-input-box { display: flex; flex-direction: column; gap: 4px; }
    .goal-input-box label { font-size: 9px; font-weight: 700; color: var(--gray); text-align: center; }
    .goal-input-box input { width: 100%; border: 1.5px solid var(--border); border-radius: 8px; padding: 6px; text-align: center; font-weight: 800; color: var(--main); outline: none; font-size: 13px; background: white; }
    .goal-input-box input:focus { border-color: var(--main); }
    .section-card { background: var(--card); border-radius: var(--radius); border: 1.5px solid var(--border); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; display: none; }
    .section-card.open { display: block; }
    .section-title { font-size: 15px; font-weight: 800; margin-bottom: 16px; color: var(--dark); }
    .input-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
    .input-label { font-size: 12px; color: var(--gray); width: 48px; flex-shrink: 0; }
    select, input[type="number"], input[type="text"] { border: 1.5px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; background: var(--bg); color: var(--dark); outline: none; transition: border 0.2s; }
    select:focus, input:focus { border-color: var(--main); }
    .score-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
    .score-input-wrap { background: var(--main-pale); border-radius: 10px; padding: 10px; border: 1px solid var(--border); }
    .score-input-wrap label { font-size: 11px; color: var(--gray); display: block; margin-bottom: 6px; font-weight: 600; }
    .score-input-wrap input { width: 100%; border: none; background: white; border-radius: 6px; padding: 6px 8px; font-size: 13px; font-weight: 700; }
    .sub-inputs { display: flex; gap: 4px; margin-top: 2px; }
    .sub-inputs > div { flex: 1; }
    .sub-inputs input { width: 100%; }
    .sub-label { font-size: 9px; color: var(--gray); text-align: center; margin-top: 2px; }
    .btn-add { width: 100%; background: var(--main); color: white; border: none; border-radius: 10px; padding: 12px; font-size: 14px; font-weight: 800; cursor: pointer; }
    .btn-add:hover { background: var(--accent); }
    .record-filters { display: flex; gap: 6px; margin-bottom: 14px; }
    .filter-btn { padding: 5px 12px; border-radius: 20px; border: 1.5px solid var(--border); background: white; font-size: 11px; font-weight: 700; cursor: pointer; color: var(--gray); }
    .filter-btn.active { background: var(--main); color: white; border-color: var(--main); }
    .record-list { display: flex; flex-direction: column; gap: 10px; }
    .record-card { background: var(--main-pale); border-radius: 12px; padding: 14px; border: 1px solid var(--border); position: relative; }
    .record-card.private { background: #f0f2ff; border-color: #c5caf5; }
    .record-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
    .record-title { font-size: 14px; font-weight: 800; }
    .record-badge { font-size: 10px; padding: 3px 8px; border-radius: 10px; font-weight: 700; }
    .badge-official { background: var(--main); color: white; }
    .badge-private { background: var(--private); color: white; }
    .record-scores { display: flex; gap: 6px; flex-wrap: wrap; }
    .record-score-item { background: white; border-radius: 8px; padding: 5px 8px; font-size: 11px; text-align: center; min-width: 48px; }
    .rs-subj { color: var(--gray); font-size: 9px; }
    .rs-val { font-weight: 800; color: var(--dark); font-size: 12px; }
    .btn-delete { position: absolute; top: 10px; right: 10px; background: none; border: none; color: var(--gray); cursor: pointer; font-size: 14px; }
    .empty-state { text-align: center; color: var(--gray); font-size: 13px; padding: 30px; }
   
    .btn-record { background: var(--main-pale); color: var(--main); border-right: 1px solid var(--border); }
    .btn-record.active { background: var(--main); color: white; }
    .btn-list { background: var(--main-pale); color: var(--main); }
    .btn-list.active { background: var(--main); color: white; }
    .bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  height: 70px; /* 높이는 기존 유지 */
  z-index: 100;
  box-shadow: 0 -5px 20px rgba(155, 137, 255, 0.1); /* 보라색 섀도우 살짝 */
  background: var(--main-pale); /* 배경색 통일 */
}

.nav-btn {
  flex: 1; /* 3개의 버튼이 동일한 너비를 가집니다 */
  border: none;
  font-size: 14px; /* 버튼이 많아졌으므로 폰트 사이즈 살짝 조정 */
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: 0.3s;
  color: var(--accent);
  background: transparent;
}

/* 경계선 처리: 마지막 버튼 제외하고 오른쪽에 선 긋기 */
.nav-btn:not(:last-child) {
  border-right: 1px solid var(--border);
}

/* 활성화 상태 (Active) */
.nav-btn.active {
  background: var(--main);
  color: white !important;
}

/* 아이콘 크기 조절 */
.nav-icon {
  font-size: 18px;}