/* ───────── AI 선생님 되기 (train 미션) ───────── */
.trainer { --yellow-soft: #FFF4D1; --green: #22B573; position: relative; }
.trainer mark { background: linear-gradient(transparent 55%, var(--yellow) 55%); color: inherit; }
.trainer.is-disabled, .is-disabled .trainer { pointer-events: none; opacity: .6; }
.tr-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tr-tab { flex: 1; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 12px; font: inherit; font-weight: 800; font-size: 16px; color: var(--muted); cursor: pointer; }
.tr-tab.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.tr-body { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 20px; align-items: start; }
.tr-classes { display: flex; gap: 8px; margin-bottom: 10px; }
.tr-class { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 3px solid var(--line); background: #fff; border-radius: 16px; padding: 8px 4px; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.tr-class .sym { font-size: 32px; line-height: 1; color: var(--c); font-weight: 900; }
.tr-class .cnt { font-size: 12px; color: var(--muted); }
.tr-class.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); transform: translateY(-2px); }
.tr-canvas-wrap { position: relative; width: 100%; aspect-ratio: 1; background: #fff; border-radius: 20px; border: 3px dashed #C9CFE2;
  background-image: linear-gradient(#EEF1F8 1px, transparent 1px), linear-gradient(90deg, #EEF1F8 1px, transparent 1px); background-size: 28px 28px; }
.tr-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.tr-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #B3BAD0; font-weight: 700; pointer-events: none; font-size: 16px; text-align: center; padding: 20px; }
.tr-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 10px; }
.tr-answer { margin-top: 10px; background: var(--yellow-soft); border-radius: 14px; padding: 14px; font-size: 18px; text-align: center; }
.tr-rule { background: var(--bg); border-radius: 12px; padding: 10px 14px; font-size: 15px; margin-bottom: 10px; }
.tr-rule b { color: var(--navy); margin-right: 6px; }
.tr-row { border-left: 5px solid var(--c); padding: 4px 0 4px 10px; margin-bottom: 8px; }
.tr-row-head { font-weight: 800; color: var(--c); font-size: 15px; }
.tr-row-head small { color: var(--muted); font-weight: 600; }
.tr-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; min-height: 30px; align-items: center; }
.tr-thumb { position: relative; }
.tr-thumb img { width: 48px; height: 48px; border-radius: 8px; border: 1px solid var(--line); display: block; background: #fff; }
.tr-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--coral); color: #fff; font-size: 10px; padding: 0; cursor: pointer; }
.trainer .btn.accent { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.tr-test { width: 100%; margin-top: 6px; }
.tr-result { margin-top: 12px; }
.tr-score { display: flex; align-items: baseline; gap: 8px; font-weight: 700; color: var(--muted); }
.tr-score b { font-size: 48px; color: var(--navy); }
.tr-tests { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 8px 0; }
.tr-test-item { border-radius: 10px; padding: 4px; text-align: center; font-size: 12px; font-weight: 700; border: 2px solid; }
.tr-test-item img { width: 100%; aspect-ratio: 1; display: block; background: #fff; border-radius: 6px; }
.tr-test-item.ok { border-color: #A7E8C9; background: #EFFBF5; }
.tr-test-item.no { border-color: #FFC2C2; background: #FFF1F1; }
.tr-flash { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); background: var(--navy); color: #fff; padding: 14px 22px; border-radius: 14px; font-weight: 800; opacity: 0; pointer-events: none; z-index: 5; text-align: center; max-width: 90%; }
.tr-flash.good { background: var(--green); }
.tr-flash.show { animation: tr-flash 1.6s; }
@keyframes tr-flash { 0% { opacity: 0; transform: translate(-50%, -40%); } 12%, 75% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; } }

/* 라운드 표시 · 결과 */
.rounds { display: flex; align-items: center; gap: 10px; }
.rnd { flex: 1; border: 3px solid var(--line); border-radius: 18px; padding: 10px 14px; display: flex; flex-direction: column; background: #fff; }
.rnd b { font-size: 18px; } .rnd small { color: var(--muted); font-weight: 600; } .rnd em { font-style: normal; font-weight: 800; margin-top: 2px; color: var(--muted); }
.rnd.on { border-color: var(--c, var(--yellow)); background: color-mix(in srgb, var(--c, #FFC93C) 14%, #fff); }
.rnd.ok em { color: #138A5B; }
.rnd-arrow { font-style: normal; font-size: 26px; color: var(--yellow); }
.round-rule { margin: 12px 0 0; line-height: 1.6; }
.my-rounds { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0; }
.my-round { background: var(--bg); border-radius: 18px; padding: 14px 24px; text-align: center; display: flex; flex-direction: column; min-width: 120px; }
.my-round span { font-weight: 700; color: var(--muted); }
.my-round b { font-size: 46px; color: var(--navy); line-height: 1.1; }
.my-round small { color: var(--muted); }
.my-round em { font-style: normal; font-size: 13px; color: var(--muted); }
.my-round.r2 { background: #E8F8F1; }
.class-avg { background: var(--bg); border-radius: 14px; padding: 10px 14px; text-align: center; font-weight: 600; }
.class-avg b { font-size: 20px; color: var(--navy); }

/* 교사 화면: 라운드 비교 */
.tr-cmp { display: flex; align-items: stretch; gap: 12px; }
.tr-col { flex: 1; background: var(--bg); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; }
.tr-col b { font-size: 40px; color: var(--navy); line-height: 1.1; } .tr-col b em { font-size: 16px; font-style: normal; color: var(--muted); }
.tr-col.r2 { background: #E8F8F1; }
.tr-arrow { align-self: center; font-size: 26px; color: var(--yellow); }
.tr-hist { display: flex; align-items: flex-end; gap: 2px; height: 60px; margin-top: 8px; }
.tr-hist i { flex: 1; background: var(--mint); border-radius: 3px 3px 0 0; min-height: 2px; }
.tr-col.r1 .tr-hist i { background: #9AA6CF; }

@media (max-width: 720px) {
  .tr-body { grid-template-columns: 1fr; }
  .tr-tests { grid-template-columns: repeat(4, 1fr); }
  .rounds { gap: 6px; } .rnd { padding: 8px 10px; }
}
