
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",sans-serif;background:#f7f8fb;color:#1f2937}
a{color:#2563eb;text-decoration:none}.container{max-width:1180px;margin:0 auto;padding:24px}.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}
.logo{font-size:24px;font-weight:800}.nav a{margin-left:14px;font-weight:700;color:#1f2937}.dday{background:#111827;color:#fff;border-radius:14px;padding:14px 18px;font-weight:800;font-size:20px}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.grid2{display:grid;grid-template-columns:1.2fr .8fr;gap:14px}.card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:18px;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.card h2,.card h3{margin-top:0}.metric{font-size:28px;font-weight:800;margin:6px 0}.muted{color:#6b7280;font-size:14px}.progress{width:100%;height:10px;background:#e5e7eb;border-radius:99px;overflow:hidden}.progress span{display:block;height:100%;background:#2563eb;border-radius:99px}
table{width:100%;border-collapse:collapse}th,td{border-bottom:1px solid #e5e7eb;padding:10px;text-align:left;vertical-align:top}th{background:#f9fafb;font-size:14px}
.badge{display:inline-block;padding:4px 8px;border-radius:99px;font-size:12px;font-weight:700;background:#eef2ff;color:#3730a3}.badge.done{background:#dcfce7;color:#166534}.badge.wait{background:#fef3c7;color:#92400e}
button,.btn{border:0;background:#2563eb;color:white;padding:9px 12px;border-radius:10px;cursor:pointer;font-weight:700;display:inline-block}button.secondary,.btn.secondary{background:#374151}button.ok{background:#16a34a}
input,select,textarea{width:100%;border:1px solid #e5e7eb;border-radius:10px;padding:10px;font-family:inherit;font-size:14px;background:#fff}textarea{min-height:260px;line-height:1.6}.form-row{margin-bottom:12px}
pre.template{white-space:pre-wrap;background:#f9fafb;border:1px solid #e5e7eb;border-radius:12px;padding:14px;line-height:1.55}
@media(max-width:900px){.grid,.grid2{grid-template-columns:1fr}.header{display:block}.nav{margin-top:12px}.nav a{display:inline-block;margin:6px 8px 0 0}}


/* Side menu layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.side-menu {
  width: 250px;
  flex: 0 0 250px;
  background: #0f172a;
  color: #e5e7eb;
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.side-brand {
  border-bottom: 1px solid rgba(255,255,255,.12);
  padding-bottom: 18px;
  margin-bottom: 16px;
}
.side-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.side-sub {
  color: #94a3b8;
  font-size: 13px;
  margin-top: 6px;
}
.side-dday {
  margin-top: 14px;
  background: #2563eb;
  color: white;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}
.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}
.side-nav a {
  display: block;
  color: #e5e7eb;
  padding: 11px 12px;
  border-radius: 12px;
  font-weight: 800;
}
.side-nav a:hover {
  background: rgba(255,255,255,.10);
}
.side-tip {
  margin-top: 24px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.6;
  background: rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 14px;
}
.main-content {
  flex: 1;
  min-width: 0;
  padding: 24px;
}
.mobile-top {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.header { display: none !important; }

.syllabus-layout {
  display: grid;
  grid-template-columns: minmax(430px, 0.95fr) minmax(420px, 1.05fr);
  gap: 16px;
  align-items: start;
}
.syllabus-list {
  max-height: calc(100vh - 170px);
  overflow: auto;
}
.syllabus-row {
  cursor: pointer;
}
.syllabus-row:hover {
  background: #f8fafc;
}
.syllabus-row.active {
  background: #eef2ff;
}
.study-panel {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow: auto;
}
.study-content {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 15px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
}
.study-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.syllabus-filter {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 1100px) {
  .side-menu {
    width: 210px;
    flex-basis: 210px;
  }
  .syllabus-layout {
    grid-template-columns: 1fr;
  }
  .study-panel {
    position: static;
    max-height: none;
  }
}
@media (max-width: 800px) {
  .app-shell {
    display: block;
  }
  .side-menu {
    width: auto;
    height: auto;
    position: static;
  }
  .side-nav {
    grid-template-columns: repeat(2, 1fr);
  }
  .main-content {
    padding: 16px;
  }
  .mobile-top {
    display: flex;
  }
  .grid, .grid2 {
    grid-template-columns: 1fr !important;
  }
  .syllabus-filter {
    grid-template-columns: 1fr;
  }
}


.app-shell{display:flex;min-height:100vh}.side-menu{width:250px;flex:0 0 250px;background:#0f172a;color:#e5e7eb;padding:22px 18px;position:sticky;top:0;height:100vh;overflow-y:auto}.side-brand{border-bottom:1px solid rgba(255,255,255,.12);padding-bottom:18px;margin-bottom:16px}.side-title{font-size:20px;font-weight:900;letter-spacing:-.02em;line-height:1.25}.side-sub{color:#94a3b8;font-size:13px;margin-top:6px}.side-dday{margin-top:14px;background:#2563eb;color:white;border-radius:14px;padding:12px 14px;font-size:22px;font-weight:900;text-align:center}.side-nav{display:grid;gap:8px;margin-top:18px}.side-nav a{display:block;color:#e5e7eb;padding:11px 12px;border-radius:12px;font-weight:800}.side-nav a:hover{background:rgba(255,255,255,.10)}.side-tip{margin-top:24px;color:#cbd5e1;font-size:13px;line-height:1.6;background:rgba(255,255,255,.07);border-radius:14px;padding:14px}.main-content{flex:1;min-width:0;padding:24px}.mobile-top{display:none;align-items:center;justify-content:space-between;margin-bottom:18px}.header{display:none!important}
.syllabus-layout{display:grid;grid-template-columns:minmax(430px,.95fr) minmax(420px,1.05fr);gap:16px;align-items:start}.syllabus-list{max-height:calc(100vh - 170px);overflow:auto}.syllabus-row{cursor:pointer}.syllabus-row:hover{background:#f8fafc}.syllabus-row.active{background:#eef2ff}.study-panel-wrap{min-width:0}.study-panel{position:sticky;top:24px;max-height:calc(100vh - 48px);overflow:auto}.study-content{white-space:pre-wrap;line-height:1.7;font-size:15px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:16px}.study-content.rendered,.model-answer-pre.rendered{white-space:normal}.study-content h3,.model-answer-pre h3{margin:18px 0 10px;font-size:18px;font-weight:900;color:#111827;border-left:5px solid #2563eb;padding-left:10px}.study-content p,.model-answer-pre p{margin:8px 0}.study-content ul,.model-answer-pre ul{margin:8px 0 12px 20px;padding-left:8px}.study-content li,.model-answer-pre li{margin:5px 0;line-height:1.75}.study-content strong,.model-answer-pre strong{font-weight:900;color:#111827}.study-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:space-between}.syllabus-filter{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:10px;align-items:end}.diagram-box{background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:10px;overflow:auto}.diagram-box svg{display:block;max-width:100%;height:auto}.model-modal-backdrop{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:9998}.model-modal{display:none;position:fixed;right:24px;top:24px;bottom:24px;width:min(760px,calc(100vw - 48px));background:#fff;border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.25);z-index:9999;overflow:hidden;border:1px solid #e5e7eb}.model-modal-header{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #e5e7eb;background:#f9fafb}.model-modal-body{padding:18px;overflow:auto;height:calc(100% - 62px)}.model-answer-pre{white-space:pre-wrap;line-height:1.65;font-family:inherit;font-size:15px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:16px}.model-actions{display:flex;gap:8px;align-items:center}
@media (max-width:1100px){.side-menu{width:210px;flex-basis:210px}.syllabus-layout{grid-template-columns:1fr}.study-panel{position:static;max-height:none}}@media (max-width:800px){.app-shell{display:block}.side-menu{width:auto;height:auto;position:static}.side-nav{grid-template-columns:repeat(2,1fr)}.main-content{padding:16px}.mobile-top{display:flex}.grid,.grid2{grid-template-columns:1fr!important}.syllabus-filter{grid-template-columns:1fr}}


/* Login */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  padding: 20px;
}
.login-card {
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
  border: 1px solid #e5e7eb;
}
.login-title {
  font-size: 24px;
  font-weight: 900;
  color: #111827;
}
.login-sub {
  margin-top: 6px;
  margin-bottom: 22px;
  color: #6b7280;
}
.login-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-weight: 700;
}


/* Study calendar */
.calendar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.calendar-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
}
.calendar-weekdays {
  margin-bottom: 8px;
}
.calendar-weekdays div {
  font-weight: 900;
  text-align: center;
  padding: 10px;
  color: #475569;
}
.calendar-day {
  min-height: 150px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}
.calendar-day.not-month {
  opacity: .45;
}
.calendar-day.today {
  outline: 3px solid #2563eb;
}
.calendar-day.good {
  background: #ecfdf5;
  border-color: #86efac;
}
.calendar-day.partial {
  background: #fffbeb;
  border-color: #fcd34d;
}
.calendar-day.empty {
  background: #fff1f2;
  border-color: #fecdd3;
}
.calendar-day.future {
  background: #f8fafc;
}
.day-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.day-pct {
  font-weight: 900;
  font-size: 20px;
  margin: 10px 0 6px;
}
.progress.small {
  height: 7px;
  margin-bottom: 8px;
}
.day-detail {
  font-size: 13px;
  line-height: 1.55;
}
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}
.legend-box {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  display: inline-block;
  border: 1px solid #e5e7eb;
}
.legend-box.good { background:#ecfdf5; border-color:#86efac; }
.legend-box.partial { background:#fffbeb; border-color:#fcd34d; }
.legend-box.empty { background:#fff1f2; border-color:#fecdd3; }
.legend-box.future { background:#f8fafc; }
@media (max-width: 1100px) {
  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calendar-weekdays {
    display: none;
  }
}
@media (max-width: 700px) {
  .calendar-grid {
    grid-template-columns: 1fr;
  }
  .calendar-head {
    display: block;
  }
}


.syllabus-row td .badge.done {
  margin-left: 4px;
}
.syllabus-row button {
  white-space: nowrap;
}


.model-answer-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}


.bulk-head { display:flex; justify-content:space-between; gap:14px; align-items:center; }
.bulk-actions { display:flex; gap:8px; flex-wrap:wrap; }
.bulk-status { margin-top:12px; }
.bulk-log { margin-top:10px; max-height:130px; overflow:auto; background:#f8fafc; border:1px solid #e5e7eb; border-radius:12px; padding:10px; font-size:13px; line-height:1.5; }
@media (max-width: 900px) { .bulk-head { display:block; } .bulk-actions { margin-top:10px; } }


/* Quiznet */
.quiznet-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;margin-bottom:10px}.quiznet-layout{display:grid;grid-template-columns:minmax(360px,.9fr) minmax(420px,1.1fr);gap:16px;align-items:start}.quiz-card-list{display:grid;gap:10px;max-height:calc(100vh - 260px);overflow:auto}.quiz-card-row{border:1px solid #e5e7eb;border-radius:14px;padding:12px;background:#fff;cursor:pointer}.quiz-card-row:hover{background:#f8fafc}.quiz-card-row.active{background:#eef2ff;border-color:#2563eb}.quiznet-study-panel{position:sticky;top:24px}.quiz-flashcard{min-height:280px;border:1px solid #e5e7eb;border-radius:20px;background:#f8fafc;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:24px;margin:14px 0;cursor:pointer}.quiz-flashcard #flashText{font-size:22px;line-height:1.55;font-weight:800;color:#111827}.quiz-flashcard #flashHint{margin-top:18px}.quiznet-answer-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}@media(max-width:1000px){.quiznet-layout{grid-template-columns:1fr}.quiznet-study-panel{position:static}}


.quiz-mode-pill{display:inline-flex;align-items:center;border-radius:999px;background:#111827;color:#fff;padding:8px 12px;font-weight:800;font-size:13px;white-space:nowrap}
.quiz-tabs{display:flex;gap:8px;margin:12px 0;flex-wrap:wrap}.quiz-tabs button{border:1px solid #e5e7eb;background:#fff;color:#111827}.quiz-tabs button.active{background:#111827;color:#fff;border-color:#111827}
.badge.type{background:#111827;color:#fff;border-color:#111827}.quiz-question-box{border:1px solid #e5e7eb;background:#f8fafc;border-radius:16px;padding:16px;margin:12px 0}.quiz-question-box #testQuestion{font-size:20px;line-height:1.55;font-weight:800;color:#111827;margin-top:8px}.quiz-question-box #testOptions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.small{padding:7px 10px;font-size:13px}.quiz-feedback{border:1px dashed #d1d5db;border-radius:14px;padding:12px;margin-top:12px;background:#fff;line-height:1.65}.match-board{display:grid;gap:10px}.match-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;border:1px solid #e5e7eb;border-radius:14px;padding:10px;background:#fff}.match-q,.match-a{padding:10px;border-radius:10px;background:#f8fafc}.match-a{cursor:pointer;color:#2563eb;font-weight:700}@media(max-width:700px){.match-row{grid-template-columns:1fr}.quiz-question-box #testQuestion{font-size:17px}}

