:root {
  --bg: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #eef0f4;
  --text: #1d2330;
  --muted: #667085;
  --border: #dde1e7;
  --accent: #1b6b4a;
  --accent-soft: #e2f1e9;
  --accent-text: #ffffff;
  --brand: #1b6b4a;
  --brand-deep: #0f4a33;
  --brand-warm: #e8663a;
  --cream: #faf6ee;
  --ok: #157f3b;
  --ok-soft: #ddf3e4;
  --warn: #b54708;
  --warn-soft: #fdf0d5;
  --danger: #b42318;
  --danger-soft: #fde5e3;
  --stage: #11141a;
  --tile: #222833;
  --speaking: #3ccf6e;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101318;
    --surface: #1a1e26;
    --surface-2: #232834;
    --text: #e6e9ef;
    --muted: #98a2b3;
    --border: #2e3440;
    --accent: #5fc795;
    --accent-soft: #17352a;
    --accent-text: #08150f;
    --brand: #6fd3a3;
    --brand-deep: #9be3c0;
    --brand-warm: #ff8f63;
    --cream: #141a17;
    --ok: #4ad37f;
    --ok-soft: #173524;
    --warn: #f5b84a;
    --warn-soft: #3a2d12;
    --danger: #f97066;
    --danger-soft: #3d1a17;
    --stage: #07090c;
    --tile: #1c212b;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }

button, input, select, textarea { font: inherit; color: inherit; }
button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 12px;
  white-space: nowrap;
}
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.danger { color: var(--danger); }
button.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
button.small { padding: 2px 8px; font-size: 0.85rem; }
input, select, textarea {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 7px 10px;
  min-width: 0;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label.switch { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.muted { color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.badge {
  display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: 0.75rem; text-align: center; line-height: 1.5;
}

/* ───── 입장 페이지 ───── */
.landing { max-width: 880px; margin: 0 auto; padding: 32px 16px 48px; }
.landing h1 { margin: 0 0 4px; font-size: 1.6rem; }
.landing > p { margin: 0 0 24px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.card h2 { margin: 0 0 12px; font-size: 1.15rem; }
.card form { display: grid; gap: 10px; }
.card .code-input { font-size: 1.4rem; letter-spacing: 0.2em; text-transform: uppercase; text-align: center; }
.error { color: var(--danger); min-height: 1.5em; margin: 0; font-size: 0.9rem; }
.recent { margin-top: 12px; display: grid; gap: 6px; }
.recent a { color: var(--accent); }

/* ───── 수업 화면 레이아웃 ───── */
.app { height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 8px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); min-height: 52px;
}
.topbar h1 { margin: 0; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .code { font-family: ui-monospace, monospace; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); }
.status { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.status.bad { color: var(--danger); }
.workspace { display: grid; grid-template-columns: 1fr 360px; min-height: 0; }
.mainarea { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: auto; padding: 12px; gap: 12px; }
.sidebar { border-left: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button {
  flex: 1; border: 0; border-radius: 0; background: none; padding: 10px 8px;
  border-bottom: 2px solid transparent; color: var(--muted);
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.panel { flex: 1; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.panel.chatlike { padding: 0; gap: 0; }
.controls {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--border);
}
.controls button { min-width: 44px; min-height: 40px; }
.controls .sep { flex: 1; max-width: 24px; }

@media (max-width: 860px) {
  .app { height: auto; min-height: 100%; }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { border-left: 0; border-top: 1px solid var(--border); min-height: 420px; }
  .mainarea { overflow: visible; }
  .controls { position: sticky; bottom: 0; z-index: 5; }
  .topbar { flex-wrap: wrap; }
}

/* ───── 영상 ───── */
.stage {
  position: relative; background: var(--stage); border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; width: 100%; max-height: 62vh; flex-shrink: 0;
}
.stage > .tile { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.stage > .tile.pip { inset: auto 12px 12px auto; width: 22%; min-width: 120px; aspect-ratio: 16 / 9; border-radius: 8px; z-index: 2; box-shadow: 0 2px 12px #0008; }
.stage .empty { position: absolute; inset: 0; display: grid; place-items: center; color: #aab; text-align: center; padding: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.grid.big { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tile {
  position: relative; background: var(--tile); border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9;
  outline: 3px solid transparent; outline-offset: -3px; transition: outline-color 0.15s;
}
.tile.speaking { outline-color: var(--speaking); }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.screen video { object-fit: contain; background: #000; }
.tile .avatar {
  position: absolute; inset: 0; display: grid; place-items: center; color: #dde;
  font-size: 1.6rem; font-weight: 700;
}
.tile .label {
  position: absolute; left: 6px; bottom: 6px; right: 6px; display: flex; gap: 4px; align-items: center;
  font-size: 0.8rem; color: #fff; pointer-events: none;
}
.tile .label span {
  background: #000a; padding: 1px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tile .flag { position: absolute; top: 6px; right: 6px; font-size: 1.2rem; }
.section-title { margin: 0; font-size: 0.95rem; color: var(--muted); font-weight: 600; }

/* ───── 배너·알림 ───── */
.banner {
  border-radius: var(--radius); padding: 10px 14px; background: var(--accent-soft); color: var(--text);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.banner.warn { background: var(--warn-soft); }
.banner.ok { background: var(--ok-soft); }
.banner strong { color: var(--accent); }
.toast {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 50;
  background: #1d2330ee; color: #fff; padding: 10px 16px; border-radius: 10px; max-width: calc(100% - 32px);
}
.overlay {
  position: fixed; inset: 0; z-index: 40; background: #0009; display: grid; place-items: center; padding: 16px;
}
.overlay .card { max-width: 420px; width: 100%; display: grid; gap: 12px; }
.overlay video { width: 100%; aspect-ratio: 16 / 9; background: var(--stage); border-radius: 8px; object-fit: cover; }

/* ───── 채팅 ───── */
.chatlog { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-height: 160px; }
.chatmsg { max-width: 92%; }
.chatmsg .who { font-size: 0.75rem; color: var(--muted); }
.chatmsg .text { background: var(--surface-2); border-radius: 10px; padding: 6px 10px; white-space: pre-wrap; display: inline-block; }
.chatmsg.mine { align-self: flex-end; text-align: right; }
.chatmsg.mine .text { background: var(--accent); color: var(--accent-text); }
.chatmsg.teacher .text { background: var(--warn-soft); }
.chatmsg .scope { font-size: 0.7rem; padding: 0 5px; border-radius: 4px; background: var(--surface-2); margin-left: 4px; }
.chatform { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.chatform textarea, .chatform input { flex: 1; resize: none; }
.chat-note { padding: 6px 12px; font-size: 0.8rem; color: var(--muted); border-top: 1px solid var(--border); }

/* AI 조교 */
.ai-msg .text { white-space: normal; }
.ai-msg .text p { margin: 0.3em 0; }
.ai-msg .text :is(ul, ol) { margin: 0.3em 0; padding-left: 1.3em; }
.ai-msg .text table { border-collapse: collapse; font-size: 0.85rem; }
.ai-msg .text :is(td, th) { border: 1px solid var(--border); padding: 2px 6px; }
.ai-msg .text.pending::after { content: "생각하는 중…"; color: var(--muted); }

/* ───── 활동(퀴즈·투표) ───── */
.activity { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.activity h3 { margin: 0; font-size: 1.05rem; white-space: pre-wrap; }
.activity .kind { font-size: 0.75rem; color: var(--accent); font-weight: 700; }
.options { display: grid; gap: 6px; }
.options.ox { grid-template-columns: 1fr 1fr; }
.options.ox button { font-size: 2rem; padding: 12px; }
.options button { text-align: left; padding: 10px 12px; white-space: normal; }
.options button.chosen { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.options button.correct { outline: 3px solid var(--ok); }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; font-size: 0.9rem; }
.bar .track { grid-column: 1 / -1; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.3s; }
.bar.correct .fill { background: var(--ok); }
.bar.correct .name::after { content: " ✓ 정답"; color: var(--ok); font-weight: 700; }
.texts { display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.texts div { background: var(--surface-2); border-radius: 8px; padding: 4px 8px; font-size: 0.9rem; }

/* 선생님 패널 공통 */
.box { border: 1px solid var(--border); border-radius: 10px; padding: 10px; display: grid; gap: 8px; }
.box h4 { margin: 0; font-size: 0.95rem; }
.kind-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.option-row { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; }
.people { display: grid; gap: 4px; }
.person { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 8px; }
.person:hover { background: var(--surface-2); }
.person .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.person .dot.on { background: var(--ok); }
.person .acts { display: flex; gap: 2px; }
.person .acts button { padding: 2px 6px; font-size: 0.8rem; }
.person.hand { background: var(--warn-soft); }
.q { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: grid; gap: 4px; }
.q.done { opacity: 0.55; }
.q .meta { font-size: 0.75rem; color: var(--muted); }
.q .reply { font-size: 0.9rem; background: var(--ok-soft); border-radius: 6px; padding: 4px 8px; }
.sharebox { display: grid; gap: 6px; text-align: center; }
.sharebox .big { font-size: 2rem; font-weight: 800; letter-spacing: 0.2em; color: var(--accent); font-family: ui-monospace, monospace; }

/* ───── 소그룹 관찰 화면 ───── */
.monitor-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.timer { font-family: ui-monospace, monospace; font-size: 1.3rem; font-weight: 700; }
.timer.over { color: var(--danger); }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.roomcard {
  background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 10px; display: grid; gap: 8px; align-content: start; transition: border-color 0.15s;
}
.roomcard.focus { grid-column: 1 / -1; }
.roomcard.active-talk { border-color: var(--speaking); }
.roomcard.listening { border-color: var(--accent); }
.roomcard.help { border-color: var(--warn); }
.roomcard header { display: flex; gap: 8px; align-items: center; }
.roomcard header h3 { margin: 0; font-size: 1rem; }
.roomcard .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.roomcard.focus .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.roomcard .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.roomcard .actions button { flex: 1; }
.talk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.talk-dot.on { background: var(--speaking); box-shadow: 0 0 0 4px #3ccf6e44; }
.group-edit { display: grid; gap: 8px; }
.group-edit .g { border: 1px solid var(--border); border-radius: 10px; padding: 8px; display: grid; gap: 4px; }
.group-edit .g .members { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 99px; padding: 1px 4px 1px 10px; font-size: 0.85rem; }
.chip select { padding: 0 2px; font-size: 0.8rem; border: 0; background: transparent; }

@media (max-width: 600px) {
  .grid, .grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .rooms { grid-template-columns: 1fr; }
  .controls { gap: 4px; padding: 6px; }
  .controls button { padding: 4px 8px; font-size: 0.85rem; min-height: 36px; }
  .controls .sep { display: none; }
  .mainarea { padding: 8px; gap: 8px; }
  .topbar { padding: 6px 10px; gap: 8px; }
}

/* ───── 첫 화면·출결 기록 ───── */
.card.narrow { max-width: 440px; }
.card .dev { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 12px; }
a.button {
  display: inline-block; text-decoration: none; color: var(--text); border: 1px solid var(--border);
  background: var(--surface); border-radius: 8px; padding: 6px 12px; white-space: nowrap;
}
a.button.small { padding: 2px 8px; font-size: 0.85rem; }
a.button:hover { border-color: var(--accent); }
.page-tabs { margin: 8px 0 16px; border-bottom: 1px solid var(--border); }
.page-tabs button { flex: 0 0 auto; padding: 10px 18px; }
.class-pick { text-align: left; white-space: normal; }
.class-pick.on { background: var(--accent-soft); border-color: var(--accent); }
.table-wrap { overflow-x: auto; }
table.att { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
table.att th, table.att td { border-bottom: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; white-space: nowrap; }
table.att th { color: var(--muted); font-weight: 600; }
table.att td.num { text-align: right; }
table.att tr.absent td { color: var(--danger); }
.ok-text { color: var(--ok); }
.sessions { font-size: 0.8rem; color: var(--muted); }
.monitor-head .danger.solid { animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.75; } }
.events { display: grid; gap: 2px; font-size: 0.85rem; max-height: 220px; overflow: auto; margin-top: 6px; }
.ev.leave { color: var(--warn); }
table.att tr.rejoined td:first-child { box-shadow: inset 3px 0 var(--warn); }
.sessions .gap { color: var(--warn); }
table.att td:last-child { white-space: normal; min-width: 240px; }
.sessions > div { white-space: normal; }
.hint { margin: 0 0 0 26px; font-size: 0.8rem; }
.q.pending-reply { border-style: dashed; }
.landing > .row h1 { min-width: max-content; }
@media (max-width: 600px) { #who { font-size: 0.8rem; } }
table.att.grade td.answer { white-space: normal; min-width: 160px; }
table.att.grade td:last-child { min-width: 180px; }
table.att.grade tr.ungraded td:first-child { box-shadow: inset 3px 0 var(--accent); }
.result-class { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.result-class summary { cursor: pointer; }
.result-class .q { margin-top: 6px; }

/* 강좌·수강신청 */
.live-now { display: grid; gap: 8px; }
.live-item { display: flex; gap: 10px; align-items: center; border: 2px solid var(--accent); border-radius: 10px; padding: 10px 12px; background: var(--accent-soft); }
.course-line { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 0; }
.status { font-size: 0.8rem; padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.status.approved { background: var(--ok-soft); color: var(--ok); }
.status.pending { background: var(--warn-soft); color: var(--warn); }
.status.rejected { background: var(--danger-soft); color: var(--danger); }
#my-courses .row, #open-courses .row { border-bottom: 1px solid var(--border); padding: 6px 0; flex-wrap: nowrap; }
.course-card.archived { opacity: 0.7; }
details.card > summary { cursor: pointer; }
.course-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.course-form label, .course-form .period { display: grid; gap: 4px; font-size: 0.9rem; color: var(--muted); }
.course-form input { color: var(--text); }
.course-form .wide { grid-column: 1 / -1; }
.course-info { font-size: 0.85rem; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.course-form .period .row { flex-wrap: nowrap; }
.course-form .period input { flex: 1; min-width: 0; }
.approve-form { display: grid; gap: 6px; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--border); }
.approve-form .row { font-size: 0.9rem; }
.course-form label.pledge { display: grid; gap: 4px; background: var(--surface-2); padding: 8px 10px; border-radius: 8px; }
.course-form label.pledge span { color: var(--text); }
.course-form label.pledge .muted { font-size: 0.85rem; color: var(--muted); }
.course-form textarea { color: var(--text); }

/* ───── 자료 발표(PDF)·화이트보드 ───── */
.present { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.present-area {
  position: relative; display: grid; place-items: center; width: 100%;
  min-height: 120px; background: var(--stage); border-radius: var(--radius); overflow: hidden;
}
.sheet { position: relative; background: #fff; box-shadow: 0 2px 16px #0006; }
.sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sheet canvas.ink.drawable { cursor: crosshair; touch-action: none; }
.present-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #ccd; }
.present-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.present-bar:empty { display: none; }
.present-bar .pageno { min-width: 4.5em; text-align: center; font-variant-numeric: tabular-nums; }
.present-bar .sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.present-bar .tool { min-width: 36px; font-size: 1.05rem; }
.present-bar .tool.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.small-switch { font-size: 0.85rem; }
.banner.ask { position: sticky; top: 0; z-index: 5; }
#people button.off { opacity: 0.55; border-style: dashed; }

/* ───── 이용약관·처리방침·보호자 안내문 ───── */
.site-footer { margin: 28px 0 8px; text-align: center; font-size: 0.85rem; color: var(--muted); }
.site-footer a { color: var(--muted); }
.agree-box { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.ai-gate { flex-wrap: wrap; align-items: center; }
.doc { max-width: 860px; line-height: 1.7; }
.doc h2 { font-size: 1.1rem; margin: 22px 0 6px; }
.doc table { font-size: 0.9rem; }
.doc td { vertical-align: top; }
.doc .table-wrap { overflow-x: auto; }
.consent-form { margin-top: 28px; }
.consent-form .cut { color: var(--muted); text-align: center; overflow: hidden; white-space: nowrap; }
.consent-form .sign td { padding: 12px 8px; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .doc { max-width: none; font-size: 11pt; line-height: 1.5; }
  .consent-form { break-inside: avoid; }
}
.doc p, .doc li { color: var(--text); }
@media print { .doc p, .doc li, .doc td { color: #000; } }

/* ───── 지난 수업 자료 ───── */
.materials { max-width: 1000px; }
.material-item { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; color: var(--text); text-decoration: none; }
.material-item:hover, .material-link:hover { outline: 2px solid var(--accent); }
.material-link { color: var(--text); text-decoration: none; }
.m-items { flex-wrap: wrap; margin-bottom: 8px; }

/* ───── 과제 ───── */
.assign-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.assign-item { margin-bottom: 8px; }
.assign-desc { white-space: pre-wrap; font-size: 0.9rem; margin: 6px 0; }
.assign-student { border-top: 1px solid var(--border); padding: 10px 0; }
.assign-student summary { cursor: pointer; list-style: revert; }
.assign-submit { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; align-items: flex-start; }
.assign-submit textarea { width: 100%; }

/* ───── 강의 녹화 ───── */
.banner.rec { background: #fde8e7; color: #8a1c13; }
@media (prefers-color-scheme: dark) { .banner.rec { background: #4a1714; color: #ffd9d5; } }
#rec-btn.recording { background: var(--danger); color: #fff; border-color: var(--danger); animation: rec-pulse 1.6s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: 0.75; } }
.banner.rec strong { color: inherit; }

/* ───────────── 외솔온닷: 공통 머리글·첫 화면·안내 화면 ───────────── */
@font-face {
  font-family: "WaesolBrand"; font-weight: 700; font-display: swap;
  src: url("/static/live/fonts/gowun-batang-bold-subset.woff2") format("woff2");
}
.site-header {
  position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.site-header-in { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; font-family: "WaesolBrand", "Nanum Myeongjo", serif;
  font-weight: 700; font-size: 1.65rem; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; margin-right: 8px; border-radius: 9px; background: url("/static/live/favicon.svg") center / cover; flex: none; }
.brand-a { color: var(--brand); }
.brand-b { color: var(--brand-warm); position: relative; }
.brand-b::after { content: ""; position: absolute; right: -7px; top: 2px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-warm); }
.site-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { padding: 8px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.site-nav a:hover { background: var(--accent-soft); }
.site-nav a.on { background: var(--brand); color: #fff; }
.site-user { white-space: nowrap; font-size: 0.9rem; color: var(--brand); font-weight: 700; text-decoration: none;
  border: 1.5px solid var(--brand); border-radius: 999px; padding: 6px 12px; }
@media (max-width: 760px) {
  .site-header-in { flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px; }
  .brand { font-size: 1.4rem; }
  .site-user { margin-left: auto; }
  .site-nav { order: 3; flex-basis: 100%; }
  .site-nav a { padding: 6px 10px; font-size: 0.9rem; }
}
body.site { background: linear-gradient(180deg, var(--cream) 0, var(--bg) 420px); }

/* 첫 화면 (로그인 전) */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; padding: 28px 0 8px; }
.hero-kicker { color: var(--brand); font-weight: 700; margin: 0 0 8px; letter-spacing: 0.02em; }
.landing .hero-title, .hero-title { font-family: "WaesolBrand", serif; font-size: clamp(1.9rem, 4.4vw, 2.8rem); line-height: 1.25; margin: 0 0 14px; color: var(--brand-deep); }
.hero-title span { color: var(--brand-warm); }
.hero-sub { color: var(--muted); line-height: 1.7; margin: 0; }
.start-box { box-shadow: 0 10px 30px rgba(15, 74, 51, 0.12); }
.start-choices { display: grid; gap: 10px; }
.start-choice { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left;
  padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer;
  white-space: normal; width: 100%; min-width: 0; }
.start-choice:hover { border-color: var(--brand); background: var(--accent-soft); }
.start-choice .sc-ico { grid-row: span 2; font-size: 1.8rem; align-self: center; }
.start-choice strong { font-size: 1.05rem; color: var(--text); }
.start-choice small { color: var(--muted); }
.login-chosen { font-weight: 700; color: var(--brand); margin: 0 0 4px; }
.link-btn { background: none; border: none; color: var(--muted); padding: 6px 0; cursor: pointer; text-decoration: underline; font-size: 0.9rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 24px 0; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.feature h3 { margin: 6px 0 4px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.f-ico { font-size: 1.6rem; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding-top: 12px; } }
.mypage-bar { margin-bottom: 12px; }
.mypage-title { font-size: 1.35rem !important; color: var(--brand-deep); }

/* 안내 화면 (소개·수강안내·수업신청·이용안내) */
.site-main { max-width: 1000px; margin: 0 auto; padding: 8px 16px 40px; }
.page-hero { padding: 28px 0 14px; }
.page-hero h1 { font-family: "WaesolBrand", serif; color: var(--brand-deep); font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0 0 6px; }
.page-hero p { color: var(--brand-warm); font-weight: 700; margin: 0; }
.info-block { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin: 14px 0; line-height: 1.7; }
.info-block h2 { margin: 0 0 8px; font-size: 1.2rem; color: var(--brand-deep); }
.role-list { margin: 0; padding-left: 18px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.button.big { padding: 12px 20px; font-size: 1.02rem; border-radius: 12px; }
.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; }
.steps li span { color: var(--muted); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.info-card h3 { margin: 0 0 6px; font-size: 1rem; }
.info-card p { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.6; }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.course-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.course-tile h3 { margin: 8px 0 4px; font-size: 1.08rem; }
.course-tile p { margin: 4px 0 0; font-size: 0.92rem; }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--brand); color: #fff; margin-right: 4px; }
.tag.soft { background: var(--accent-soft); color: var(--brand-deep); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { color: var(--muted); line-height: 1.7; margin: 8px 0 0; }
.doc-links { font-size: 0.9rem; }
.grade-pick .row { gap: 14px; margin-top: 4px; }

/* 회원 탈퇴 (내 정보 맨 아래, 접혀 있음) */
.withdraw { margin-top: 22px; border-top: 1px solid var(--border); padding-top: 12px; font-size: 0.9rem; }
.withdraw summary { cursor: pointer; color: var(--muted); }
.withdraw p { margin: 8px 0; line-height: 1.6; }

/* 강좌 개설 양식 (과목·학기·모집·팀티칭) */
.course-form-full fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 14px; margin: 0; min-width: 0; }
.course-form-full legend { font-weight: 700; color: var(--brand-deep); padding: 0 6px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; align-items: end; }
.course-grid .wide { grid-column: 1 / -1; }
.course-form label.switch { display: flex; align-items: center; gap: 6px; color: var(--text); }
.course-form select, .course-form textarea { color: var(--text); width: 100%; }
.course-form .row label:not(.switch) { display: grid; }
.course-form .row > span { font-size: 0.9rem; color: var(--muted); }
.co-teachers { display: grid; gap: 4px; }
.edit-box { margin-top: 8px; }
/* 강좌 안내 (과목·학점·평가·모집) */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 6px 0; font-size: 0.85rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.course-more summary { cursor: pointer; font-size: 0.85rem; color: var(--brand); }
.tag.off { background: var(--surface-2); color: var(--muted); }
.ct-desc { white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ───────── 메인 (전광판 · 동그란 바로가기 · 공지 · 강좌) ───────── */
.site-main.home { max-width: none; padding: 0 0 40px; }
.billboard { position: relative; overflow: hidden; background: var(--brand-deep); }
.bb-track { display: flex; transition: transform 0.6s cubic-bezier(.4, 0, .2, 1); }
.bb-slide { position: relative; flex: 0 0 100%; min-height: 340px; display: flex; align-items: center; background-size: cover; background-position: center; color: #fff; }
.bb-in { width: 100%; max-width: 1100px; margin: 0 auto; padding: 36px 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.bb-text { max-width: 560px; position: relative; z-index: 1; }
.bb-kicker { display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,0.22); font-weight: 700; font-size: 0.9rem; }
.bb-text h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 4.2vw, 2.6rem); line-height: 1.25; letter-spacing: -0.02em; word-break: keep-all; }
.bb-text p { margin: 0 0 18px; font-size: clamp(0.95rem, 2vw, 1.1rem); opacity: 0.95; word-break: keep-all; }
.bb-btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: #fff; color: var(--brand-deep); font-weight: 800; text-decoration: none; box-shadow: 0 6px 16px rgba(0,0,0,0.18); transition: transform .15s; }
.bb-btn:hover { transform: translateY(-2px); }
.bb-art { flex: 0 0 auto; width: min(36vw, 340px); }
.bb-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,0.18)); }
.bb-cover { position: absolute; inset: 0; z-index: 2; }
.theme-green { background-color: #1b6b4a; background-image: radial-gradient(circle at 85% 20%, #2f8f65 0, transparent 45%), radial-gradient(circle at 10% 90%, #145538 0, transparent 40%); }
.theme-orange { background-color: #e8663a; background-image: radial-gradient(circle at 85% 20%, #f39065 0, transparent 45%), radial-gradient(circle at 10% 90%, #c94f25 0, transparent 40%); }
.theme-blue { background-color: #3d63dd; background-image: radial-gradient(circle at 85% 20%, #6d8cf0 0, transparent 45%), radial-gradient(circle at 10% 90%, #2b4bb5 0, transparent 40%); }
.theme-purple { background-color: #7a4fd6; background-image: radial-gradient(circle at 85% 20%, #9d7ae8 0, transparent 45%), radial-gradient(circle at 10% 90%, #5d36b3 0, transparent 40%); }
.theme-yellow { background-color: #f4b400; color: #3a2a00; background-image: radial-gradient(circle at 85% 20%, #ffd34d 0, transparent 45%); }
.theme-yellow .bb-kicker { background: rgba(255,255,255,0.5); }
.bb-slide.has-image .bb-text { background: linear-gradient(90deg, rgba(0,0,0,0.45), rgba(0,0,0,0)); padding: 18px 22px; border-radius: 16px; }
.bb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.25); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.bb-nav:hover { background: rgba(255,255,255,0.4); }
.bb-nav.prev { left: 14px; }
.bb-nav.next { right: 14px; }
.bb-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.bb-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,0.5); cursor: pointer; transition: width .2s; }
.bb-dots button.on { width: 28px; background: #fff; }

.home-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.home-h { font-family: "WaesolBrand", serif; color: var(--brand-deep); font-size: 1.5rem; margin: 30px 0 18px; text-align: center; }
.home-h span { color: var(--brand-warm); }
.circles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.circles a { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 0.95rem; }
.circle { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 8px 18px rgba(15,74,51,0.15); transition: transform .2s; }
.circle svg { width: 52px; height: 52px; }
.circles a:hover .circle { transform: translateY(-4px) rotate(-4deg); }
.circle.c1 { background: linear-gradient(135deg, #ff8a5c, #e8663a); color: #e8663a; }
.circle.c2 { background: linear-gradient(135deg, #3fa77a, #1b6b4a); color: #1b6b4a; }
.circle.c3 { background: linear-gradient(135deg, #6d8cf0, #3d63dd); color: #3d63dd; }
.circle.c4 { background: linear-gradient(135deg, #ffcf4d, #f4a300); color: #c98500; }
.circle.c5 { background: linear-gradient(135deg, #b18cf2, #7a4fd6); color: #7a4fd6; }
.circle.c6 { background: linear-gradient(135deg, #ff8fb1, #e5507e); color: #e5507e; }
.home-cols { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 30px; }
.home-box { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; margin-top: 16px; }
.home-cols .home-box { margin-top: 0; }
.home-box-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.home-box-h h2 { margin: 0; font-size: 1.1rem; color: var(--brand-deep); }
.home-box-h a { font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 2px; border-bottom: 1px dashed var(--border); }
.notice-list li:last-child { border-bottom: 0; }
.notice-list a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-list a:hover { color: var(--brand); text-decoration: underline; }
.notice-list .muted { flex: 0 0 auto; font-size: 0.85rem; }
.notice-list.big li { padding: 13px 4px; font-size: 1.02rem; }
.new-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%; background: var(--brand-warm); color: #fff; font-size: 0.7rem; font-weight: 800; vertical-align: 2px; }
.notice-view h2 { margin: 0 0 4px; }
.notice-body { white-space: pre-wrap; line-height: 1.8; margin-top: 16px; }
.login-box .start-choice { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); margin-bottom: 8px; padding: 12px 14px; }
.login-box .hello { margin: 0 0 10px; }
.home-courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mini-course { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: var(--text); border: 1px solid var(--border); transition: transform .15s, box-shadow .15s; }
.mini-course:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,0.08); }
.mini-course strong { font-size: 1.05rem; }
.mini-course .muted, .mc-meta { font-size: 0.82rem; }
.mc-badge { justify-self: start; font-size: 0.72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #fff; }
.hue-0 { background: #eaf6ef; } .hue-0 .mc-badge { color: #1b6b4a; }
.hue-1 { background: #fff1e9; } .hue-1 .mc-badge { color: #c94f25; }
.hue-2 { background: #edf1ff; } .hue-2 .mc-badge { color: #3d63dd; }
.hue-3 { background: #fff8e1; } .hue-3 .mc-badge { color: #a87400; }
.hue-4 { background: #f4eeff; } .hue-4 .mc-badge { color: #7a4fd6; }
@media (max-width: 760px) {
  .bb-slide { min-height: 260px; }
  .bb-in { padding: 26px 20px 44px; }
  .bb-art { width: 34vw; }
  .bb-nav { display: none; }
  .circles { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
  .circle { width: 72px; height: 72px; }
  .circle svg { width: 40px; height: 40px; }
  .home-cols { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .bb-art { display: none; } }
@media (prefers-color-scheme: dark) {
  .hue-0, .hue-1, .hue-2, .hue-3, .hue-4 { background: var(--surface-2); }
}
/* 메인 화면 제목용 둥근 글꼴 (배달의민족 주아체, SIL OFL — fonts/OFL-Jua.txt) */
@font-face { font-family: "WaesolFun"; src: url("/static/live/fonts/jua-subset.woff2") format("woff2"); font-display: swap; }
.bb-text h2, .bb-btn, .circles a, .home-box-h h2, .mini-course strong { font-family: "WaesolFun", system-ui, sans-serif; font-weight: 400; }
.bb-text h2 { font-size: clamp(1.8rem, 4.6vw, 2.9rem); }
.circles a { font-size: 1.05rem; }
.home-box-h h2 { font-size: 1.25rem; }
.home-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.home-cols > * { min-width: 0; }
.notice-list li > a { min-width: 0; }
@media (max-width: 760px) { .home-cols { grid-template-columns: minmax(0, 1fr); } }
/* 머리글 오른쪽: 이름(역할) · 내 정보 · 로그아웃 */
.site-user-box { display: flex; align-items: center; gap: 6px; flex: none; }
.site-me { display: grid; line-height: 1.15; text-align: right; text-decoration: none; color: var(--text); margin-right: 2px; }
.site-me strong { font-size: 0.92rem; max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-me span { font-size: 0.72rem; color: var(--brand); font-weight: 700; }
.site-user-box button.small { padding: 5px 10px; font-size: 0.82rem; white-space: nowrap; }
@media (max-width: 760px) {
  .site-user-box { margin-left: auto; }
  .site-me strong { max-width: 6.5em; }
}
@media (max-width: 380px) { .site-me span { display: none; } }
/* 상단 메뉴 글씨 크게 */
.site-nav a { font-size: 1.08rem; padding: 9px 14px; }
@media (max-width: 760px) { .site-nav a { font-size: 1rem; padding: 7px 11px; } }

/* 강좌 머리 그림 (교과 색·학년 동그라미·모집 상태) */
.thumb { position: relative; height: 112px; border-radius: 14px 14px 0 0; background: linear-gradient(135deg, var(--a), var(--b)); overflow: hidden; }
.thumb::before { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.thumb::after { content: ""; position: absolute; left: 30%; bottom: -40px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.thumb-ico { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 3rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.18)); }
.thumb-grade { position: absolute; left: 12px; top: 12px; z-index: 1; width: 50px; height: 50px; border-radius: 50%; background: #fff; color: var(--b);
  display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 0.92rem; line-height: 1.1; box-shadow: 0 3px 8px rgba(0,0,0,0.15); }
.thumb-grade.long { font-size: 0.72rem; }
.thumb-sub { position: absolute; left: 72px; right: 84px; top: 26px; color: #fff; font-weight: 800; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb-state { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 5px 0; text-align: center; font-size: 0.82rem; font-weight: 800; color: #fff; background: rgba(10, 30, 25, 0.35); }
.thumb-state.open { background: rgba(232, 102, 58, 0.92); }
.thumb-state.before { background: rgba(61, 99, 221, 0.85); }
.thumb-state.running { background: rgba(27, 107, 74, 0.9); }
.course-tile.with-thumb { padding: 0; overflow: hidden; }
.course-tile .ct-body { padding: 12px 16px 16px; }
.mini-course.with-thumb { padding: 0 0 14px; overflow: hidden; background: var(--surface); }
.mini-course.with-thumb > :not(.thumb) { margin: 0 14px; }
.mini-course.with-thumb .thumb { height: 96px; border-radius: 0; margin-bottom: 8px; }

/* ───────── 수강안내 ───────── */
.g-hero { background: linear-gradient(120deg, #1b6b4a, #2f8f65 55%, #7fc8a9); color: #fff; overflow: hidden; }
.g-hero-in { max-width: 1100px; margin: 0 auto; padding: 34px 40px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.g-hero h2 { font-family: "WaesolFun", system-ui, sans-serif; font-weight: 400; font-size: clamp(1.8rem, 4.4vw, 2.8rem); line-height: 1.25; margin: 0 0 12px; }
.g-hero h2 b { font-weight: 400; color: #ffe08a; }
.g-hero p { margin: 0 0 12px; opacity: 0.95; }
.g-art { width: min(40vw, 360px); flex: none; }
.g-art svg { width: 100%; height: auto; display: block; }
.g-title { margin-top: 34px; }
.g-toc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 8px; }
.g-toc a { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 700; }
.g-toc a b { color: var(--brand-warm); }
.g-toc a:hover { border-color: var(--brand); }
.g-anchor { position: relative; top: -90px; }
.g-step { margin: 26px 0 0; }
.g-step-h { font-size: 1.25rem; color: var(--brand-deep); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); }
.g-step-h span { font-family: "WaesolFun", system-ui, sans-serif; font-weight: 400; color: var(--brand-warm); margin-right: 4px; }
.g-step-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 22px; align-items: start; }
.g-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.g-points li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.g-points .num, .pin { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.95rem; }
.g-points .num { border: 2.5px solid var(--brand-warm); color: var(--brand-warm); background: var(--surface); }
.g-points p { margin: 3px 0 0; line-height: 1.7; word-break: keep-all; }
.mock { position: relative; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 10px 26px rgba(15,74,51,0.12); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--surface-2); font-size: 0.75rem; color: var(--muted); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff6b5c; }
.mock-bar i:nth-child(2) { background: #ffbd2e; } .mock-bar i:nth-child(3) { background: #28c840; }
.mock-bar span { margin-left: 8px; padding: 2px 10px; border-radius: 6px; background: var(--surface); flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mock-body { position: relative; padding: 16px 16px 16px 46px; display: grid; gap: 10px; font-size: 0.85rem; pointer-events: none; user-select: none; }
.pin { position: absolute; z-index: 2; background: var(--brand-warm); color: #fff; box-shadow: 0 0 0 4px rgba(232,102,58,0.25); }
.m-row { display: flex; gap: 8px; }
.m-choice { flex: 1; padding: 12px; border: 1.5px solid var(--border); border-radius: 12px; }
.m-choice.on { border-color: var(--brand-warm); background: #fff4ee; box-shadow: 0 0 0 3px rgba(232,102,58,0.15); }
.m-google { padding: 10px; border: 1px solid var(--border); border-radius: 8px; text-align: center; font-weight: 700; color: #3c4043; }
.m-form { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.m-form em { font-style: normal; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1px 8px; margin-left: 4px; }
.m-agree { color: var(--brand-deep); font-weight: 700; }
.m-search { flex: 1; padding: 9px 12px; border: 2px solid var(--brand-warm); border-radius: 10px; color: var(--muted); }
.m-select { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; }
.m-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.m-tile { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: grid; gap: 2px; padding-bottom: 8px; }
.m-tile b, .m-tile small { padding: 0 8px; }
.m-tile small { color: var(--muted); font-size: 0.72rem; }
.m-tile .thumb { height: 80px; border-radius: 0; margin-bottom: 4px; }
.m-tile .thumb-grade { width: 38px; height: 38px; font-size: 0.66rem; left: 8px; top: 8px; }
.m-tile .thumb-sub { display: none; }
.m-tile .thumb-ico { font-size: 2rem; right: 10px; }
.m-tile .thumb-state { font-size: 0.7rem; padding: 3px 0; }
.m-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.m-line small { display: block; color: var(--muted); font-size: 0.75rem; }
.m-btn { flex: none; padding: 6px 12px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 700; font-size: 0.8rem; }
.m-btn.ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.m-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.m-flow span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 0.78rem; }
.m-flow span.done { background: var(--accent-soft); color: var(--brand-deep); }
.m-flow span.now { background: #fff1e9; color: var(--brand-warm); box-shadow: 0 0 0 2px rgba(232,102,58,0.3); }
.m-flow i { color: var(--muted); font-style: normal; }
.m-live { display: grid; gap: 8px; }
.m-now { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-weight: 700; color: var(--brand-deep); }
.m-stage { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.m-slide { position: relative; display: grid; gap: 6px; align-content: start; padding: 12px; border-radius: 10px; background: #fff; border: 1px solid var(--border); min-height: 110px; color: #1d2330; }
.m-slide span { height: 8px; border-radius: 4px; background: #dde3ea; }
.m-slide span.short { width: 60%; }
.m-slide em { position: absolute; right: 10px; bottom: 6px; font-style: normal; font-size: 1.4rem; }
.m-cams { display: grid; gap: 6px; }
.m-cam { display: grid; place-items: center; border-radius: 8px; background: #2b3442; color: #fff; font-size: 1.2rem; padding: 4px; }
.m-cam.t { background: #1b6b4a; }
.m-cam small { font-size: 0.65rem; opacity: 0.85; }
.m-quiz { padding: 8px 10px; border-radius: 10px; background: #fff8e1; color: #6b4e00; font-weight: 700; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.m-quiz span { padding: 2px 8px; border-radius: 6px; background: #fff; border: 1px solid #f0d58a; font-weight: 600; }
.m-bar { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 8px; border-radius: 10px; background: #1d2330; }
.m-bar span { padding: 5px 10px; border-radius: 8px; background: #2f3a4b; color: #fff; font-size: 0.78rem; }
.g-cta { justify-content: center; margin: 26px 0 0; }
@media (max-width: 760px) {
  .g-hero-in { padding: 24px 20px 14px; }
  .g-art { width: 38vw; }
  .g-step-in { grid-template-columns: minmax(0, 1fr); }
  .m-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .m-tiles .m-tile:nth-child(3) { display: none; }
}
@media (max-width: 420px) { .g-art { display: none; } }
.wish-box { margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.wish-box summary { cursor: pointer; }
.wish-box summary b { color: var(--brand); }
.wish-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.wish-table th, .wish-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
/* 소개: 시스템 특징 (선생님 / 학생) */
.sys-feat { display: grid; gap: 16px; margin: 0 0 22px; }
.sys-col { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; padding: 18px; border-radius: 20px; border: 2px dashed var(--border); background: var(--surface); }
.sys-who { display: grid; justify-items: center; gap: 6px; }
.sys-who svg { width: 96px; height: 88px; }
.sys-who b { font-family: "WaesolFun", system-ui, sans-serif; font-weight: 400; font-size: 1.6rem; }
.sys-col.teacher .sys-who { color: #2b4f8f; }
.sys-col.student .sys-who { color: #9c2f45; }
.sys-col ol { list-style: none; counter-reset: f; margin: 0; padding: 0; display: grid; gap: 8px; }
.sys-col li { counter-increment: f; position: relative; padding: 10px 14px 10px 46px; border-radius: 999px; line-height: 1.45; word-break: keep-all; }
.sys-col li::before { content: counter(f); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 0.85rem; }
.sys-col.teacher li { background: #e8f0fc; border: 1.5px solid #b9cdf0; }
.sys-col.teacher li::before { background: #4b74c4; }
.sys-col.student li { background: #fcebee; border: 1.5px solid #f0c0ca; }
.sys-col.student li::before { background: #c9506a; }
@media (prefers-color-scheme: dark) { .sys-col.teacher li, .sys-col.student li { background: var(--surface-2); border-color: var(--border); } }
@media (max-width: 640px) { .sys-col { grid-template-columns: 1fr; } .sys-col li { border-radius: 16px; } }
/* 고교학점제 */
.credit-hero { background: linear-gradient(120deg, #3d63dd, #6d8cf0 60%, #9fb6ff); }
.credit-badge { flex: none; width: 170px; height: 170px; border-radius: 50%; background: #fff; color: #2b4bb5; display: grid; place-content: center; text-align: center; box-shadow: 0 12px 30px rgba(0,0,0,0.2); }
.credit-badge b { font-family: "WaesolFun", system-ui, sans-serif; font-weight: 400; font-size: 3.4rem; line-height: 1; }
.credit-badge span { font-weight: 800; }
.credit-badge small { color: var(--muted); font-size: 0.75rem; }
.credit-lead { text-align: center; font-size: 1.08rem; line-height: 1.8; max-width: 760px; margin: 0 auto 18px; word-break: keep-all; }
.credit-flow { display: flex; align-items: stretch; gap: 8px; }
.credit-flow > div { flex: 1; text-align: center; padding: 16px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.credit-flow > i { align-self: center; font-style: normal; font-size: 1.6rem; color: var(--brand-warm); }
.cf-ico { display: block; font-size: 2rem; margin-bottom: 4px; }
.credit-flow b { font-family: "WaesolFun", system-ui, sans-serif; font-weight: 400; font-size: 1.15rem; color: var(--brand-deep); }
.credit-flow p { margin: 6px 0 0; font-size: 0.88rem; color: var(--muted); word-break: keep-all; }
.credit-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.credit-nums > div { text-align: center; padding: 18px 10px; border-radius: 18px; background: linear-gradient(160deg, #fff8e1, #fff); border: 1px solid #f3e2a9; }
.credit-nums b { display: block; font-family: "WaesolFun", system-ui, sans-serif; font-weight: 400; font-size: 2.4rem; color: #c27c00; }
.credit-nums small { font-size: 1rem; margin-left: 2px; }
.credit-nums p { margin: 4px 0 0; font-weight: 700; }
.credit-nums span { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.credit-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.credit-types .ct { padding: 16px; border-radius: 18px; color: #fff; }
.credit-types .ct b { font-family: "WaesolFun", system-ui, sans-serif; font-weight: 400; font-size: 1.3rem; }
.credit-types .ct p { margin: 8px 0 0; line-height: 1.55; word-break: keep-all; }
.credit-types .ct small { opacity: 0.9; }
.ct.common { background: linear-gradient(135deg, #7d8ba1, #56637a); }
.ct.general { background: linear-gradient(135deg, #3fa77a, #1b6b4a); }
.ct.career { background: linear-gradient(135deg, #ff8a5c, #e8663a); }
.ct.fusion { background: linear-gradient(135deg, #b18cf2, #7a4fd6); }
.credit-joint { padding: 20px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); line-height: 1.75; }
.credit-joint p { margin: 0 0 8px; word-break: keep-all; }
.credit-joint ul { margin: 0 0 6px; padding-left: 20px; }
.credit-note { font-size: 0.85rem; margin-top: 18px; }
@media (max-width: 760px) {
  .credit-flow { flex-direction: column; }
  .credit-flow > i { transform: rotate(90deg); }
  .credit-nums, .credit-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .credit-badge { width: 120px; height: 120px; }
  .credit-badge b { font-size: 2.4rem; }
}
@media (max-width: 420px) { .credit-badge { display: none; } }
/* 마이크 소리 막대 · 들어가기 전 카메라 미리보기 */
.meter { display: block; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3fbf7f, #1b9e5a); transition: width 0.06s linear; }
.meter.small { display: inline-block; width: 70px; height: 8px; vertical-align: middle; align-self: center; }
.meter.loud { border-color: #3fbf7f; }
.preview { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #1d2330; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview .preview-off { position: absolute; inset: 0; display: none; place-items: center; color: #cfd6e0; font-size: 0.95rem; }
.preview.off video { visibility: hidden; }
.preview.off .preview-off { display: grid; }

/* 수업 개설 신청 (3단계) */
.wizard { display: grid; gap: 12px; }
.wz-title { text-align: center; margin: 4px 0 4px; font-size: 1.35rem; color: var(--text); }
.wz-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.wz-step-btn { position: relative; padding: 14px 10px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--surface); color: var(--muted); font-weight: 800; cursor: pointer; }
.wz-step-btn.on { background: #ec6a1e; border-color: #ec6a1e; color: #fff; }
.wz-step-btn.now { box-shadow: 0 6px 14px rgba(236,106,30,0.3); }
.wz-step-btn:not(:last-child)::after { content: "··· ›"; position: absolute; right: -19px; top: 50%; transform: translateY(-50%); color: #ec6a1e; font-weight: 800; font-size: 0.75rem; letter-spacing: -1px; }
.wz-step { display: grid; gap: 10px; }
.wz-h { margin: 10px 0 0; font-size: 1.02rem; padding-bottom: 6px; border-bottom: 2px solid var(--text); }
.wz-table { display: grid; border-top: 1px solid var(--border); }
.wz-table.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.wz-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--border); min-height: 46px; }
.wz-label { padding: 8px 12px; background: var(--surface-2); align-self: stretch; display: flex; align-items: center; font-weight: 700; font-size: 0.9rem; }
.wz-cell { padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.wz-cell > input:not([type=checkbox]):not([type=radio]), .wz-cell > select, .wz-cell > textarea { flex: 1; min-width: 160px; }
.wz-cell textarea { width: 100%; }
.wz-cell .row { flex-wrap: wrap; gap: 6px; align-items: center; }
.wz-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.85rem; padding: 3px 10px 3px 4px; border: 1.5px solid var(--brand); border-radius: 999px; }
.wz-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.wz-toggle i { width: 34px; height: 20px; border-radius: 999px; background: #c5ccd6; position: relative; transition: background .15s; }
.wz-toggle i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .15s; }
.wz-toggle input:checked + i { background: var(--brand); }
.wz-toggle input:checked + i::after { left: 17px; }
.wz-toggle input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--brand-deep); font-size: 0.85rem; font-weight: 700; }
.chip button { border: 0; background: none; padding: 0 2px; cursor: pointer; color: inherit; font-size: 1rem; line-height: 1; }
.chip.fixed { background: var(--surface-2); color: var(--muted); }
.subject-browse { width: 100%; padding: 10px; border-radius: 10px; background: var(--surface-2); display: grid; gap: 8px; }
.subject-list { display: grid; gap: 8px; }
.subject-list b { font-size: 0.85rem; color: var(--brand-deep); }
.sess-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.sess-table th, .sess-table td { border-bottom: 1px solid var(--border); padding: 5px 6px; text-align: left; }
.sess-table th { background: var(--surface-2); }
.sess-table input { padding: 4px 6px; }
.sess-table td:nth-child(4) input { width: 100%; }
.sess-table .nowrap { white-space: nowrap; }
.wz-nav { margin-top: 4px; }
@media (max-width: 760px) {
  .wz-table.two { grid-template-columns: minmax(0, 1fr); }
  .wz-row { grid-template-columns: 96px minmax(0, 1fr); }
  .wz-steps { gap: 10px; }
  .wz-step-btn { font-size: 0.78rem; padding: 10px 4px; }
  .wz-step-btn:not(:last-child)::after { right: -11px; content: "›"; }
  .sess-table { display: block; overflow-x: auto; }
}

/* 학생 화면 구성 · 1:1 채팅 · 수강생 명단 */
.stage.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stage.duo > * { min-height: 0; }
.chatmsg.private { border-left: 3px solid #7a4fd6; background: color-mix(in srgb, #7a4fd6 8%, var(--surface)); }
.chatmsg.private > button { margin-top: 4px; }
.chatform select { flex: 0 0 auto; max-width: 9.5em; }
.layout-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; white-space: nowrap; }
.layout-pick select { padding: 4px 6px; }
.people-tools { gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.people-tools button { padding: 4px 10px; font-size: 0.85rem; }
.person.absent { opacity: 0.55; }
#debate-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#debate-bar[hidden] { display: none; }
/* 자료 확대: 종이를 키우고 보이는 부분만 자리 안에 */
.present-area.zoomed { display: block; }
.present-area.zoomed .sheet { position: absolute; }
.sheet canvas.ink.drawable.pan { cursor: grab; }
.reveal-preview { margin-top: 10px; padding: 10px; border: 2px dashed var(--border); border-radius: 14px; background: var(--surface-2); }
.activity.preview { pointer-events: none; }

/* ───── 노트북·태블릿 화면에 맞게 가로로 넓게 (세로로 길게 늘어지지 않게) ───── */
.landing { max-width: 1120px; padding: 24px 24px 48px; }
.site-header-in { max-width: 1160px; }
.site-main { max-width: 1080px; }
.home-wrap, .bb-in, .g-hero-in { max-width: 1120px; }
.materials { max-width: 1120px; }
.landing .card.narrow { max-width: none; }
#profile-view, #role-view { max-width: 720px !important; margin-left: auto; margin-right: auto; }
#guest-view { max-width: 980px !important; margin-left: auto; margin-right: auto; }
@media (min-width: 900px) {
  /* 학생 마이페이지: 카드를 두 줄로 나란히 */
  #student-view:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  #student-view > * { margin-top: 0 !important; }
  .landing > section.card.narrow[id^="student-"]:not([hidden]) { margin-top: 16px; }
  /* 강좌 개설: 표 두 칸 */
  .wz-row { grid-template-columns: 150px minmax(0, 1fr); }
}

/* 글자 줄 간격을 넉넉하게 (읽기 편하게). 버튼·입력칸은 너무 커지지 않게 그대로 */
body { line-height: 1.75; }
button, input, select, .button, .status, .tag, .chip, .badge, .wz-toggle { line-height: 1.4; }
.info-block, .faq p, .hero-sub, .g-points p, .credit-joint, .notice-body, .doc { line-height: 1.9; }
.info-card p, .feature p, .withdraw p, .facts, .course-info, .chatmsg .text, .sys-col li { line-height: 1.75; }

/* 선생님 마이페이지 탭 */
.no-access { margin: 40px 0; padding: 40px 16px; text-align: center; font-size: 1.15rem; font-weight: 700; color: var(--muted);
  border: 1px dashed var(--border); border-radius: 14px; }
.meet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.meet-grid form { display: flex; flex-direction: column; gap: 8px; }
.meet-grid .row input { flex: 1 1 0; min-width: 0; }
.meet-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border); }
.meet-row:last-child { border-bottom: 0; }
.meet-row .grow { min-width: 180px; }
.run-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.run-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 0 12px; text-align: left; white-space: normal;
  border: 1px solid var(--border); border-radius: 14px; background: var(--card, #fff); overflow: hidden; cursor: pointer; }
.run-tile:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.run-tile > :not(.run-thumb) { margin: 0 12px; }
.run-tile strong { margin-top: 8px !important; font-size: 1.05rem; }
.run-thumb { width: 100%; }
.sub-tabs { margin: 14px 0 12px; }
.sub-tabs button { flex: 0 0 auto; padding: 10px 18px; font-size: 1rem; }
.run-sub { min-height: 120px; }
.open-box { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0; }
.open-box label { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.course-notices { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.course-notices summary { cursor: pointer; }
@media (max-width: 760px) { .meet-grid { grid-template-columns: minmax(0, 1fr); } }
.log-table .pick-row { cursor: pointer; }
.log-table .pick-row:hover, .log-table .pick-row.on { background: var(--accent-soft); }
.log-table td.num { text-align: center; width: 4em; }
.link { color: var(--accent); text-decoration: underline; font-size: 0.85rem; }
.enroll-line { align-items: flex-start; }
.enroll-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.enroll-head .chip { font-size: 0.78rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.enroll-facts { font-size: 0.85rem; margin-top: 3px; }
.nowrap { white-space: nowrap; }

/* 수업신청자 관리: 검색 칸 */
.search-form { border-top: 2px solid var(--text, #222); }
.sf-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 120px minmax(0, 1fr); border-bottom: 1px solid var(--border); }
.sf-label { background: var(--surface-2, #f3f4f6); padding: 10px 12px; font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; }
.sf-field { padding: 6px 10px; display: flex; align-items: center; }
.sf-field > input, .sf-field > select { width: 100%; }
.sf-field.wide { grid-column: span 3; }
.sf-field .row input[type=date] { width: auto; }
.enroll-table th, .enroll-table td { text-align: center; white-space: nowrap; }
.accent-text { color: var(--accent); }
@media (max-width: 760px) {
  .sf-row { grid-template-columns: 96px minmax(0, 1fr); }
  .sf-field.wide { grid-column: span 1; }
}

/* 메인: 학생들이 듣고 싶은 과목 */
.wish-cloud { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.wish-item { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; }
.wish-top { display: flex; align-items: center; gap: 6px; }
.wish-top .wish-n { margin-left: auto; font-weight: 700; color: var(--accent); }
.wish-top .tag { font-size: 0.7rem; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.wish-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.wish-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7fc8a9, var(--accent)); }

/* 모둠 배정 보드 */
.group-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.group-edit .g.unassigned { background: var(--surface-2, #f3f4f6); }
.group-edit .pick { display: flex; align-items: center; gap: 4px; width: 100%; font-size: 0.88rem; }
.group-edit .pick .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-edit .pick .letters { display: flex; flex-wrap: wrap; gap: 2px; }
.group-edit .pick button.small { padding: 1px 7px; min-width: 26px; }
.group-board .members { flex-direction: column; }
/* 선생님 화면: 크게 보이는 화면 아래 학생은 작은 줄로 */
.grid.strip { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.notice-actions { margin: 0 0 12px; }
.notice-editor label:not(.switch) { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.notice-editor label.switch { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.notice-editor input:not([type=checkbox]), .notice-editor textarea { width: 100%; }
#notice-tools { display: inline-flex; gap: 6px; }
.site-main > #notice-tools, #notice-tools:has(.notice-editor) { display: block; }

/* 회원가입: 단계 표시와 약관 동의 */
.join-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 12px; counter-reset: step; flex-wrap: wrap; }
.join-steps li { counter-increment: step; display: flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.join-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-2, #eef0f3); font-weight: 700; font-size: 0.8rem; }
.join-steps li:not(:last-child)::after { content: "›"; margin-left: 4px; color: var(--border); }
.join-steps li.done::before { content: "✓"; background: var(--accent-soft); color: var(--accent); }
.join-steps li.now { color: var(--text, #222); font-weight: 700; }
.join-steps li.now::before { background: var(--accent); color: #fff; }
.consent-card .consent-all { display: flex; padding: 12px; border: 2px solid var(--accent); border-radius: 10px; margin-bottom: 10px; font-size: 1.02rem; }
.consent-item { margin-bottom: 12px; }
.consent-item > .switch { display: flex; margin-bottom: 6px; }
.consent-text { max-height: 190px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 0.85rem;
  line-height: 1.7; background: var(--surface-2, #f7f8fa); }
.consent-text h2 { font-size: 0.92rem; margin: 10px 0 4px; }
.consent-text p, .consent-text ul { margin: 4px 0; }
.consent-table th { white-space: nowrap; text-align: left; vertical-align: top; width: 7.5em; }
.req { color: #c0392b; font-size: 0.85rem; }

/* 수업 도구: 화면공유 · 문서공유 · 미디어공유 · 화이트보드 · 설문/퀴즈 · 스티커 */
.tool-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 4px; }
.media-share { background: #000; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; flex-shrink: 0; }
.media-share[hidden] { display: none; }
.media-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #1b1f27; color: #fff; }
.media-bar .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-stage { position: relative; aspect-ratio: 16 / 9; max-height: 62vh; width: 100%; }
.media-stage video, .media-stage iframe, .media-stage > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.media-stage audio { position: absolute; left: 5%; right: 5%; bottom: 16px; width: 90%; }
.media-audio { display: grid; place-items: center; font-size: 5rem; color: #fff; }
.sticker-wrap { position: relative; display: inline-block; }
.sticker-pop { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 30; width: 300px;
  background: var(--card, #fff); border: 1px solid var(--border); border-radius: 12px; padding: 10px; box-shadow: 0 8px 28px #0003; }
.sticker-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.sticker-grid button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; }
.sticker-grid .sticker-ico { font-size: 1.6rem; line-height: 1; }
.sticker-grid small { font-size: 0.72rem; color: var(--muted); }
.sticker-count { font-size: 0.8rem; color: #c58a00; font-weight: 700; }
.sticker-fx { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 100; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px; animation: sticker-pop 2.6s ease forwards; }
.sticker-fx .sticker-ico { font-size: 7rem; line-height: 1; filter: drop-shadow(0 6px 16px #0005); }
.sticker-fx .sticker-text { background: #000b; color: #fff; padding: 6px 14px; border-radius: 99px; font-weight: 700; font-size: 1rem; }
.sticker-fx.mine .sticker-ico { font-size: 9rem; }
@keyframes sticker-pop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.4); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  25% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -55%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -75%) scale(0.9); }
}
.form-sec { margin: 8px 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--accent); font-size: 1rem; color: var(--accent); }
.done-card { text-align: center; }
.done-card .join-steps { justify-content: center; }
.done-ico { font-size: 3.4rem; margin: 6px 0 0; }
.done-list { text-align: left; display: inline-block; margin: 6px auto 0; line-height: 1.9; }
.name-btn { font-weight: 600; text-decoration: none; color: var(--accent); padding: 0; }
.enroll-table tr.open-row td { background: var(--accent-soft); }
.enroll-table tr.detail-row > td { background: var(--surface-2, #f7f8fa); text-align: left; white-space: normal; padding: 10px 14px; }
.inner-table { width: 100%; background: var(--card, #fff); }
.inner-table th, .inner-table td { text-align: left !important; }
.enroll-table tr.gone-row td { color: var(--muted); background: var(--surface-2, #f7f8fa); }
.quit-cell { display: inline-flex; align-items: center; gap: 4px; }
.enroll-table td.contact-cell { white-space: nowrap; font-size: 0.85rem; text-align: left; line-height: 1.4; }
.enroll-table tr.detail-row .box { max-width: 1040px; }

/* 학습 관리 */
.learn-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.learn-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border-radius: 14px; text-align: left;
  border: 1px solid var(--border); background: var(--card, #fff); cursor: pointer; white-space: normal; }
.learn-card:hover { border-color: var(--accent); }
.learn-card.on { border: 2px solid var(--accent); background: var(--accent-soft); }
.learn-card .lc-label { font-size: 0.9rem; font-weight: 700; }
.learn-card .lc-big { font-size: 1.6rem; color: var(--accent); line-height: 1.2; }
.learn-card .lc-small { font-size: 0.78rem; color: var(--muted); }
.log-table tr.on td { background: var(--accent-soft); }
.log-table tr.detail-row > td { background: var(--surface-2, #f7f8fa); text-align: left; padding: 10px 12px; }
.tally { display: grid; gap: 4px; margin: 6px 0; }
.tally-row { display: grid; grid-template-columns: minmax(80px, 200px) 1fr 48px; gap: 8px; align-items: center; font-size: 0.88rem; }
.tally-bar { height: 10px; background: var(--surface-2, #eef0f3); border-radius: 99px; overflow: hidden; }
.tally-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.tally-n { text-align: right; }
@media (max-width: 760px) { .learn-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 소개: 온라인 공동교육과정이란? */
.oc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 28px; }
.oc-card { background: var(--card, #fff); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.oc-card h3 { margin: 8px 0 6px; font-size: 1.08rem; }
.oc-card p { margin: 0; line-height: 1.8; color: var(--text, #222); font-size: 0.95rem; }
.oc-tag { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 0.82rem; }
@media (max-width: 760px) { .oc-grid { grid-template-columns: minmax(0, 1fr); } }

/* ───── 선생님 수업 화면: 어두운 위 막대 · 왼쪽 도구 막대 · 어두운 영상 영역 · 오른쪽 참여자/채팅 ───── */
body.class-t { background: #1d2128; }
body.class-t .topbar { background: #2a2f37; color: #e9edf2; border-bottom: 1px solid #12151a; gap: 10px; }
body.class-t .topbar h1 { color: #fff; font-size: 1rem; }
body.class-t .topbar .code { color: #7fe0d0; }
body.class-t .topbar .tb-count, body.class-t .topbar .status { color: #b8c0cc; background: transparent; border-color: #444b56; }
body.class-t .topbar button:not(.danger):not(.primary), body.class-t .topbar .button { background: #3a404a; color: #e9edf2; border-color: #4a515c; }
body.class-t .topbar button.on { background: #1f7a5c; border-color: #1f7a5c; color: #fff; }
body.class-t .tb-center { display: flex; align-items: center; gap: 8px; }
body.class-t .tb-btn { min-height: 34px; }
body.class-t .layout-pick { color: #e9edf2; }
body.class-t .layout-pick select { background: #3a404a; color: #e9edf2; border-color: #4a515c; }
body.class-t .rec-btn { color: #ff6b6b !important; font-weight: 700; }
body.class-t .workspace { grid-template-columns: 78px minmax(0, 1fr) 340px; }
body.class-t .rail { background: #38b2ac; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 6px 4px; overflow-y: auto; }
body.class-t .rail-clock { color: #fff; font: 700 0.72rem ui-monospace, monospace; text-align: center; padding: 4px 0 8px; border-bottom: 1px solid #ffffff44; margin-bottom: 4px; }
body.class-t .rail-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; background: transparent; border: 0; color: #fff;
  border-radius: 10px; min-height: 0; width: 100%; }
body.class-t .rail-btn .ri { font-size: 1.35rem; line-height: 1; }
body.class-t .rail-btn .rl { font-size: 0.68rem; font-weight: 600; white-space: nowrap; }
body.class-t .rail-btn:hover { background: #ffffff26; }
body.class-t .rail-btn.on { background: #ffffff; color: #1d6f6b; }
body.class-t .rail .sticker-wrap { display: block; }
body.class-t .rail .sticker-pop { bottom: auto; top: 0; left: calc(100% + 8px); transform: none; color: var(--text, #222); }
body.class-t .mainarea { background: #1d2128; color: #e9edf2; }
body.class-t .mainarea .muted { color: #9aa4b2; }
body.class-t .mainarea .tile { background: #2b313b; }
body.class-t .monitor-head { color: #e9edf2; }
body.class-t .sidebar { background: #fff; }
body.class-t .people-panel { flex: 1 1 55%; }
body.class-t .chat-panel { flex: 1 1 45%; border-top: 6px solid #eef0f3; }
body.class-t .panel-h { display: flex; align-items: center; gap: 6px; padding: 2px 2px 6px; border-bottom: 1px solid var(--border); }
body.class-t .chat-panel .panel-h { padding: 10px 12px 8px; }
body.class-t .sharebox { padding: 8px; }
body.class-t .sharebox .big { font-size: 1.4rem; }
.dev-btn { background: transparent !important; border: 0 !important; padding: 2px 5px !important; font-size: 1.05rem; position: relative; min-width: 0 !important; }
.dev-btn.off { opacity: 0.4; }
.dev-btn.off::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; border-top: 2px solid #c0392b; transform: rotate(-35deg); }
.dev-btn.locked { opacity: 0.7; }
.dev-btn:hover { opacity: 1; }
@media (max-width: 860px) {
  body.class-t .workspace { grid-template-columns: minmax(0, 1fr); }
  body.class-t .workspace > * { min-width: 0; }
  body.class-t .rail { flex-direction: row; overflow-x: auto; min-width: 0; }
  body.class-t .rail-btn { width: auto; min-width: 64px; }
  body.class-t .rail-clock { border: 0; padding: 8px 6px; margin: 0; }
  body.class-t .rail .sticker-pop { top: calc(100% + 6px); left: 0; }
  body.class-t .tb-center { order: 9; width: 100%; justify-content: center; }
}
input[readonly] { background: var(--surface-2, #f1f3f5); color: var(--muted); cursor: not-allowed; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.profile-grid label { display: flex; flex-direction: column; gap: 4px; }
.profile-grid[hidden] { display: none; }
@media (max-width: 560px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }

/* 선생님 내 정보 */
.me-table { width: 100%; border-collapse: collapse; border-top: 2px solid #555; margin-bottom: 12px; }
.me-table th { width: 110px; text-align: left; vertical-align: middle; background: var(--surface-2, #f6f7f9); padding: 10px 14px; font-size: 0.9rem; font-weight: 700; border-bottom: 1px solid var(--border); }
.me-table td { padding: 8px 14px; border-bottom: 1px solid var(--border); }
.me-table td input:not([type=checkbox]), .me-table td select { width: 100%; max-width: 420px; }
img.me-avatar { object-fit: cover; }
.me-photo { gap: 10px; align-items: center; }
.me-avatar { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #0f4a5c; color: #fff; font-size: 1.5rem; font-weight: 700; }
.me-school { display: flex; align-items: center; gap: 8px; max-width: 560px; }
.me-school select { flex: 0 0 auto; width: auto !important; }
.me-school input { flex: 1; min-width: 0; }
@media (max-width: 560px) { .me-table th { width: 78px; padding: 8px; } .me-table td { padding: 6px 8px; } .me-school { flex-wrap: wrap; } }
/* 온라인 수업 열기: 회차표 — 날짜를 누르면 그 아래에서 주제를 적고 연다 */
.sess-open .link-btn { color: var(--brand); font-size: inherit; padding: 0; font-weight: 600; }
.sess-open tr.next td { background: var(--accent-soft); }
.sess-open tr.on td { background: var(--accent-soft); border-bottom: none; }
.sess-open tr.sess-start td { background: var(--accent-soft); padding: 4px 10px 12px; }
.sess-open tr.sess-start .open-box { margin: 0; }
.sess-open .tag { margin-left: 6px; }

/* ───── 머리글 두 줄: 위(로고 · 이름/내 정보/로그아웃) + 아래(메뉴 바) ───── */
.site-header { position: static; background: var(--surface); backdrop-filter: none; border-top: 4px solid var(--brand); border-bottom: none; }
.site-header-in { max-width: 1160px; padding: 22px 24px; gap: 12px; flex-wrap: nowrap; }
.site-header .grow { flex: 1; }
.brand { font-size: 1.8rem; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; margin-right: 9px; }
.site-menu { position: sticky; top: 0; z-index: 30; background: #f5f1ea; /* 따뜻한 미색: 초록·주황 어느 쪽과도 어울리게 */
  border-top: 1px solid #e6dfd3; border-bottom: 1px solid #e6dfd3; }
.site-menu .site-nav a:hover { background: rgba(120, 100, 70, 0.08); }
@media (prefers-color-scheme: dark) { .site-menu { background: #1d1b18; border-color: #2e2a24; } .site-menu .site-nav a:hover { background: #2e2a24; } }
.site-menu-in { max-width: 1160px; margin: 0 auto; padding: 8px 12px; }
.site-menu .site-nav { display: flex; gap: 6px; overflow-x: auto; }
.site-menu .site-nav a { flex: 1; text-align: center; padding: 10px 12px; border-radius: 999px; color: var(--text);
  font-size: 1.08rem; font-weight: 600; }
.site-menu .site-nav a.on { background: var(--brand); color: #fff; }
@media (max-width: 760px) {
  .site-header-in { padding: 12px 14px; flex-wrap: nowrap; }
  .brand { font-size: 1.35rem; }
  .brand-mark { width: 32px; height: 32px; margin-right: 8px; }
  .site-user-box { margin-left: 0; }
  .site-menu-in { padding: 6px 8px; }
  .site-menu .site-nav a { flex: none; padding: 7px 12px; font-size: 0.98rem; }
}
/* 좁은 휴대폰: 이름이 길어도 오른쪽 위가 화면 밖으로 넘치지 않게 */
@media (max-width: 420px) {
  .site-header-in { gap: 8px; padding: 10px 10px; }
  .brand { font-size: 1.2rem; }
  .brand-mark { width: 28px; height: 28px; margin-right: 6px; }
  .site-user-box { min-width: 0; gap: 4px; }
  .site-me { min-width: 0; }
  .site-me strong { max-width: 5.5em; }
  .site-user-box button.small { padding: 5px 8px; }
}
/* 공지사항 첨부 파일 */
.notice-files { list-style: none; padding: 10px 12px; margin: 14px 0 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); display: grid; gap: 6px; }
.notice-files:empty { display: none; }
.notice-files a { font-weight: 600; word-break: break-all; color: var(--brand); text-decoration: none; }
.notice-files a:hover { text-decoration: underline; }
.notice-attach { display: grid; gap: 4px; margin: 8px 0; }
/* 참여학교 담당: 학생 × 과목 표 — 칸을 가운데로 맞추고, 학생 칸은 묶어서 */
table.att.school-table { table-layout: fixed; min-width: 860px; }
table.att.school-table th, table.att.school-table td { text-align: center; vertical-align: middle; white-space: normal; min-width: 0; }
table.att.school-table th:nth-child(1) { width: 40px; }
table.att.school-table th:nth-child(2) { width: 14%; }
table.att.school-table th:nth-child(3), table.att.school-table th:nth-child(4) { width: 7%; }
table.att.school-table th:nth-child(5) { width: 10%; }
table.att.school-table th:nth-child(6) { width: 14%; }
table.att.school-table th:nth-child(7) { width: 18%; }
table.att.school-table th:nth-child(8) { width: 10%; }
table.att.school-table tr.cont-row td { border-top: 1px dashed var(--border); }
table.att.school-table .quit-cell { justify-content: center; flex-wrap: wrap; }
