:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #eef0f7;
  --line: rgba(35, 43, 68, 0.1);
  --line-strong: rgba(35, 43, 68, 0.18);
  --text: #1b2130;
  --muted: #6e778c;
  --muted-2: #9aa2b3;
  --purple: #a68cff;
  --purple-deep: #7760e7;
  --coral: #ff8c76;
  --mint: #77d9c6;
  --yellow: #f7cd76;
  --green: #76dc9c;
  --shadow: 0 20px 45px rgba(46, 55, 88, 0.1);
  font-family: "Pretendard", "Noto Sans KR", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.teacher-screen { display: none; }
.teacher-screen.active-screen { display: block; }

.auth-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #2b244d, transparent 42%), #10131f; }
.auth-card { width: min(420px, 100%); padding: 34px; border: 1px solid rgba(166, 140, 255, .22); border-radius: 22px; background: rgba(25, 29, 45, .94); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.auth-mark { margin-bottom: 22px; }
.auth-eyebrow { color: #c3b7ff; }
.auth-card h1 { color: #f4f2ff; font-size: 28px; letter-spacing: -.055em; margin: 13px 0 8px; }
.auth-card > p, #authDescription { color: #aeb3c5; font-size: 12px; margin: 0 0 24px; }
.auth-form { display: grid; gap: 13px; }
.auth-form label, .user-form label { display: grid; gap: 6px; color: #cdd1df; font-size: 11px; font-weight: 700; }
.auth-form input, .user-form input, .user-form select { width: 100%; border: 1px solid rgba(202, 207, 229, .2); border-radius: 9px; background: #151927; color: #f4f2ff; padding: 11px 12px; outline: none; }
.auth-form input:focus, .user-form input:focus, .user-form select:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(166, 140, 255, .14); }
.auth-submit { width: 100%; margin-top: 5px; }
.auth-status { min-height: 17px; color: #ffb0ab; font-size: 11px; margin: 0; }
.auth-setup-note { color: #c3b7ff; padding: 11px 12px; border: 1px solid rgba(166, 140, 255, .22); background: rgba(119, 96, 231, .12); border-radius: 9px; font-size: 11px; line-height: 1.5; }
.auth-logout { width: 100%; margin-top: 15px; color: #c7cbe0; border-color: rgba(202, 207, 229, .24); }
.user-panel { margin-bottom: 16px; }
.user-form { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: end; gap: 10px; padding-top: 18px; }
.user-form .primary-button { height: 39px; }
.user-list { display: grid; gap: 8px; }
.user-row { display: grid; grid-template-columns: 1fr 140px 110px 42px; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); padding: 12px 14px; }
.user-row strong { display: block; font-size: 12px; }
.user-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.user-role { color: var(--purple-deep); font-size: 11px; font-weight: 800; }
.user-delete { border: 0; background: transparent; color: var(--muted-2); font-size: 16px; }
.user-delete:hover { color: #e47e78; }
.user-empty { color: var(--muted); font-size: 12px; padding: 18px 0; }
.student-roster-empty { grid-column: 1 / -1; padding: 28px; border: 1px dashed var(--line-strong); border-radius: 13px; color: var(--muted); background: var(--surface-2); font-size: 12px; text-align: center; }

.topbar { height: 78px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 42px; background: rgba(13, 16, 25, 0.88); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(18px); }
.brand-wrap, .topbar-actions, .class-identity, .class-strip-actions, .section-heading-row, .filter-wrap, .panel-heading, .student-user, .student-top-actions, .student-breadcrumb, .student-heading, .passage-card-heading, .student-step-label, .assignment-row, .assignment-name, .preview-heading, .saved-heading { display: flex; align-items: center; }
.brand-wrap { gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, #c4b3ff, #775fe6); color: #18152e; font-weight: 900; font-size: 19px; box-shadow: 0 8px 20px rgba(125, 98, 239, .3); }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -.03em; }
.brand-caption { color: var(--muted); font-size: 10px; margin-top: 2px; }
.topbar-actions { gap: 17px; }
.connection-pill, .student-live, .live-label { display: inline-flex; align-items: center; gap: 7px; color: #a3e9be; font-size: 11px; font-weight: 700; letter-spacing: .01em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #69da92; box-shadow: 0 0 0 4px rgba(105, 218, 146, .12), 0 0 12px rgba(105, 218, 146, .6); display: inline-block; }
.connection-pill.is-syncing { color: #f8d98b; }
.connection-pill.is-syncing .status-dot { background: #f8d98b; box-shadow: 0 0 0 4px rgba(248, 217, 139, .12), 0 0 12px rgba(248, 217, 139, .45); }
.connection-pill.is-offline { color: #ffb0ab; }
.connection-pill.is-offline .status-dot { background: #ff7f78; box-shadow: 0 0 0 4px rgba(255, 127, 120, .12), 0 0 12px rgba(255, 127, 120, .4); }
.ghost-button, .secondary-button, .primary-button, .outline-button, .icon-button, .filter-chip, .nav-item, .assigned-passage, .more-button { border: 0; color: inherit; }
.ghost-button { background: transparent; color: var(--muted); font-size: 12px; padding: 8px 10px; }
.ghost-button:hover { color: var(--text); }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(166, 140, 255, .42); background: #252038; color: #d2c7ff; font-weight: 800; display: grid; place-items: center; }
.secondary-button, .primary-button, .outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 11px 15px; font-size: 12px; font-weight: 800; transition: .2s ease; }
.secondary-button { color: #d2c7ff; background: #242039; border: 1px solid rgba(166, 140, 255, .18); }
.secondary-button:hover { border-color: rgba(166, 140, 255, .5); background: #2b2445; transform: translateY(-1px); }
.primary-button { color: #171326; background: var(--purple); box-shadow: 0 9px 20px rgba(166, 140, 255, .18); }
.primary-button:hover { background: #b9a6ff; transform: translateY(-1px); box-shadow: 0 11px 24px rgba(166, 140, 255, .3); }
.small-button { padding: 9px 12px; font-size: 11px; }
.primary-button:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.outline-button { border: 1px solid var(--line-strong); background: transparent; color: var(--text); padding: 9px 15px; }
.outline-button:hover { border-color: var(--purple); color: #d2c7ff; }
.app-body { min-height: calc(100vh - 78px); display: flex; }
.sidebar { width: 240px; padding: 33px 17px 24px; border-right: 1px solid var(--line); flex: 0 0 240px; display: flex; flex-direction: column; }
.sidebar-label { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; padding: 0 14px 13px; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; text-align: left; transition: .2s ease; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item.active { color: #ddd5ff; background: #292343; box-shadow: inset 3px 0 0 var(--purple); }
.nav-icon { font-size: 17px; width: 17px; text-align: center; color: currentColor; }
.sidebar-footnote { margin: auto 3px 0; padding: 13px 12px; border: 1px solid rgba(166, 140, 255, .17); background: linear-gradient(135deg, rgba(104, 81, 195, .13), rgba(20, 24, 36, .4)); border-radius: 13px; display: flex; gap: 9px; }
.mini-spark { color: var(--purple); font-size: 16px; }
.sidebar-footnote strong { display: block; color: #d5ceff; font-size: 11px; }
.sidebar-footnote p { color: var(--muted); line-height: 1.5; font-size: 10px; margin: 4px 0 0; }
.main-view { width: min(1320px, 100%); margin: 0 auto; padding: 42px 44px 70px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; margin-bottom: 28px; }
.compact-heading { align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: #a99aff; font-size: 10px; letter-spacing: .14em; font-weight: 900; }
.eyebrow-line { width: 21px; height: 2px; border-radius: 2px; background: var(--purple); }
.page-heading h1 { margin: 9px 0 6px; font-size: clamp(28px, 3vw, 37px); letter-spacing: -.055em; line-height: 1; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.heading-actions { display: flex; gap: 9px; }
.class-strip { border: 1px solid var(--line); background: linear-gradient(110deg, #171b2a, #141724); border-radius: 15px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; box-shadow: var(--shadow); }
.class-identity { gap: 12px; }
.class-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #2b244a; color: #c7bbff; font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.class-identity strong { display: block; font-size: 13px; }
.class-identity span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.class-strip-actions { gap: 18px; }
.icon-button { background: transparent; color: var(--muted); padding: 7px; font-size: 14px; }
.icon-button:hover { color: var(--text); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 38px; }
.metric-card { min-height: 126px; padding: 17px 17px 15px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.metric-card.metric-primary { background: linear-gradient(145deg, #292345, #1b1e30); border-color: rgba(166, 140, 255, .2); }
.metric-top { color: var(--muted); display: flex; justify-content: space-between; font-size: 11px; }
.metric-icon { color: #c0b3ff; font-size: 16px; }
.metric-card strong { display: block; margin-top: 15px; font-size: 29px; letter-spacing: -.06em; }
.metric-unit { font-size: 13px; margin-left: 3px; letter-spacing: 0; color: #c4c8d7; }
.metric-foot { color: var(--muted-2); font-size: 10px; margin-top: 3px; }
.trend-up { color: var(--green); font-weight: 800; margin-right: 4px; }
.metric-live { color: var(--mint); font-weight: 800; margin-right: 4px; }
.metric-muted { color: var(--yellow); font-weight: 800; margin-right: 4px; }
.section-heading-row { justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.section-heading-row h2, .panel h2 { font-size: 15px; letter-spacing: -.035em; margin: 0; }
.section-heading-row p, .panel-heading p { color: var(--muted); font-size: 11px; margin: 5px 0 0; }
.filter-wrap { gap: 5px; }
.filter-chip { border-radius: 8px; background: transparent; color: var(--muted); font-size: 10px; padding: 7px 9px; }
.filter-chip span { opacity: .6; margin-left: 3px; }
.filter-chip.active { color: #d7ceff; background: #292343; }
.student-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.student-card { border: 1px solid var(--line); background: var(--surface); border-radius: 13px; padding: 14px 13px 13px; min-width: 0; cursor: pointer; transition: .2s ease; position: relative; overflow: hidden; }
.student-card:hover, .student-card.selected { border-color: rgba(166, 140, 255, .55); background: #1b1e2d; transform: translateY(-2px); box-shadow: 0 13px 24px rgba(0,0,0,.15); }
.student-card.selected::after { content: ""; height: 3px; left: 0; right: 0; bottom: 0; background: var(--purple); position: absolute; }
.student-card-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.student-person { display: flex; gap: 9px; align-items: center; min-width: 0; }
.student-card-avatar, .student-avatar { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; font-size: 11px; flex: 0 0 auto; }
.student-card-avatar.violet { color: #d7ceff; background: #322a52; }
.student-card-avatar.coral { color: #ffd1c8; background: #4c302f; }
.student-card-avatar.mint { color: #b6fff0; background: #21413f; }
.student-card-avatar.yellow { color: #ffe8a7; background: #4a402b; }
.student-person strong { font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.student-person small { color: var(--muted-2); font-size: 9px; display: block; margin-top: 3px; }
.online-tag { color: var(--green); font-size: 9px; display: inline-flex; align-items: center; gap: 4px; }
.online-tag .status-dot { width: 5px; height: 5px; box-shadow: none; }
.offline-tag { color: var(--muted-2); font-size: 9px; }
.student-current { border-top: 1px solid var(--line); margin-top: 13px; padding-top: 11px; min-height: 53px; }
.student-current-title { color: #ccd0de; display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.student-current-type { display: inline-block; color: #b8aaff; background: rgba(166, 140, 255, .11); border-radius: 5px; padding: 3px 5px; margin-top: 6px; font-size: 9px; }
.student-card-bottom { display: flex; align-items: center; gap: 7px; margin-top: 12px; }
.mini-progress { height: 4px; flex: 1; border-radius: 10px; background: #2a2f40; overflow: hidden; }
.mini-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--purple-deep), var(--purple)); border-radius: inherit; }
.student-card-bottom strong { color: #cfd3e1; font-size: 10px; }
.student-detail-panel { margin-top: 24px; border-radius: 16px; border: 1px solid rgba(166, 140, 255, .3); background: linear-gradient(140deg, #1b1c2d, #141824); padding: 23px; box-shadow: 0 20px 45px rgba(3, 5, 15, .26); }
.detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.detail-person { display: flex; align-items: center; gap: 11px; }
.detail-person h2 { margin: 0; font-size: 16px; }
.detail-person p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.detail-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.detail-actions button { font-size: 10px; padding: 8px 10px; border-radius: 8px; }
.detail-actions .hint-button { border: 1px solid rgba(247, 205, 118, .24); background: rgba(247, 205, 118, .1); color: #ffe3a2; }
.detail-actions .answer-button { border: 1px solid rgba(118, 220, 156, .23); background: rgba(118, 220, 156, .1); color: #a8f2bf; }
.detail-actions .reset-button { border: 1px solid var(--line-strong); background: transparent; color: var(--muted); }
.detail-content { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; padding-top: 20px; }
.detail-sentence { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #151925; }
.detail-label { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; font-weight: 900; }
.detail-sentence-text { color: #f0f1f6; font-size: 18px; line-height: 1.6; letter-spacing: -.02em; margin: 10px 0 7px; }
.detail-sentence-korean { color: var(--muted); font-size: 12px; line-height: 1.6; }
.detail-order { margin-top: 17px; display: flex; flex-wrap: wrap; gap: 6px; }
.order-token { border-radius: 7px; padding: 7px 9px; background: #292340; color: #d5ceff; font-size: 11px; border: 1px solid rgba(166, 140, 255, .16); }
.order-token.muted { background: #222735; border-color: transparent; color: var(--muted); }
.detail-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; align-content: start; }
.detail-stat { border-radius: 11px; padding: 13px; border: 1px solid var(--line); background: #171b28; }
.detail-stat span { display: block; color: var(--muted); font-size: 10px; }
.detail-stat strong { display: block; margin-top: 8px; font-size: 17px; letter-spacing: -.04em; }
.detail-tip { grid-column: 1 / -1; border: 1px solid rgba(247, 205, 118, .2); border-radius: 10px; background: rgba(247, 205, 118, .07); color: #ecd69b; padding: 11px; font-size: 11px; line-height: 1.5; }
.detail-empty { color: var(--muted); font-size: 12px; padding: 26px 0 4px; }

.content-layout { display: grid; grid-template-columns: minmax(270px, .8fr) minmax(420px, 1.2fr); gap: 15px; margin-bottom: 15px; }
.panel { border: 1px solid var(--line); background: var(--surface); border-radius: 15px; padding: 19px; }
.panel-heading { gap: 11px; align-items: flex-start; }
.panel-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex: 0 0 auto; }
.purple-icon { color: #c8baff; background: #302851; }
.panel-heading h2 { margin-top: 2px; }
.drop-zone { margin-top: 20px; border: 1px dashed rgba(166, 140, 255, .38); border-radius: 12px; min-height: 187px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 7px; background: linear-gradient(145deg, rgba(166, 140, 255, .07), transparent); transition: .2s ease; }
.drop-zone.dragover { border-color: var(--purple); background: rgba(166, 140, 255, .14); transform: scale(1.01); }
.drop-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: #2e274b; color: #d1c7ff; font-size: 21px; margin-bottom: 4px; }
.drop-zone strong { font-size: 11px; }
.drop-zone > span { color: var(--muted); font-size: 9px; }
.drop-zone input { display: none; }
.drop-zone .outline-button { margin-top: 8px; }
.format-note { display: flex; gap: 9px; margin-top: 14px; padding: 12px; border-radius: 10px; background: rgba(255,255,255,.025); border: 1px solid var(--line); }
.note-icon { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; color: #b6a9ff; background: #302851; font-size: 11px; font-weight: 900; flex: 0 0 auto; }
.format-note strong { display: block; font-size: 10px; }
.format-note code { display: block; color: #c7bdff; font-size: 9px; margin-top: 5px; white-space: nowrap; }
.format-note small { display: block; color: var(--muted-2); font-size: 9px; line-height: 1.4; margin-top: 3px; }
.import-status { min-height: 18px; margin-top: 10px; font-size: 10px; color: var(--mint); }
.import-status.error { color: var(--coral); }
.preview-heading { justify-content: space-between; gap: 10px; }
.content-preview { margin-top: 18px; min-height: 285px; border-top: 1px solid var(--line); padding-top: 14px; }
.empty-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; border: 1px dashed var(--line); border-radius: 11px; border-top: 1px dashed var(--line); padding: 20px; }
.empty-icon { color: #80789f; font-size: 22px; margin-bottom: 4px; }
.empty-preview strong { font-size: 11px; }
.empty-preview span { color: var(--muted); font-size: 10px; }
.preview-title { color: #d8d0ff; font-size: 13px; font-weight: 800; margin-bottom: 11px; }
.preview-row { display: grid; grid-template-columns: 27px minmax(0, 1fr) minmax(0, .75fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.preview-row:last-child { border-bottom: 0; }
.preview-num { color: var(--purple); font-size: 10px; font-weight: 900; }
.preview-row p { margin: 0; font-size: 11px; line-height: 1.5; }
.preview-row p + p { color: var(--muted); font-size: 10px; margin-top: 3px; }
.saved-panel { padding-bottom: 14px; }
.saved-heading { justify-content: space-between; }
.count-badge { color: #cbbfff; border: 1px solid rgba(166,140,255,.2); background: #292343; border-radius: 30px; padding: 5px 8px; font-size: 10px; }
.saved-passages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 17px; }
.saved-passage-card { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #171b28; min-width: 0; }
.saved-passage-card strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-passage-card span { display: block; color: var(--muted); font-size: 9px; margin-top: 5px; }
.saved-passage-card .saved-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.saved-passage-card button { border: 1px solid var(--line-strong); border-radius: 7px; background: transparent; color: #cfc5ff; font-size: 9px; padding: 5px 7px; }
.saved-empty { color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 18px; font-size: 11px; }

.assignment-panel { padding: 0; overflow: hidden; }
.assignment-row { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr .7fr 34px; gap: 17px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.assignment-row:last-child { border-bottom: 0; }
.assignment-header { color: var(--muted-2); text-transform: uppercase; font-size: 9px; letter-spacing: .08em; padding-top: 13px; padding-bottom: 10px; }
.assignment-name { gap: 9px; color: var(--text); min-width: 0; }
.assignment-name strong, .assignment-name small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assignment-name strong { font-size: 11px; }
.assignment-name small { color: var(--muted-2); font-size: 9px; margin-top: 4px; }
.assignment-color { width: 7px; height: 28px; border-radius: 8px; flex: 0 0 auto; }
.assignment-color.coral { background: var(--coral); }.assignment-color.mint { background: var(--mint); }
.assignment-progress { display: flex; align-items: center; gap: 7px; }
.assignment-progress > span { height: 5px; flex: 1; background: #292e3d; border-radius: 10px; overflow: hidden; }
.assignment-progress i { display: block; height: 100%; background: var(--purple); border-radius: inherit; }
.assignment-progress strong { color: #ced1e0; font-size: 10px; }
.more-button { color: var(--muted); background: transparent; padding: 0; letter-spacing: 2px; }

.student-view { width: 100%; min-height: calc(100vh - 78px); background: #10131f; }
.student-topline { height: 68px; border-bottom: 1px solid var(--line); padding: 0 42px; display: flex; align-items: center; justify-content: space-between; }
.student-user { gap: 10px; }
.student-avatar { width: 32px; height: 32px; color: #ffdbd4; background: #4c302f; }
.student-user strong, .student-user span { display: block; }.student-user strong { font-size: 12px; }.student-user span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.student-top-actions { gap: 19px; }
.student-layout { display: flex; max-width: 1380px; margin: 0 auto; }
.student-sidebar { width: 265px; flex: 0 0 265px; padding: 35px 20px 30px; border-right: 1px solid var(--line); min-height: calc(100vh - 146px); }
.student-sidebar-heading { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 11px; }
.student-sidebar-heading strong { color: #d7ceff; font-size: 15px; }
.student-progress { height: 5px; background: #292e3d; border-radius: 9px; overflow: hidden; margin: 11px 0 34px; }.student-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), #ffad84); }
.student-sidebar-label { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; font-weight: 900; margin-bottom: 10px; }
.assigned-passage { width: 100%; display: flex; align-items: center; gap: 8px; background: transparent; padding: 10px 8px; border-radius: 9px; text-align: left; margin-bottom: 5px; color: var(--muted); }
.assigned-passage:hover { background: rgba(255,255,255,.035); color: var(--text); }.assigned-passage.active { background: #28212e; color: var(--text); box-shadow: inset 3px 0 0 var(--coral); }
.assigned-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }.coral-dot { background: var(--coral); }.mint-dot { background: var(--mint); }
.assigned-passage div { flex: 1; min-width: 0; }.assigned-passage strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.assigned-passage small { display: block; font-size: 9px; margin-top: 3px; color: var(--muted-2); }.assigned-check { color: var(--coral); font-size: 11px; }.assigned-lock { color: var(--muted-2); font-size: 13px; }
.imported-student-passages { margin-top: 5px; }.student-sidebar-tip { display: flex; gap: 8px; margin-top: 36px; padding: 11px; border-radius: 10px; background: rgba(119, 217, 198, .07); border: 1px solid rgba(119, 217, 198, .15); }.student-sidebar-tip span { color: var(--mint); }.student-sidebar-tip p { color: #a1c8c0; font-size: 9px; line-height: 1.5; margin: 0; }
.student-workspace { width: min(920px, 100%); padding: 35px 54px 80px; margin: 0 auto; }
.student-breadcrumb { color: var(--muted-2); gap: 8px; font-size: 10px; }.student-breadcrumb b { font-weight: 400; }.student-breadcrumb strong { color: var(--muted); font-weight: 600; }
.student-heading { justify-content: space-between; gap: 20px; align-items: flex-end; margin-top: 24px; }.student-heading h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.055em; line-height: 1; margin: 9px 0 7px; }.student-heading p { color: var(--muted); margin: 0; font-size: 11px; }.coral-eyebrow { color: #ffae9d; }.coral-eyebrow .eyebrow-line { background: var(--coral); }.difficulty-badge { border-radius: 7px; background: rgba(255, 140, 118, .1); border: 1px solid rgba(255, 140, 118, .24); color: #ffb0a2; padding: 6px 8px; font-size: 9px; font-weight: 900; }
.passage-card { margin-top: 27px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(140deg, #191c29, #151824); }.passage-card-heading { justify-content: space-between; color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; font-weight: 900; }.passage-text { margin-top: 15px; color: #e8e9ef; font-size: 14px; line-height: 1.9; letter-spacing: -.015em; }.passage-text p { margin: 0 0 8px; }.passage-text p:last-child { margin: 0; }.passage-text .sentence-line { transition: .2s ease; border-radius: 5px; padding: 1px 3px; cursor: pointer; }.passage-text .sentence-line:hover, .passage-text .sentence-line.selected { background: rgba(255, 140, 118, .12); color: #ffd2c9; }
.student-step-label { gap: 11px; margin-top: 28px; }.student-step-label > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: #ffb2a3; background: rgba(255, 140, 118, .12); font-size: 9px; font-weight: 900; }.student-step-label strong, .student-step-label small { display: block; }.student-step-label strong { font-size: 12px; }.student-step-label small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.sentence-picker { display: grid; gap: 7px; margin-top: 12px; }.sentence-option { width: 100%; text-align: left; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: #cfd2de; padding: 11px 13px; font-size: 11px; line-height: 1.5; transition: .2s ease; }.sentence-option:hover { border-color: rgba(255, 140, 118, .4); }.sentence-option.active { border-color: rgba(255, 140, 118, .65); background: rgba(255, 140, 118, .08); color: #ffd6ce; box-shadow: inset 3px 0 0 var(--coral); }.sentence-option span { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 6px; background: #282d3d; color: var(--muted); font-size: 9px; margin-right: 8px; }.sentence-option.active span { background: rgba(255,140,118,.2); color: var(--coral); }
.exercise-type-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 12px; }.exercise-type-button { min-height: 75px; text-align: left; padding: 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: .2s ease; }.exercise-type-button:hover { border-color: rgba(166,140,255,.5); color: var(--text); }.exercise-type-button.active { color: #d8ceff; border-color: rgba(166,140,255,.55); background: rgba(166,140,255,.1); box-shadow: inset 0 2px 0 var(--purple); }.type-number { color: var(--purple); font-size: 9px; font-weight: 900; }.exercise-type-button strong, .exercise-type-button small { display: block; }.exercise-type-button strong { font-size: 10px; margin-top: 9px; line-height: 1.35; }.exercise-type-button small { color: var(--muted-2); font-size: 8px; margin-top: 3px; line-height: 1.3; }
.exercise-area { margin-top: 18px; }.exercise-card { border: 1px solid rgba(166,140,255,.27); border-radius: 14px; background: linear-gradient(135deg, rgba(166,140,255,.09), rgba(20,24,36,.7)); padding: 19px; }.exercise-card-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }.exercise-card-heading h2 { margin: 0; font-size: 14px; }.exercise-card-heading p { color: var(--muted); font-size: 10px; margin: 5px 0 0; }.exercise-number { color: #cfc4ff; background: #2e274b; border-radius: 7px; padding: 6px 8px; font-size: 9px; font-weight: 900; }.exercise-instruction { color: #c4c8d6; font-size: 11px; margin: 20px 0 13px; }.blank-sentence { padding: 15px; border-radius: 10px; background: #131721; border: 1px solid var(--line); color: #e9eaf1; line-height: 2; font-size: 15px; }.blank-input { min-width: 78px; width: 10ch; border: 0; border-bottom: 2px solid var(--purple); background: transparent; color: #f5c6bb; outline: none; text-align: center; font-weight: 800; padding: 1px 4px; }.blank-input:focus { border-color: var(--coral); }.blank-input.correct { border-color: var(--green); color: var(--green); }.blank-input.wrong { border-color: var(--coral); color: var(--coral); }.exercise-korean { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 11px 0 0; }.exercise-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }.hint-inline { color: #f7d78b; font-size: 10px; line-height: 1.4; }.submit-button { border: 0; border-radius: 9px; padding: 10px 14px; color: #191527; background: var(--purple); font-size: 11px; font-weight: 900; }.submit-button:hover { background: #b9a8ff; }.hint-banner { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; border: 1px solid rgba(247,205,118,.26); border-radius: 9px; background: rgba(247,205,118,.08); color: #f1d798; padding: 10px; font-size: 10px; line-height: 1.5; }.reveal-banner { border-color: rgba(118,220,156,.25); background: rgba(118,220,156,.08); color: #a4e9b9; }.ordering-source, .ordering-answer { display: flex; flex-wrap: wrap; gap: 7px; min-height: 44px; padding: 11px; border-radius: 10px; background: #131721; border: 1px solid var(--line); }.ordering-answer { border-color: rgba(166,140,255,.22); margin-top: 8px; }.ordering-label { color: var(--muted-2); font-size: 9px; font-weight: 800; margin: 15px 0 7px; }.word-chip { border: 1px solid rgba(166,140,255,.2); background: #2a2446; color: #d8d0ff; border-radius: 7px; padding: 7px 9px; font-size: 10px; transition: .15s ease; }.word-chip:hover { border-color: var(--purple); transform: translateY(-1px); }.word-chip.used { opacity: .3; cursor: not-allowed; }.word-chip.answer-chip { background: #3b304a; border-color: rgba(255,140,118,.26); color: #ffd5cb; }.empty-order { color: var(--muted-2); font-size: 10px; padding: 3px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50; padding: 11px 15px; border: 1px solid rgba(166,140,255,.35); border-radius: 10px; background: #292343; color: #e3ddff; box-shadow: var(--shadow); font-size: 11px; transition: .25s ease; }.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1150px) {
  .student-grid { grid-template-columns: repeat(3, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-layout { grid-template-columns: 1fr; }
  .saved-passages { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .topbar { height: 66px; padding: 0 18px; }.brand-caption, .connection-pill { display: none; }.topbar-actions { gap: 8px; }.ghost-button { font-size: 10px; }
  .app-body { display: block; }.sidebar { width: 100%; height: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; }.sidebar-label, .sidebar-footnote { display: none; }.sidebar-nav { display: flex; gap: 4px; overflow-x: auto; }.nav-item { justify-content: center; white-space: nowrap; padding: 8px 12px; }.nav-item.active { box-shadow: inset 0 -3px 0 var(--purple); }.nav-icon { display: none; }
  .main-view { padding: 28px 16px 55px; }.page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }.compact-heading { align-items: flex-start; }.heading-actions { width: 100%; }.heading-actions button { flex: 1; }.class-strip { align-items: flex-start; gap: 12px; }.class-strip-actions { align-items: flex-end; flex-direction: column; gap: 9px; }.section-heading-row { align-items: flex-start; flex-direction: column; }.filter-wrap { width: 100%; }.filter-chip { flex: 1; }
  .student-grid { grid-template-columns: repeat(2, 1fr); }.student-detail-panel { padding: 16px; }.detail-heading { flex-direction: column; }.detail-actions { justify-content: flex-start; }.detail-content { grid-template-columns: 1fr; }.detail-stats { grid-template-columns: repeat(3, 1fr); }
  .student-topline { height: 62px; padding: 0 16px; }.student-top-actions { gap: 8px; }.student-live { display: none; }.student-layout { display: block; }.student-sidebar { width: 100%; min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 17px 16px 14px; }.student-sidebar .student-progress { margin-bottom: 15px; }.student-sidebar-label { margin-top: 15px; }.assigned-passage { display: inline-flex; width: calc(50% - 4px); vertical-align: top; }.student-sidebar-tip { display: none; }.student-workspace { padding: 25px 16px 60px; }.exercise-type-grid { grid-template-columns: repeat(2, 1fr); }.exercise-type-button:last-child { grid-column: span 2; }.saved-passages { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .metric-grid { gap: 7px; }.metric-card { min-height: 114px; padding: 13px; }.metric-card strong { font-size: 24px; margin-top: 13px; }.student-grid { gap: 7px; }.student-card { padding: 11px 10px; }.student-card-avatar { width: 27px; height: 27px; }.student-person strong { font-size: 10px; }.student-current-title { font-size: 9px; }.student-current-type { font-size: 8px; }.detail-stats { grid-template-columns: repeat(2, 1fr); }.assignment-row { grid-template-columns: 1.4fr .8fr 32px; gap: 10px; }.assignment-row > span:nth-child(2), .assignment-row > span:nth-child(4), .assignment-header > span:nth-child(2), .assignment-header > span:nth-child(4) { display: none; }.assignment-header { grid-template-columns: 1fr 32px; }.assignment-row .assignment-progress { grid-column: 2; }.assignment-row .more-button { grid-column: 3; grid-row: 1; }.passage-text { font-size: 12px; }.blank-sentence { font-size: 13px; }.exercise-footer { align-items: flex-start; flex-direction: column; }.submit-button { width: 100%; }.preview-row { grid-template-columns: 22px 1fr; }.preview-row p + p { grid-column: 2; }.format-note code { font-size: 8px; }.topbar .avatar { width: 29px; height: 29px; }
}

/* Light canvas: the learning area stays white and calm while accents preserve the classroom hierarchy. */
body { background: var(--bg); }
.topbar { background: rgba(255, 255, 255, .94); }
.sidebar { background: #fbfcff; }
.sidebar-footnote { background: linear-gradient(135deg, #f3efff, #fbfcff); }
.nav-item.active { background: #eeeaff; color: #604ac6; }
.filter-chip.active { background: #eeeaff; color: #604ac6; }
.secondary-button { background: #f1eeff; color: #624ecb; }
.class-strip { background: linear-gradient(110deg, #ffffff, #f7f8fc); box-shadow: 0 14px 34px rgba(46, 55, 88, .08); }
.class-icon { background: #eeeaff; color: #624ecb; }
.metric-card { background: #ffffff; box-shadow: 0 7px 20px rgba(46, 55, 88, .05); }
.metric-card.metric-primary { background: linear-gradient(145deg, #f0edff, #ffffff); border-color: rgba(119, 96, 231, .22); }
.student-card { background: #ffffff; box-shadow: 0 7px 18px rgba(46, 55, 88, .04); }
.student-card:hover, .student-card.selected { background: #ffffff; box-shadow: 0 13px 24px rgba(46, 55, 88, .11); }
.student-current-title { color: #394158; }
.student-current-type { background: #f0edff; color: #624ecb; }
.student-detail-panel { background: linear-gradient(140deg, #ffffff, #f7f8fc); box-shadow: 0 18px 42px rgba(46, 55, 88, .1); }
.detail-sentence, .detail-stat { background: #ffffff; }
.detail-sentence-text { color: #293249; }
.detail-order .order-token { background: #f0edff; color: #624ecb; }
.detail-order .order-token.muted { background: #f0f1f6; color: #8a92a4; }
.panel { background: #ffffff; box-shadow: 0 8px 22px rgba(46, 55, 88, .04); }
.drop-zone { background: linear-gradient(145deg, #f5f2ff, #ffffff); }
.format-note { background: #fafaff; }
.content-preview { background: #ffffff; }
.empty-preview { background: #fbfcff; }
.saved-passage-card { background: #fafbfe; }
.assignment-panel { background: #ffffff; }
.student-view { background: var(--bg); }
.student-topline { background: rgba(255, 255, 255, .92); }
.student-sidebar { background: #fbfcff; }
.assigned-passage.active { background: #fff1ee; }
.passage-card { background: linear-gradient(140deg, #ffffff, #f8f9fc); box-shadow: 0 8px 24px rgba(46, 55, 88, .05); }
.passage-text { color: #2d354a; }
.sentence-option { background: #ffffff; }
.sentence-option.active { background: #fff1ee; color: #7b3f33; }
.sentence-option span { background: #f0f1f6; }
.exercise-type-button { background: #ffffff; }
.exercise-type-button.active { background: #f1eeff; }
.exercise-card { background: linear-gradient(135deg, #f4f1ff, #ffffff); }
.exercise-instruction { color: #596277; }
.blank-sentence, .ordering-source, .ordering-answer { background: #ffffff; color: #2d354a; }
.word-chip { background: #f0edff; color: #624ecb; }
.word-chip.answer-chip { background: #fff0ec; color: #9b4d3e; }
.toast { background: #eeeaff; color: #4934a6; box-shadow: 0 14px 32px rgba(46, 55, 88, .15); }
.drag-help { color: var(--purple); font-size: 9px; font-weight: 700; margin-left: 5px; }
.word-chip { touch-action: none; user-select: none; }
.word-chip.dragging { opacity: .45; transform: scale(.96); }
.word-chip.drop-target, .ordering-answer.drop-target { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255, 140, 118, .12); }
body.is-dragging-order { cursor: grabbing; }
.assignment-composer { margin-top: 14px; }
.assignment-form { display: grid; grid-template-columns: 1.2fr 1.2fr .8fr; gap: 15px; margin-top: 20px; }
.assignment-form label, .assignment-form fieldset { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 10px; }
.assignment-form select, .assignment-form input[type="date"] { width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; background: #fbfcff; color: var(--text); padding: 10px; font-size: 11px; outline: none; }
.assignment-form select:focus, .assignment-form input[type="date"]:focus { border-color: var(--purple); }
.assignment-form fieldset { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; }
.assignment-form legend { padding: 0; margin-bottom: 7px; }
.assignment-type-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.assignment-type-option { position: relative; cursor: pointer; }
.assignment-type-option input { position: absolute; opacity: 0; pointer-events: none; }
.assignment-type-option span { display: block; border: 1px solid var(--line); border-radius: 8px; background: #fbfcff; padding: 9px; color: var(--muted); font-size: 9px; line-height: 1.4; min-height: 47px; }
.assignment-type-option strong { color: var(--purple); margin-right: 5px; }
.assignment-type-option input:checked + span { border-color: rgba(166, 140, 255, .55); background: #f1eeff; color: #604ac6; }
.assignment-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; padding-top: 2px; }
.assignment-empty { padding: 24px; color: var(--muted); font-size: 11px; text-align: center; }
.assigned-empty { color: var(--muted-2); font-size: 10px; padding: 10px 8px; }

.parent-view { min-height: calc(100vh - 78px); background: var(--bg); }
.parent-dashboard { width: min(1040px, 100%); margin: 0 auto; padding: 48px 54px 80px; }
.parent-readonly-badge { border: 1px solid rgba(119, 217, 198, .35); background: #ecfbf7; color: #287b6e; border-radius: 8px; padding: 8px 10px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.parent-children-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin: 25px 0; }
.parent-child-card { border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 19px; box-shadow: 0 8px 22px rgba(46, 55, 88, .05); }
.parent-child-heading { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.parent-child-name { display: flex; gap: 10px; align-items: center; min-width: 0; }
.parent-child-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #287b6e; background: #dff7f1; font-size: 13px; font-weight: 900; }
.parent-child-name strong { display: block; font-size: 14px; }.parent-child-name small { display: block; color: var(--muted-2); margin-top: 3px; font-size: 10px; }
.parent-progress-value { color: var(--purple-deep); font-size: 20px; font-weight: 900; }
.parent-progress-track { height: 7px; margin: 18px 0 15px; overflow: hidden; border-radius: 10px; background: #eef0f6; }.parent-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #76d9c6, #7a63d8); }
.parent-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }.parent-stat { border-radius: 9px; background: #f7f8fb; padding: 9px; }.parent-stat span { display: block; color: var(--muted-2); font-size: 9px; }.parent-stat strong { display: block; color: var(--text); font-size: 13px; margin-top: 4px; }
.parent-assignment-panel { padding: 0; overflow: hidden; }.parent-assignment-list { padding: 0 20px 8px; }.parent-assignment-row { display: grid; grid-template-columns: minmax(0, 1.8fr) .8fr .8fr; gap: 16px; align-items: center; border-top: 1px solid var(--line); padding: 15px 0; }.parent-assignment-row:first-child { border-top: 0; }.parent-assignment-title strong, .parent-assignment-title small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.parent-assignment-title strong { font-size: 11px; }.parent-assignment-title small { color: var(--muted-2); font-size: 9px; margin-top: 4px; }.parent-assignment-progress { display: flex; gap: 7px; align-items: center; color: var(--purple-deep); font-size: 10px; font-weight: 800; }.parent-assignment-progress span { height: 5px; flex: 1; overflow: hidden; border-radius: 10px; background: #eef0f6; }.parent-assignment-progress i { display: block; height: 100%; border-radius: inherit; background: var(--purple); }.parent-assignment-due { color: var(--muted); font-size: 10px; text-align: right; }.parent-empty { color: var(--muted); font-size: 11px; padding: 24px 0; text-align: center; }
.mint-icon { color: #287b6e; background: #dff7f1; }
@media (max-width: 820px) { .parent-dashboard { padding: 28px 16px 60px; }.parent-stat-row { grid-template-columns: repeat(2, 1fr); }.parent-assignment-row { grid-template-columns: minmax(0, 1.4fr) .9fr; gap: 10px; }.parent-assignment-due { text-align: left; }.parent-assignment-progress { grid-column: 2; }.parent-assignment-title { grid-row: span 2; } }
@media (max-width: 1150px) {
  .assignment-form { grid-template-columns: 1fr 1fr; }
  .assignment-type-options { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .assignment-form { grid-template-columns: 1fr; }
  .assignment-form fieldset, .assignment-form-actions { grid-column: auto; }
  .assignment-type-options { grid-template-columns: repeat(2, 1fr); }
}
.student-stage-nav { display: flex; align-items: center; gap: 10px; min-height: 28px; margin-top: 26px; }
.student-stage-nav span { color: var(--muted-2); font-size: 10px; font-weight: 800; }
.stage-back-button { border: 0; background: transparent; color: var(--coral); font-size: 10px; font-weight: 800; padding: 5px 0; }
.stage-back-button:hover { color: #d95e4b; }
.selected-sentence-summary { display: none; margin-top: 23px; padding: 13px 15px; border: 1px solid rgba(255, 140, 118, .23); border-radius: 10px; background: #fff7f4; color: #8c5147; font-size: 11px; }
.selected-sentence-summary:not(.hidden) { display: block; }
.selected-sentence-summary strong { color: #6f372e; margin-left: 4px; }
.student-stage-nav.exercise-stage .stage-back-button { color: var(--purple-deep); }
.student-stage-nav.exercise-stage span { color: var(--purple-deep); }
@media (max-width: 820px) {
  .user-form { grid-template-columns: 1fr 1fr; }
  .user-form .primary-button { grid-column: 1 / -1; }
  .user-row { grid-template-columns: 1fr 80px 30px; }
  .user-row small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
