:root {
  --outer: #E9E9E7; --app-bg: #F7F7F5; --card: #FFFFFF;
  --mint: #BDECE0; --mint-2: #D5F3E5; --green: #269B88;
  --text-dark: #233C4C; --text: #4C5358; --text-sub: #89939B; --line: #E9ECEB;
  --s-math: #D9E8FF; --s-eng: #DDF2E5; --s-sci: #FFE5D6; --s-kor: #E9DFFF;
  --s-soc: #FFF3C4; --accent-pink: #F7D9E8; --blue: #83A6E8;
  --r-card: 22px; --r-ctrl: 16px;
  --shadow: 0 10px 30px rgba(60,80,80,0.06); --shadow-sm: 0 4px 14px rgba(60,80,80,0.05);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--outer); font-family: "Pretendard Variable", Pretendard, system-ui, "Noto Sans KR", sans-serif; color: var(--text); font-size: 15px; line-height: 1.5; }
.icon { display: block; } .muted { color: var(--text-sub); } .small { font-size: 12.5px; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font: inherit; }

.app-shell { display: grid; grid-template-columns: 250px 1fr; max-width: 1480px; margin: 14px auto; min-height: calc(100vh - 28px); background: var(--app-bg); border-radius: 28px; overflow: hidden; box-shadow: 0 20px 60px rgba(60,80,80,0.1); }

/* 사이드바 */
.sidebar { padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); overflow-y: auto; max-height: calc(100vh - 28px); }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.logo .lg-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo .lg-name { font-size: 21px; font-weight: 800; color: var(--text-dark); }
.logo .lg-sub { font-size: 10px; font-weight: 700; color: var(--text-sub); letter-spacing: 1px; }
.menu { display: flex; flex-direction: column; gap: 3px; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--text-sub); font-weight: 600; width: 100%; text-align: left; font-size: 14.5px; }
.menu-item:hover { background: #EEF3F0; color: var(--text); }
.menu-item.active { background: var(--mint-2); color: var(--green); }
.menu-item.active .icon { stroke: var(--green); }
.menu-item .icon { stroke: currentColor; flex-shrink: 0; }
.side-section { margin-top: 16px; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 8px; font-size: 13px; font-weight: 700; color: var(--text-sub); }
.mini-add { width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--text-sub); }
.mini-add:hover { background: #EEF3F0; color: var(--green); }
.side-list { display: flex; flex-direction: column; gap: 2px; }
.list-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: var(--text); font-weight: 500; cursor: pointer; font-size: 14px; }
.list-item:hover { background: #EEF3F0; }
.list-item.active { background: var(--mint-2); color: var(--text-dark); }
.list-item .icon { stroke: var(--text-sub); flex-shrink: 0; }
.list-item .li-name { flex: 1; }
.list-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* 유틸바 */
.main-area { display: flex; flex-direction: column; min-width: 0; }
.utilbar { display: flex; align-items: center; gap: 12px; padding: 18px 26px; }
.mobile-menu-btn { display: none; width: 42px; height: 42px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow-sm); }
.search-box { position: relative; flex: 1; display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: var(--r-ctrl); padding: 0 16px; height: 50px; box-shadow: var(--shadow-sm); }
.search-ic { display: flex; color: var(--text-sub); }
.search-box input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; color: var(--text); }
.search-results { position: absolute; top: 56px; left: 0; right: 0; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; z-index: 40; max-height: 360px; overflow-y: auto; }
.sr-group { font-size: 12px; font-weight: 700; color: var(--text-sub); padding: 8px 10px 4px; }
.sr-item { padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.sr-item:hover { background: #EEF3F0; }
.sr-empty { padding: 16px; text-align: center; color: var(--text-sub); }
.util-right { display: flex; align-items: center; gap: 10px; }
.util-btn { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: var(--r-ctrl); padding: 0 16px; height: 50px; font-weight: 600; color: var(--text); box-shadow: var(--shadow-sm); white-space: nowrap; }
.util-btn .icon { stroke: var(--text-sub); }
.export-wrap { position: relative; }
.export-menu { position: absolute; top: 56px; right: 0; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 40; width: 190px; }
.export-menu button { display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 10px; font-size: 14px; }
.export-menu button:hover { background: #EEF3F0; }
.util-icon { width: 50px; height: 50px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; color: var(--text-sub); position: relative; flex-shrink: 0; }
.util-icon:hover { color: var(--green); }
.bell-dot { position: absolute; top: 13px; right: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-pink); border: 1.5px solid #E89AB8; }

/* 콘텐츠 */
.content { flex: 1; display: grid; grid-template-columns: 1fr 360px; gap: 22px; padding: 4px 26px 30px; align-items: start; }
.col-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.col-side { display: flex; flex-direction: column; gap: 20px; }

/* 배너 */
.banner { position: relative; height: 360px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.banner-art { position: absolute; inset: 0; }
.banner-copy { position: absolute; left: 32px; top: 30px; z-index: 2; max-width: 48%; }
.banner-copy h1 { font-size: 34px; margin: 0 0 10px; color: var(--text-dark); font-weight: 800; }
.banner-copy .b-sub { font-size: 18px; color: var(--text-dark); font-weight: 600; margin: 0 0 8px; }
.banner-copy .b-info { font-size: 14px; color: var(--text); opacity: 0.85; }
.banner-copy .b-info b { color: var(--green); }
.today-card { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); width: 300px; background: var(--card); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); z-index: 2; }
.today-card .tc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.today-card .tc-head h3 { margin: 0; font-size: 17px; color: var(--text-dark); }
.today-card .tc-more { font-size: 12px; color: var(--text-sub); display: flex; align-items: center; gap: 2px; }
.tc-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.tc-row:first-of-type { border-top: 0; }
.tc-bar { width: 3px; height: 28px; border-radius: 3px; }
.tc-period { font-size: 13px; font-weight: 700; color: var(--text-dark); width: 42px; }
.tc-subject { flex: 1; font-size: 14px; color: var(--text); }
.tc-time { font-size: 12px; color: var(--text-sub); }
.tc-empty { color: var(--text-sub); font-size: 13px; padding: 10px 0; }

/* 과제 입력 */
.addbar { background: var(--card); border-radius: var(--r-card); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.addbar-row { display: flex; align-items: center; gap: 12px; }
.addbar-plus { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.addbar-plus .icon { stroke: #fff; }
.addbar-row input { flex: 1; border: 0; outline: 0; font-size: 15px; background: none; }
.addbar-send, .addbar-go { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.addbar-send { color: var(--text-sub); } .addbar-send:hover { color: var(--green); }
.addbar-go { background: var(--green); color: #fff; } .addbar-go .icon { stroke: #fff; fill: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--app-bg); color: var(--text-sub); font-size: 13px; font-weight: 600; border: 1px solid var(--line); }
.chip .icon { stroke: var(--text-sub); }
.chip.active { background: var(--green); color: #fff; border-color: transparent; }
.chip.active .icon { stroke: #fff; }
.chip.right { margin-left: auto; }

/* 섹션/카드 */
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-sm); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-size: 19px; color: var(--text-dark); font-weight: 800; }
.card-head .ch-right { font-size: 12px; color: var(--text-sub); display: flex; align-items: center; gap: 2px; }
.badge-count { font-size: 13px; color: var(--green); font-weight: 700; margin-left: 8px; }
.page-title { font-size: 26px; font-weight: 800; color: var(--text-dark); margin: 6px 0 16px; }

/* 할 일/과제 행 */
.task-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); flex-shrink: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.task-check.done { background: var(--green); border-color: var(--green); }
.task-check.done svg { stroke: #fff; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 15px; color: var(--text-dark); font-weight: 600; }
.task-row.done .task-title { text-decoration: line-through; color: var(--text-sub); }
.task-tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin-left: 8px; color: var(--text-dark); }
.task-time { font-size: 13px; color: var(--text-sub); font-weight: 600; }
.task-more { color: var(--text-sub); padding: 4px; border-radius: 8px; }
.task-more:hover { color: var(--green); }
.empty { padding: 30px; text-align: center; color: var(--text-sub); }

/* 시간표 */
.tt-wrap { overflow-x: auto; }
.tt { width: 100%; border-collapse: separate; border-spacing: 4px; min-width: 360px; }
.tt th { font-size: 12px; color: var(--text-sub); font-weight: 700; padding: 4px; }
.tt td { text-align: center; padding: 0; }
.tt .tt-period { font-size: 12px; color: var(--text-sub); font-weight: 700; width: 36px; }
.tt-cell { border-radius: 10px; padding: 9px 4px; font-size: 12px; font-weight: 600; color: var(--text-dark); cursor: pointer; min-height: 34px; }
.tt-cell:hover { outline: 2px solid var(--green); }

/* 하단 요약 카드 */
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sum-card { background: var(--card); border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 12px; }
.sum-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--mint-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sum-ic .icon { stroke: var(--green); }
.sum-num { font-size: 22px; font-weight: 800; color: var(--text-dark); }
.sum-num small { font-size: 13px; font-weight: 600; color: var(--text-sub); }
.sum-label { font-size: 12.5px; color: var(--text-sub); }

/* 캘린더 */
.cal-card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow-sm); padding: 20px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-title { font-size: 17px; font-weight: 800; color: var(--text-dark); }
.cal-nav { width: 32px; height: 32px; border-radius: 10px; color: var(--text-sub); display: flex; align-items: center; justify-content: center; }
.cal-nav:hover { background: #EEF3F0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 12px; }
.cal-dow { text-align: center; font-size: 11px; color: var(--text-sub); font-weight: 600; padding: 6px 0; }
.cal-day { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text); border-radius: 50%; cursor: pointer; }
.cal-day:hover { background: #EEF3F0; }
.cal-day.other { color: #C7CFCB; }
.cal-day.today { font-weight: 800; color: var(--green); }
.cal-day.selected { background: var(--green); color: #fff; font-weight: 700; }
.cal-dots { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; }
.cal-dot { width: 4px; height: 4px; border-radius: 50%; }
.cal-day.selected .cal-dot { background: #fff !important; }

/* 집중 모드 */
.focus-card { position: relative; background: var(--mint); border-radius: var(--r-card); overflow: hidden; min-height: 340px; padding: 22px 22px 0; box-shadow: var(--shadow-sm); }
.focus-head { display: flex; justify-content: space-between; align-items: flex-start; }
.focus-head h3 { margin: 0; font-size: 20px; color: var(--text-dark); font-weight: 800; }
.focus-head .tc-more { font-size: 12px; color: var(--green); }
.focus-sub { font-size: 14px; color: var(--text); margin-top: 8px; }
.focus-timer { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 22px 0 16px; position: relative; z-index: 2; }
.focus-adj { width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; }
.focus-adj .icon { stroke: #fff; }
.focus-time { font-size: 34px; font-weight: 800; color: var(--text-dark); font-variant-numeric: tabular-nums; min-width: 150px; text-align: center; }
.focus-start { display: flex; align-items: center; gap: 8px; margin: 0 auto 18px; background: var(--green); color: #fff; font-weight: 700; padding: 12px 28px; border-radius: 999px; position: relative; z-index: 2; }
.focus-start .icon { stroke: #fff; fill: #fff; }
.focus-record { position: relative; z-index: 2; background: rgba(255,255,255,0.75); border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.focus-record .fr-label { font-size: 13px; color: var(--text-dark); font-weight: 600; }
.focus-record .fr-stat { font-size: 13px; color: var(--text); display: flex; gap: 14px; }
.focus-forest { position: absolute; left: 0; right: 0; bottom: 0; height: 150px; z-index: 1; pointer-events: none; }

/* 차트 */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding: 10px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar { width: 62%; background: var(--mint); border-radius: 8px 8px 4px 4px; min-height: 3px; transition: height .3s; }
.bar.top { background: var(--green); }
.bar-label { font-size: 11px; color: var(--text-sub); }
.donut { width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.donut span { width: 94px; height: 94px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: var(--text-dark); }
.subj-bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.subj-bar-row .sbn { width: 50px; font-size: 13px; color: var(--text); }
.subj-bar-track { flex: 1; height: 12px; background: var(--app-bg); border-radius: 999px; overflow: hidden; }
.subj-bar-fill { height: 100%; border-radius: 999px; }

/* 시험 카드 */
.exam-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.exam-card.past { opacity: 0.6; }
.exam-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.exam-name { font-size: 16px; font-weight: 800; color: var(--text-dark); }
.dday { font-size: 14px; font-weight: 800; color: var(--green); background: var(--mint-2); padding: 4px 12px; border-radius: 999px; }
.dday.past { color: var(--text-sub); background: var(--app-bg); }
.exam-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; cursor: pointer; }
.exam-item .ei-check { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; }
.exam-item.done .ei-check { background: var(--green); border-color: var(--green); }
.exam-item.done .ei-check svg { stroke: #fff; }
.exam-item.done .ei-text { text-decoration: line-through; color: var(--text-sub); }

/* 활동 타임라인 */
.act-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.act-top { display: flex; align-items: center; justify-content: space-between; }
.act-name { font-size: 16px; font-weight: 800; color: var(--text-dark); }
.act-type { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--mint-2); color: var(--green); }
.act-meta { font-size: 12px; color: var(--text-sub); margin: 4px 0 8px; }
.act-field { font-size: 13px; color: var(--text); margin: 3px 0; }
.act-field b { color: var(--text-dark); }

/* 공통 버튼/모달 */
.btn-primary { background: var(--green); color: #fff; font-weight: 700; padding: 11px 20px; border-radius: 14px; }
.btn-ghost { background: var(--app-bg); color: var(--text); font-weight: 600; padding: 11px 20px; border-radius: 14px; }
.modal { position: fixed; inset: 0; background: rgba(35,60,76,0.35); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--card); border-radius: 20px; padding: 24px; width: 100%; max-width: 460px; box-shadow: var(--shadow); max-height: 86vh; overflow-y: auto; }
.modal-box h2 { margin: 0 0 16px; color: var(--text-dark); }
.fld { display: block; font-size: 13px; color: var(--text-sub); font-weight: 600; margin-bottom: 12px; }
.fld input, .fld select, .fld textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); }
.fld textarea { resize: vertical; min-height: 60px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.popover { position: fixed; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 10px; z-index: 90; width: 300px; }
.popover[hidden] { display: none; }
.notif-item { padding: 11px 12px; border-radius: 10px; font-size: 14px; }
.notif-item:hover { background: #EEF3F0; }
.notif-item .nt { font-weight: 600; color: var(--text-dark); } .notif-item .ns { font-size: 12px; color: var(--text-sub); }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--text-dark); color: #fff; padding: 13px 22px; border-radius: 14px; font-weight: 600; z-index: 200; box-shadow: var(--shadow); }
.toast[hidden] { display: none; } .toast.ok { background: var(--green); }

/* 반응형 */
@media (max-width: 1150px) {
  .content { grid-template-columns: 1fr; }
  .col-side { display: grid; grid-template-columns: 1fr 1fr; }
  .today-card { position: static; transform: none; width: auto; margin-top: 16px; }
  .banner { height: auto; }
  .banner-art { position: relative; height: 220px; }
  .banner-copy { position: static; max-width: none; padding: 20px 20px 0; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; border-radius: 0; margin: 0; min-height: 100vh; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 80; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .col-side { grid-template-columns: 1fr; }
  .utilbar { padding: 14px; } .content { padding: 4px 14px 24px; }
  .util-btn .txt { display: none; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
}
