/* class-mission.css : 반 미션 학생 화면(2026-11-27). 아래 띠(#cmBar)와 미션 창(#cmOv) */
body.cm-on { padding-bottom: 92px; }
.cm-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 70; width: min(640px, calc(100% - 24px)); box-sizing: border-box;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; border-radius: 18px; background: #1e1b4b; color: #fff;
  box-shadow: 0 12px 30px rgba(30, 27, 75, .35); animation: cm-up .35s ease-out; }
.cm-bar.won { background: linear-gradient(135deg, #b45309, #f59e0b); }
.cm-bar.off { background: #475569; }
@keyframes cm-up { from { transform: translate(-50%, 30px); opacity: 0; } }
.cm-badge { flex: none; font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: #fbbf24; color: #78350f; white-space: nowrap; }
.cm-bar.won .cm-badge { background: #fff; color: #92400e; }
.cm-bar-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cm-bar-t b { font-size: 16px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-bar-t span { font-size: 13px; opacity: .9; word-break: keep-all; }
.cm-bar-t .nw { font-style: normal; white-space: nowrap; }
.cm-meter { display: block; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .2); overflow: hidden; margin-top: 3px; }
.cm-meter em { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #818cf8, #fbbf24); transition: width .5s; }
.cm-go { flex: none; font: inherit; font-weight: 800; font-size: 15px; padding: 10px 16px; min-height: 44px; border-radius: 12px; border: none; background: #fbbf24; color: #78350f; cursor: pointer; }
.cm-go:hover { filter: brightness(1.06); }
.cm-bar.won .cm-go { background: #fff; color: #92400e; }
.cm-bar-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .18); color: #fff; font-size: 15px; cursor: pointer; }
.cm-bar button:focus-visible, .cm-ov button:focus-visible, .cm-ov input:focus-visible, .cm-ov textarea:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
body.cm-modal .cm-bar { display: none; }

.cm-ov { position: fixed; inset: 0; z-index: 90; background: rgba(15, 23, 42, .55); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.cm-card { position: relative; overflow: hidden; width: min(760px, 100%); box-sizing: border-box; background: #fff; color: #1e1b4b; border-radius: 22px; padding: 22px 24px 20px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); }
.cm-card p, .cm-card li, .cm-card h2 { text-wrap: pretty; word-break: keep-all; }
.cm-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: none; background: #f1f5f9; font-size: 17px; cursor: pointer; z-index: 2; }
.cm-head h2 { margin: 6px 44px 4px 0; font-size: 23px; line-height: 1.35; }
.cm-sub { margin: 0; color: #475569; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cm-sub b { color: #b45309; }
.cm-left { color: #b45309; font-weight: 800; font-variant-numeric: tabular-nums; }
.cm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; }
.cm-tabs button { font: inherit; font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 2px solid #c7d2fe; background: #fff; color: #3730a3; cursor: pointer; }
.cm-tabs button[aria-selected="true"] { background: #4338ca; border-color: #4338ca; color: #fff; }
.cm-class { margin: 14px 0 0; padding: 12px 14px; border-radius: 16px; background: #eef2ff; }
.cm-class-n { font-weight: 800; font-size: 17px; }
.cm-class-n b { font-size: 30px; color: #4338ca; font-variant-numeric: tabular-nums; }
.cm-meter.big { height: 12px; background: #e0e7ff; margin: 8px 0; }
.cm-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.cm-dots i { width: 14px; height: 14px; border-radius: 50%; background: #cbd5e1; }
.cm-dots i.d1 { background: #60a5fa; } .cm-dots i.d2 { background: #f59e0b; box-shadow: 0 0 0 2px #fde68a; }
.cm-steps { display: flex; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap; }
.cm-steps button { font: inherit; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #c7d2fe; background: #fff; color: #3730a3; font-weight: 800; font-size: 16px; cursor: pointer; }
.cm-steps button.ok { background: #10b981; border-color: #10b981; color: #fff; }
.cm-steps button.rej { border-color: #f59e0b; background: #fffbeb; }
.cm-steps button[aria-current="true"] { box-shadow: 0 0 0 3px #a5b4fc; }
.cm-body { margin-top: 10px; }
.cm-qno { margin: 0 0 4px; font-weight: 800; color: #4f46e5; font-size: 15px; }
.cm-qno small { color: #64748b; font-weight: 700; margin-left: 4px; }
.cm-qtext { margin: 0 0 12px; font-size: 19px; font-weight: 700; line-height: 1.6; color: #111827; }
.cm-rej { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: #fffbeb; color: #92400e; font-weight: 700; }
.cm-opts { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.cm-opt { font: inherit; text-align: left; font-size: 17px; line-height: 1.5; padding: 12px 14px; border-radius: 14px; border: 2px solid #e0e7ff; background: #fff; color: #1e1b4b; cursor: pointer; word-break: keep-all; text-wrap: pretty; }
.cm-opt:hover:not(:disabled) { border-color: #a5b4fc; background: #f8faff; }
.cm-opt[aria-pressed="true"] { border-color: #4338ca; background: #eef2ff; box-shadow: inset 0 0 0 1px #4338ca; font-weight: 700; }
.cm-opt:disabled { cursor: default; opacity: .75; }
.cm-ox { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
.cm-ox button { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 10px; border-radius: 18px; border: 3px solid #e0e7ff; background: #fff; cursor: pointer; font-weight: 800; font-size: 16px; color: #334155; }
.cm-ox button b { font-size: 46px; line-height: 1; }
.cm-ox button[data-ox="O"] b { color: #2563eb; } .cm-ox button[data-ox="X"] b { color: #dc2626; }
.cm-ox button:hover:not(:disabled) { border-color: #a5b4fc; transform: translateY(-2px); }
.cm-ox button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.cm-shortrow { display: flex; gap: 8px; margin: 0 0 12px; }
.cm-input { flex: 1; min-width: 0; font: inherit; font-size: 18px; padding: 10px 14px; border: 2px solid #c7d2fe; border-radius: 12px; }
.cm-need { margin: 0 0 8px; color: #334155; }
.cm-essay { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 17px; line-height: 1.7; padding: 12px 14px; border: 2px solid #c7d2fe; border-radius: 14px; resize: vertical; min-height: 130px; }
.cm-erow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 12px; flex-wrap: wrap; }
.cm-count { color: #475569; font-weight: 700; font-variant-numeric: tabular-nums; }
.cm-pri, .cm-ghost { font: inherit; font-weight: 800; font-size: 16px; padding: 10px 18px; min-height: 46px; border-radius: 12px; cursor: pointer; border: 2px solid transparent; }
.cm-pri { background: #4338ca; border-color: #4338ca; color: #fff; }
.cm-pri:disabled { opacity: .45; cursor: not-allowed; }
.cm-ghost { background: #fff; border-color: #c7d2fe; color: #3730a3; }
.cm-fb { margin: 6px 0 10px; padding: 12px 14px; border-radius: 14px; }
.cm-fb b { font-size: 17px; }
.cm-fb p, .cm-fb ul { margin: 6px 0 0; }
.cm-fb ul { padding-left: 20px; }
.cm-fb.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.cm-fb.no { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.cm-fb.hint { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.cm-wait { font-weight: 700; color: #b45309; font-variant-numeric: tabular-nums; }
.cm-wait:empty { display: none; }
.cm-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.cm-end { text-align: center; padding: 22px 12px 8px; }
.cm-end b { display: block; font-size: 26px; color: #4338ca; margin-bottom: 6px; }
.cm-end p { margin: 0 auto 14px; max-width: 520px; color: #334155; font-size: 17px; line-height: 1.6; }
.cm-end.won b { color: #b45309; font-size: 30px; }
.cm-end.off b { color: #475569; }
.cm-flash { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-weight: 700; }
.cm-confetti { position: absolute; inset: 0; pointer-events: none; }
.cm-confetti i { position: absolute; top: -12px; width: 9px; height: 13px; border-radius: 2px; animation: cm-fall 2.6s ease-in forwards; }
@keyframes cm-fall { to { transform: translateY(620px) rotate(540deg); opacity: 0; } }

@media (max-width: 560px) {
  .cm-bar { flex-wrap: wrap; bottom: 8px; padding: 10px; gap: 8px; }
  .cm-bar-t { flex-basis: calc(100% - 120px); }
  .cm-go { flex: 1 1 auto; }
  body.cm-on { padding-bottom: 140px; }
  .cm-ov { padding: 10px 6px; }
  .cm-card { padding: 18px 14px 16px; border-radius: 18px; }
  .cm-head h2 { font-size: 20px; }
  .cm-qtext { font-size: 17px; }
  .cm-ox button b { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) { .cm-bar { animation: none; } .cm-meter em { transition: none; } }
