/* class-mission-admin.css : 반 미션 선생님 화면(2026-11-27). 밝은 테마, 과제 내기 화면(homework-admin)과 같은 결 */
.cma-body { background: #f4f5ff; color: #1e1b4b; margin: 0; }
.cma-body p, .cma-body li, .cma-body h2, .cma-body h3, .cma-f, .cma-hint, .cma-legend, .cma-banbtn { text-wrap: pretty; word-break: keep-all; }
.cma-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: rgba(255, 255, 255, .96); border-bottom: 1px solid #dfe3f5; }
.cma-top h1 { margin: 0; font-size: 22px; }
.cma-home { font-weight: 800; color: #4338ca; text-decoration: none; padding: 8px 12px; border: 2px solid #c7d2fe; border-radius: 12px; background: #fff; }
.cma-sp { flex: 1; }
.cma-main { max-width: 1240px; margin: 0 auto; padding: 16px 18px 120px; }
.cma-card { background: #fff; border: 1px solid #dfe3f5; border-radius: 16px; padding: 16px 18px; margin: 0 0 14px; box-shadow: 0 3px 12px rgba(30, 27, 75, .06); font-size: 16px; line-height: 1.6; }
.cma-card h2 { margin: 0 0 12px; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.cma-card h2 small { font-size: 14px; color: #6b7280; font-weight: 700; }
.cma-gate { max-width: 520px; margin: 30px auto; }
.cma-gate input { font: inherit; padding: 8px 10px; border: 2px solid #c7d2fe; border-radius: 10px; }
.cma-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #eef2ff; color: #3730a3; font-weight: 700; }
.cma-note.warn { background: #fef2f2; color: #b91c1c; }
.cma-empty { color: #6b7280; margin: 6px 0; }
.cma-hint { color: #64748b; font-size: 14px; margin: 8px 0 0; }

/* 단추 */
.cma-pri, .cma-ghost, .cma-danger { font: inherit; font-weight: 800; border-radius: 12px; padding: 9px 16px; cursor: pointer; border: 2px solid transparent; min-height: 42px; }
.cma-pri { background: #4338ca; color: #fff; border-color: #4338ca; }
.cma-pri:hover { filter: brightness(1.08); }
.cma-pri.big { font-size: 18px; padding: 12px 22px; min-height: 52px; }
.cma-ghost { background: #fff; color: #3730a3; border-color: #c7d2fe; }
.cma-ghost:hover { background: #eef2ff; }
.cma-danger { background: #fff; color: #b91c1c; border-color: #fecaca; }
.cma-danger:hover { background: #fef2f2; }
.cma-pri:disabled, .cma-ghost:disabled { opacity: .5; cursor: not-allowed; }
.cma-icon { font: inherit; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e0e7ff; background: #fff; color: #4b5563; cursor: pointer; }
.cma-icon:hover { background: #eef2ff; }
.cma-mini { font: inherit; font-size: 14px; font-weight: 800; padding: 5px 10px; border-radius: 10px; border: 2px solid #fcd34d; background: #fffbeb; color: #92400e; cursor: pointer; white-space: nowrap; }
.cma-body button:focus-visible, .cma-body a:focus-visible, .cma-body input:focus-visible, .cma-body select:focus-visible, .cma-body textarea:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

/* 칩 */
.cma-chip { display: inline-flex; align-items: center; font-size: 13px; font-weight: 800; padding: 2px 10px; border-radius: 999px; white-space: nowrap; background: #e5e7eb; color: #374151; }
.cma-chip.ban { background: #1e1b4b; color: #fff; }
.cma-chip.ban.big { font-size: 18px; padding: 4px 14px; }
.cma-chip.blue { background: #dbeafe; color: #1e40af; }
.cma-chip.gold { background: #fef3c7; color: #92400e; }
.cma-chip.green { background: #dcfce7; color: #166534; }
.cma-chip.gray { background: #e5e7eb; color: #374151; }
.cma-chip.type-mc { background: #ede9fe; color: #5b21b6; }
.cma-chip.type-ox { background: #e0f2fe; color: #075985; }
.cma-chip.type-short { background: #dcfce7; color: #166534; }
.cma-chip.type-essay { background: #ffe4e6; color: #9f1239; }

/* 목록 */
.cma-intro { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(135deg, #eef2ff, #fef3c7); border: 1px solid #e0e7ff; border-radius: 18px; padding: 18px 20px; margin: 0 0 18px; }
.cma-intro p { flex: 1 1 320px; margin: 0; font-size: 17px; line-height: 1.6; }
.cma-h2 { font-size: 20px; margin: 18px 0 10px; }
.cma-h2 small { font-size: 15px; color: #6b7280; }
.cma-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.cma-mcard { background: #fff; border: 2px solid #e0e7ff; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.cma-mhead { display: flex; align-items: center; gap: 6px; }
.cma-mcard h3 { margin: 2px 0 0; font-size: 19px; }
.cma-types { margin: 0; color: #64748b; font-size: 14px; }
.cma-star { font-weight: 800; color: #b45309; }
.cma-count { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.cma-count span { color: #64748b; font-size: 14px; }
.cma-mcard .cma-pri { align-self: flex-start; margin-top: 4px; }
.cma-bar { height: 10px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.cma-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #f59e0b); transition: width .4s; }
.cma-bar.big { height: 18px; }
.cma-old { margin-top: 20px; }
.cma-old > summary { cursor: pointer; font-weight: 800; color: #4b5563; padding: 8px 0; font-size: 16px; }
.cma-old .cma-grid { opacity: .85; margin-top: 8px; }

/* 새 미션 */
.cma-form { max-width: 920px; margin: 0 auto; }
.cma-step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #4338ca; color: #fff; font-size: 15px; }
.cma-bans { display: flex; flex-wrap: wrap; gap: 8px; }
.cma-banbtn { font: inherit; display: inline-flex; flex-direction: column; align-items: center; min-width: 92px; padding: 10px 14px; border-radius: 14px; border: 2px solid #c7d2fe; background: #fff; color: #1e1b4b; cursor: pointer; }
.cma-banbtn b { font-size: 19px; } .cma-banbtn small { color: #64748b; font-weight: 700; }
.cma-banbtn[aria-pressed="true"] { background: #4338ca; border-color: #4338ca; color: #fff; }
.cma-banbtn[aria-pressed="true"] small { color: #e0e7ff; }
.cma-items { display: flex; flex-direction: column; gap: 12px; margin: 0 0 12px; }
.cma-item { border: 2px solid #e0e7ff; border-radius: 14px; padding: 12px 14px; background: #fbfbff; }
.cma-ihead { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.cma-ihead > b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #1e1b4b; color: #fff; font-size: 14px; }
.cma-f { display: block; margin: 0 0 10px; font-weight: 800; font-size: 15px; color: #3730a3; }
.cma-f small { font-weight: 600; color: #64748b; font-size: 13px; }
.cma-f > span { display: block; }
.cma-f input, .cma-f textarea, .cma-f select, .cma-title { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font: inherit; font-size: 16px; font-weight: 400; color: #111827; padding: 8px 12px; border: 2px solid #c7d2fe; border-radius: 10px; background: #fff; }
.cma-f textarea { resize: vertical; line-height: 1.6; }
.cma-title { font-size: 18px; margin: 0; }
.cma-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cma-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.cma-seg button { font: inherit; font-weight: 800; font-size: 15px; padding: 8px 14px; min-height: 42px; border-radius: 10px; border: 2px solid #c7d2fe; background: #fff; color: #3730a3; cursor: pointer; }
.cma-seg button[aria-pressed="true"] { background: #4338ca; border-color: #4338ca; color: #fff; }
.cma-seg.ox button { min-width: 110px; }
.cma-seg.wide button { min-width: 84px; font-size: 16px; }
.cma-custom { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: #3730a3; margin-left: 4px; }
.cma-custom input { width: 110px; font: inherit; padding: 7px 10px; border: 2px solid #c7d2fe; border-radius: 10px; }
.cma-qprev { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 14px; margin: 0 0 8px; }
.cma-qprev p { margin: 0 0 6px; font-weight: 600; }
.cma-qprev ol, .cma-qrow ol { margin: 0; padding-left: 0; list-style: none; }
.cma-qprev li, .cma-qrow li { padding: 3px 8px; border-radius: 8px; text-wrap: pretty; word-break: keep-all; }
.cma-qprev li.ok, .cma-qrow li.ok { background: #dcfce7; font-weight: 700; }
.cma-qprev li b { color: #166534; font-size: 13px; margin-left: 4px; }
.cma-add { display: flex; flex-wrap: wrap; gap: 8px; }
.cma-add button { font: inherit; font-weight: 800; font-size: 16px; padding: 10px 16px; min-height: 48px; border-radius: 12px; border: 2px dashed #a5b4fc; background: #fff; color: #3730a3; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cma-add button small { font-weight: 600; color: #64748b; font-size: 13px; }
.cma-add button:hover:not(:disabled) { background: #eef2ff; border-style: solid; }
.cma-add button:disabled { opacity: .45; cursor: not-allowed; }
.cma-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; }
.cma-legend > span { font-weight: 800; color: #92400e; }
.cma-legend select { font: inherit; padding: 7px 10px; border: 2px solid #fcd34d; border-radius: 10px; background: #fff; }
.cma-legend small { color: #92400e; }
.cma-go { position: sticky; bottom: 0; background: rgba(244, 245, 255, .97); border-top: 1px solid #dfe3f5; padding: 12px 0 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.cma-go p { margin: 0; font-size: 16px; }

/* 현황판 */
.cma-board { position: relative; overflow: hidden; background: #fff; border: 1px solid #dfe3f5; border-radius: 18px; padding: 18px 20px; margin: 0 0 14px; box-shadow: 0 3px 12px rgba(30, 27, 75, .06); }
.cma-board.is-won { border-color: #fbbf24; box-shadow: 0 0 0 4px #fef3c7; }
.cma-bhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cma-bhead h2 { margin: 0; font-size: 24px; }
.cma-time { font-weight: 800; font-size: 18px; color: #b45309; font-variant-numeric: tabular-nums; }
.cma-won { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: 12px 0 0; padding: 12px 16px; border-radius: 14px; background: #fef3c7; color: #92400e; }
.cma-won b { font-size: 22px; } .cma-won.off { background: #f1f5f9; color: #334155; } .cma-won.off b { font-size: 18px; }
.cma-big { margin: 14px 0 6px; }
.cma-big > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.cma-big > div:first-child b { font-size: 56px; line-height: 1; color: #4338ca; font-variant-numeric: tabular-nums; }
.cma-big > div:first-child span { font-size: 22px; font-weight: 800; color: #1e1b4b; }
.cma-big p { margin: 8px 0 0; color: #475569; }
.cma-legend-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 14px 0 8px; font-size: 14px; color: #475569; }
.cma-legend-row .lg::before { content: ""; display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.lg.s0::before { background: #e5e7eb; } .lg.s1::before { background: #60a5fa; } .lg.s2::before { background: #fbbf24; }
.lg.sx::before { background: repeating-linear-gradient(45deg, #e5e7eb 0 4px, #fff 4px 8px); border: 1px solid #cbd5e1; }
.cma-check { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: #3730a3; cursor: pointer; }
.cma-check input { width: 18px; height: 18px; }
.cma-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.cma-seat { font: inherit; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 72px; padding: 6px 4px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .3s; }
.cma-seat b { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cma-seat small { font-size: 13px; font-weight: 700; margin-top: 2px; word-break: keep-all; text-align: center; }
.cma-seat em { position: absolute; top: 4px; right: 6px; font-style: normal; font-size: 11px; font-weight: 800; }
.cma-seat.s0 { background: #f1f5f9; color: #94a3b8; border-color: #e2e8f0; }
.cma-seat.s1 { background: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
.cma-seat.s2 { background: #fde68a; color: #78350f; border-color: #f59e0b; box-shadow: 0 4px 10px rgba(245, 158, 11, .25); }
.cma-seat.s2::after { content: "★"; position: absolute; top: 3px; right: 6px; font-size: 13px; color: #b45309; }
.cma-seat.sx { background: repeating-linear-gradient(45deg, #f1f5f9 0 6px, #fff 6px 12px); color: #94a3b8; border-color: #e2e8f0; }
.cma-seat:hover { transform: translateY(-2px); }
.cma-board.cma-tv { padding: 28px 36px; overflow: auto; }
.cma-board.cma-tv .cma-seats { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.cma-board.cma-tv .cma-seat { min-height: 104px; } .cma-board.cma-tv .cma-seat b { font-size: 38px; } .cma-board.cma-tv .cma-seat small { font-size: 17px; }
.cma-board.cma-tv .cma-bhead h2 { font-size: 34px; } .cma-board.cma-tv .cma-big > div:first-child b { font-size: 88px; } .cma-board.cma-tv .cma-big > div:first-child span { font-size: 30px; }
.cma-board.cma-tv .cma-hint { display: none; }
.cma-ansbox { margin: 0 0 14px; } .cma-ansbox h3 { margin: 0 0 6px; font-size: 16px; } .cma-ansbox h3 small { color: #6b7280; }
.cma-ansbox ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.cma-ansbox li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; background: #f8fafc; border: 1px solid #e5e7eb; }
.cma-ansbox li.ok { background: #f0fdf4; border-color: #bbf7d0; }
.cma-who { font-weight: 800; color: #3730a3; white-space: nowrap; }
.cma-ans { white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.cma-qs > summary { cursor: pointer; font-weight: 800; color: #4338ca; }
.cma-qrow { border-top: 1px solid #eef2ff; padding: 10px 0; } .cma-qrow p { margin: 0 0 6px; }
.cma-bbtns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cma-confetti { position: absolute; inset: 0; pointer-events: none; }
.cma-confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; animation: cma-fall 2.6s ease-in forwards; }
@keyframes cma-fall { to { transform: translateY(560px) rotate(540deg); opacity: 0; } }

/* 창 */
.cma-dlg { border: none; border-radius: 18px; padding: 22px 24px; max-width: min(460px, 92vw); box-shadow: 0 20px 60px rgba(15, 23, 42, .3); }
.cma-dlg::backdrop { background: rgba(15, 23, 42, .45); }
.cma-dlg h2 { margin: 0 32px 8px 0; font-size: 20px; }
.cma-dlg p { margin: 0 0 14px; line-height: 1.6; }
.cma-dbtns { display: flex; flex-direction: column; gap: 8px; }
.cma-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: none; background: #f1f5f9; font-size: 16px; cursor: pointer; }

@media (max-width: 640px) {
  .cma-main { padding: 12px 10px 120px; }
  .cma-row2 { grid-template-columns: 1fr; }
  .cma-top h1 { font-size: 19px; }
  .cma-big > div:first-child b { font-size: 44px; }
  .cma-seats { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
  .cma-seat { min-height: 60px; } .cma-seat b { font-size: 20px; }
  .cma-ansbox li { grid-template-columns: 1fr; }
}
