/* ============================================================
   유자보드 — 장면 · 1분 퀴즈 · 화면 잠금 (P5)
   장면은 칠판 전체(머리띠까지)를 덮는다. 교실 뒤에서도 읽히게 글자를 크게.
   ============================================================ */

/* ── 장면 틀 ─────────────────────────────────────── */
.cb-scene { z-index: 25; display: flex; flex-direction: column; background: var(--yj-canvas); }
.cb-scene[hidden] { display: none; }
.cb-scene__bar { height: 72px; flex: none; display: flex; align-items: center; gap: var(--yj-s5); padding: 0 var(--yj-s6); background: var(--yj-card); border-bottom: 1px solid var(--yj-line); }
.cb-scene__name { height: 40px; padding: 0 var(--yj-s4); display: inline-flex; align-items: center; border-radius: var(--yj-r-full); background: var(--yj-yuja-100); font-size: 20px; font-weight: 800; color: var(--yj-ink-deep); }
.cb-scene__clock { font-family: var(--yj-font-disp); font-size: 36px; color: var(--yj-ink-deep); font-variant-numeric: tabular-nums; }
.cb-scene__count { font-size: 22px; font-weight: 700; color: var(--yj-ink); }
.cb-scene__grow { flex: 1; }
.cb-scene__acts { display: flex; gap: var(--yj-s2); }
.cb-scene__body { flex: 1; min-height: 0; padding: var(--yj-s5) var(--yj-s6); }

.cb-sc-card { padding: var(--yj-s5); background: var(--yj-card); border: 1px solid var(--yj-line); border-radius: var(--yj-r-lg); box-shadow: var(--yj-sh-1); display: flex; flex-direction: column; gap: var(--yj-s2); }
.cb-sc-card__k { font-size: 18px; font-weight: 700; color: var(--yj-sub); }
.cb-sc-card b { font-family: var(--yj-font-disp); font-size: 44px; line-height: 1.15; color: var(--yj-ink-deep); }
.cb-sc-card p { margin: 0; font-size: 24px; line-height: 1.45; color: var(--yj-ink); }
.cb-sc-card .cb-link { align-self: flex-start; font-size: 18px; }
.cb-sc-sp { display: flex; gap: var(--yj-s3); }
.cb-sc-sp .cb-sp__opt { height: 72px; min-width: 150px; font-size: 36px; }
.cb-sc-hj { display: flex; align-items: baseline; gap: 0.25em; flex-wrap: wrap; }
.cb-sc-hj__huneum { font-family: var(--yj-font-disp); font-weight: 800; font-size: 64px; line-height: 1.1; color: var(--yj-ink-deep); }
.cb-sc-hj__char { font-family: var(--yj-font-hanja); font-size: 30px; color: var(--yj-sub); }

/* ── 1분 어휘 퀴즈 ──────────────────────────────── */
.cb-qz-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cb-qz { gap: var(--yj-s3); }
.cb-qz__top { display: flex; align-items: center; gap: var(--yj-s3); font-size: var(--yj-t-small); color: var(--yj-sub); }
.cb-qz__sec { min-width: 3em; text-align: right; font-size: var(--yj-t-body); color: var(--yj-ink-deep); font-variant-numeric: tabular-nums; }
.cb-qz__q { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; overflow: hidden; }
.cb-qz__q span { font-size: var(--yj-t-cap); font-weight: 700; color: var(--yj-sub); }
.cb-qz__q b { flex: 1; min-height: 0; overflow: hidden; display: flex; align-items: center; font-size: 26px; line-height: 1.35; color: var(--yj-ink-deep); }
.cb-qz__opts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--yj-s2); }
.cb-qz__opt { min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 var(--yj-s3); text-align: left; cursor: pointer; border: 1px solid var(--yj-line-strong); border-radius: var(--yj-r-sm); background: var(--yj-card); font: inherit; font-size: var(--yj-t-body); font-weight: 700; color: var(--yj-ink-deep); }
.cb-qz__opt span { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--yj-canvas); font-size: var(--yj-t-label); color: var(--yj-sub); }
.cb-qz__opt.is-right { background: var(--yj-leaf-tint); border: 2px solid var(--yj-leaf); color: var(--yj-leaf-ink); }
.cb-qz__opt.is-wrong { color: var(--yj-faint); text-decoration: line-through; }
.cb-qz__foot { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.cb-qz__done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--yj-s4); }
.cb-qz__done span { font-size: 24px; color: var(--yj-sub); }
.cb-qz__done b { font-family: var(--yj-font-disp); font-size: 72px; color: var(--yj-ink-deep); }
.cb-qz--big .cb-qz__top { font-size: 20px; }
.cb-qz--big .cb-qz__sec { font-size: 30px; }
.cb-qz--big .cb-qz__q span { font-size: 22px; }
.cb-qz--big .cb-qz__q b { font-size: 56px; justify-content: center; text-align: center; }
.cb-qz--big .cb-qz__opt { min-height: 96px; font-size: 40px; padding: 0 var(--yj-s5); }
.cb-qz--big .cb-qz__opt span { width: 40px; height: 40px; font-size: 20px; }

/* ── 쉬는 시간 ───────────────────────────────────── */
.cb-rs { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--yj-s4); text-align: center; }
.cb-rs__next { font-size: 40px; color: var(--yj-ink); }
.cb-rs__next b { color: var(--yj-ink-deep); }
.cb-rs__left { font-family: var(--yj-font-disp); font-size: 220px; line-height: 1; color: var(--yj-ink-deep); font-variant-numeric: tabular-nums; }
.cb-rs__card { width: min(1100px, 90%); margin-top: var(--yj-s5); }
.cb-rs__card .cb-sc-card { align-items: center; text-align: center; }

/* ── 점심 ────────────────────────────────────────── */
.cb-lu { height: 100%; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--yj-s5); }
.cb-lu__roster { position: relative; }
.cb-lu__side { min-height: 0; display: flex; flex-direction: column; gap: var(--yj-s5); }
.cb-lu__big { padding: var(--yj-s6); background: var(--yj-card); border: 1px solid var(--yj-line); border-radius: var(--yj-r-lg); box-shadow: var(--yj-sh-1); display: flex; flex-direction: column; gap: var(--yj-s2); }
.cb-lu__big span { font-size: 24px; color: var(--yj-sub); font-weight: 700; }
.cb-lu__big b { font-family: var(--yj-font-disp); font-size: 120px; line-height: 1; color: var(--yj-ink-deep); }
.cb-roster__one { margin-left: var(--yj-s3); height: 32px; padding: 0 var(--yj-s3); display: inline-flex; align-items: center; border-radius: var(--yj-r-full); background: var(--yj-yuja-100); font-size: var(--yj-t-small); font-weight: 700; color: var(--yj-ink-deep); }

/* ── 하교 정리 ───────────────────────────────────── */
.cb-en { height: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--yj-s5); }
.cb-en__col { min-height: 0; display: flex; flex-direction: column; gap: var(--yj-s4); padding: var(--yj-s5); background: var(--yj-card); border: 1px solid var(--yj-line); border-radius: var(--yj-r-lg); box-shadow: var(--yj-sh-1); overflow: hidden; }
.cb-en__col h2 { margin: 0; font-size: 26px; color: var(--yj-ink-deep); }
.cb-en__col .cb-sc-card { box-shadow: none; padding: var(--yj-s4); background: var(--yj-canvas); border: 0; }
.cb-en__col .cb-sc-card b { font-size: 34px; }
.cb-en__col .cb-sc-card p { font-size: 20px; }
.cb-en__col .cb-sc-hj__huneum { font-size: 48px; }
.cb-en__col .cb-sc-sp .cb-sp__opt { height: 52px; min-width: 110px; font-size: 26px; }
.cb-en__alim { flex: 1; min-height: 0; margin: 0; }
/* R05-04 — 알림장 칸은 넘치면 줄이고(scenes.js fitAlim) 그래도 넘치면 아래 띠 */
.cb-en [data-alim] { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
.cb-en [data-alim].is-more::after { content: "아래에 더 있어요"; position: absolute; left: 0; right: 0; bottom: 0; padding: 4px var(--yj-s3); background: var(--yj-yuja-100); border-top: 1px solid var(--yj-yuja-300); color: var(--yj-ink); font-size: 18px; font-weight: 700; text-align: center; }
.cb-en__day { margin: 0; font-size: 20px; font-weight: 700; color: var(--yj-sub); }
.cb-en__tt { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: var(--yj-s2); }
.cb-en__tt li { padding: var(--yj-s3); border-radius: var(--yj-r-sm); background: var(--yj-canvas); font-size: 28px; font-weight: 800; color: var(--yj-ink-deep); }
.cb-en__tt li span { display: block; font-size: 16px; font-weight: 600; color: var(--yj-sub); }
.cb-en__bye { margin: auto 0 0; text-align: center; font-family: var(--yj-font-disp); font-size: 40px; color: var(--yj-yuja-ink); }

/* ── 화면 잠금 ───────────────────────────────────── */
.cb-lock { position: absolute; inset: 0; z-index: 50; cursor: not-allowed; }
.cb-lock[hidden] { display: none; }
.cb-lock__pill {
  /* 머리띠 안 오른쪽 — 잠긴 동안 머리띠 단추는 어차피 듣지 않는다. 오른쪽 아래에 두면 학급 온도계의 단추를, 위젯 위에 두면 위젯 머리 단추를 덮었다(R01-06) */
  position: absolute; right: var(--yj-s3); top: calc((var(--cb-bar-h, 56px) - 52px) / 2); min-height: 52px; box-sizing: border-box; cursor: default;
  display: flex; align-items: center; gap: var(--yj-s3); padding: 4px 4px 4px var(--yj-s4);
  background: var(--yj-ink-deep); color: var(--yj-card); border-radius: var(--yj-r-full); box-shadow: var(--yj-sh-2); font-size: var(--yj-t-small); font-weight: 700;
}
.cb-lock__pill .cb-ic { width: 18px; height: 18px; }
.cb-lock__btn {
  position: relative; overflow: hidden; height: max(44px, calc(44px / var(--cb-s, 1))); padding: 0 var(--yj-s5); border: 0; border-radius: var(--yj-r-full); cursor: pointer;
  background: var(--yj-yuja-300); color: var(--yj-ink-deep); font: inherit; font-size: var(--yj-t-cap); font-weight: 800; touch-action: none; user-select: none;
}
.cb-lock__btn i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--yj-yuja-500); }
.cb-lock__btn.is-holding i { width: 100%; transition: width 1500ms linear 500ms; }   /* 반 초는 막대도 안 보인다 — 한 번 눌러 보는 것만으로는 푸는 법이 드러나지 않게(2026-11-11) */
.cb-lock__btn span { position: relative; }
/* 짧게 눌렀다 떼면 막대가 조금 차오르다 비워진다(R01-06 · 글 없이 「누르고 있기」) */
.cb-lock__btn.is-tap i { animation: cb-lock-tap 600ms var(--yj-ease, ease) both; }
@keyframes cb-lock-tap { 0% { width: 0; } 50% { width: 35%; } 100% { width: 0; } }
@media (prefers-reduced-motion: reduce) { .cb-lock__btn.is-tap i { animation: none; } }
body.is-locked #cb-lock { color: var(--yj-yuja-ink); }

/* ── 설정 「장면」 칸 ─────────────────────────────── */
.cb-scene-set { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--yj-s2); }
.cb-scene-set li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--yj-s3); padding: var(--yj-s3); border: 1px solid var(--yj-line); border-radius: var(--yj-r-sm); font-size: var(--yj-t-small); }
.cb-scene-set li > span { flex: 1; min-width: 200px; color: var(--yj-sub); font-size: var(--yj-t-cap); }
.cb-scene-set li > .cb-check { min-width: 120px; }
.cb-scene-set__t { display: inline-flex; align-items: center; gap: 6px; color: var(--yj-sub); }
.cb-scene-set__t input { width: 130px; }

/* ── 선생님 PIN (P6 · F2) ─────────────────────────── */
.cb-pin { z-index: 60; }
.cb-pin__box { width: 440px; text-align: center; }
.cb-pin__box h2 { margin-bottom: var(--yj-s2); }
.cb-pin__box.is-shake { animation: cb-shake 360ms var(--yj-ease); }
@keyframes cb-shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.cb-pin__why { margin: 0 0 var(--yj-s4); font-size: var(--yj-t-body); color: var(--yj-sub); }
.cb-pin__dots { display: flex; justify-content: center; gap: var(--yj-s4); }
.cb-pin__dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--yj-line-strong); }
.cb-pin__dots i.is-on { background: var(--yj-ink-deep); border-color: var(--yj-ink-deep); }
.cb-pin__msg { min-height: 1.5em; margin: var(--yj-s3) 0; font-size: var(--yj-t-small); font-weight: 700; color: var(--yj-error-ink); }
.cb-pin__keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--yj-s2); }
.cb-pin__keys button { height: 72px; border: 1px solid var(--yj-line); border-radius: var(--yj-r-lg); background: var(--yj-card); font: inherit; font-size: 30px; font-weight: 700; color: var(--yj-ink-deep); cursor: pointer; }
.cb-pin__keys button[data-k="del"], .cb-pin__keys button[data-k="cancel"] { font-size: var(--yj-t-small); color: var(--yj-sub); }
.cb-pin__keys button:active { background: var(--yj-yuja-200); }
.cb-pin__forgot { margin-top: var(--yj-s4); }
.cb-pin__reset { margin-top: var(--yj-s3); text-align: left; font-size: var(--yj-t-cap); color: var(--yj-ink); line-height: 1.6; }
.cb-pin__reset[hidden] { display: none; }
.cb-pin__reset .cb-inline input { flex: 1; }

.cb-pin__code[hidden], .cb-pin__keys[hidden], .cb-pin__dots[hidden] { display: none; }
.cb-pin__code { display: flex; flex-direction: column; align-items: center; gap: var(--yj-s3); font-size: var(--yj-t-small); color: var(--yj-ink); line-height: 1.6; }
.cb-pin__codenum { font-family: var(--yj-font-disp); font-size: 52px; letter-spacing: 0.08em; color: var(--yj-ink-deep); padding: var(--yj-s2) var(--yj-s5); border: 2px dashed var(--yj-yuja-600); border-radius: var(--yj-r-lg); background: var(--yj-yuja-50); }
.cb-pin__hint { margin: var(--yj-s2) 0 0; font-size: var(--yj-t-label); color: var(--yj-sub); }

/* 복구 코드 가림(R02-02) — 처음엔 점 여섯 개, [누르고 있는 동안 보기]를 누르는 동안만 숫자 */
.cb-pin__warn { margin: 0; padding: var(--yj-s2) var(--yj-s3); border-radius: var(--yj-r-md); background: var(--yj-yuja-100); color: var(--yj-ink); font-weight: 700; }
.cb-pin__codenum .cb-pin__real { display: none; }
.cb-pin__codenum.is-shown .cb-pin__real { display: inline; }
.cb-pin__codenum.is-shown .cb-pin__mask { display: none; }
.cb-pin__mask { display: inline-flex; align-items: center; gap: 12px; min-height: 1.2em; }
.cb-pin__mask i { width: 16px; height: 16px; border-radius: var(--yj-r-full); background: var(--yj-ink-deep); }
.cb-pin__mask b { width: 12px; }
.cb-pin__peek { touch-action: none; user-select: none; -webkit-user-select: none; }
