/* Shared account badge. Never restyle editor interiors. */
[data-student-header] { gap:16px; flex-wrap:wrap; }
.student-account { display:flex; align-items:center; gap:9px; margin-left:auto; max-width:330px; flex-shrink:0; color:#171c44; line-height:1.4; }
.student-account-avatar { width:36px; height:36px; border-radius:50%; display:grid; place-items:center; background:#fff0ad; color:#171c44; font-size:15px; font-weight:800; flex-shrink:0; }
.student-account-label { display:flex; flex-direction:column; min-width:0; }
.student-account-label small { font-size:11px; color:#626980; }
.student-account-label strong { font-size:14px; font-weight:750; overflow-wrap:anywhere; }
.student-account-status { font-size:12px; color:#626980; }
.student-account-logout { flex-shrink:0; min-height:36px; margin-left:3px; padding:6px 12px; border:1px solid #d5d9e6; border-radius:9px; background:#fff; color:#171c44; font:inherit; font-size:13px; font-weight:700; white-space:nowrap; cursor:pointer; }
.student-account-logout:hover:not(:disabled) { background:#f3f5fb; border-color:#b9c0d6; }
.student-account-logout:focus-visible { outline:3px solid #3b5bdb; outline-offset:2px; }
.student-account-logout:disabled { color:#626980; cursor:default; }
.student-account[data-logout=failed] .student-account-label small { color:#a3341c; font-weight:700; }
.student-account[data-state=unavailable] .student-account-status { color:#8a4d1d; }
@media(max-width:900px) {
  .studio-header-inner[data-student-header], .tl-nav[data-student-header] { gap:10px 14px; }
  [data-student-header] .studio-brand, [data-student-header] .tl-brand { order:1; }
  [data-student-header] .student-account { order:2; }
  [data-student-header] .studio-nav, [data-student-header] .tl-links { order:3; flex-basis:100%; margin-left:0; flex-wrap:wrap; }
  [data-student-header] .studio-teacher-link { order:4; margin-left:auto; border:0; padding-left:0; }
}
@media(max-width:520px) {
  [data-student-header] .studio-brand small { display:none; }
  .student-account { max-width:calc(100% - 96px); gap:7px; }
  .student-account-logout { min-height:34px; padding:5px 9px; font-size:12px; }
  .student-account-label strong { font-size:13px; }
  .student-account-avatar { width:30px; height:30px; font-size:13px; }
}
@media print { .student-account, .teacher-mode-toggle { display:none !important; } }
/* Match the existing full-screen teaching/presentation conventions. */
body.tv .student-account, body.tv .teacher-mode-toggle,
body.tv-mode .student-account, body.tv-mode .teacher-mode-toggle,
body.is-tv .student-account, body.is-tv .teacher-mode-toggle { display:none !important; }

/* 선생님이 반 전체를 로그아웃했을 때 학생 화면에 뜨는 안내(student-header.js 의 showEnded) */
.tl-ended { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(23, 28, 68, .55); animation: tlEndedFade .25s ease-out both; }
.tl-ended-card { box-sizing: border-box; width: min(420px, 100%); display: grid; justify-items: center; gap: 10px; padding: 26px 22px 22px; border-radius: 22px; background: #fff; color: #1d2433; text-align: center; word-break: keep-all; box-shadow: 0 24px 60px rgba(23, 28, 68, .35); animation: tlEndedUp .4s cubic-bezier(.2, .9, .25, 1.04) both; }
.tl-ended-mark { font-size: 44px; line-height: 1; }
.tl-ended-card strong { font-size: 20px; }
.tl-ended-card p { margin: 0; color: #5a6376; font-size: 15px; line-height: 1.5; }
.tl-ended-ok { margin-top: 6px; min-width: 140px; height: 46px; border: 0; border-radius: 14px; background: #171c44; color: #fff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.tl-ended-ok:focus-visible { outline: 3px solid #ffd43b; outline-offset: 2px; }
@keyframes tlEndedFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tlEndedUp { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tl-ended, .tl-ended-card { animation: none; } }
/* A class invitation appears only after the server confirms an open lesson. */
/* Keep the invitation readable over page-wide link colors, including visited links. */
[data-student-header] a.student-lesson-entry { display:inline-flex; align-items:center; min-height:40px; padding:8px 13px; border-radius:12px; background:#176b61; color:#fff; font-weight:700; text-decoration:none; white-space:nowrap; }
[data-student-header] a.student-lesson-entry:is(:hover,:focus-visible,:active) { background:#11574f; color:#fff; }
[data-student-header] .student-lesson-entry[hidden] { display:none; }
