/* =========================================================
   페이지 공통 + 페이지별 스타일 (design.css 다음에 불러옴)
   ========================================================= */

/* ---------- 공통 ---------- */
.wrap { position: relative; margin: 0 auto; display: flex; flex-direction: column; }
.pill { display: inline-flex; align-items: center; gap: 10px; border-radius: var(--r-pill); }
.nav-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: var(--r-pill); text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px;
}
.nav-link:hover { color: var(--ink); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border-radius: var(--r-pill); color: var(--ink);
}
.icon-btn:hover { color: var(--ink); }
.muted { color: var(--ink-2); }
.hidden { display: none !important; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.input {
  height: 48px; width: 100%; min-width: 0; border-radius: 16px; border: 1px solid rgba(78,88,104,.25);
  background: rgba(255,255,255,.8); padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink);
}
.input:focus { outline: 3px solid rgba(36,87,230,.35); outline-offset: 1px; }
select.input { padding-right: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-line { background: rgba(255,255,255,.7); color: var(--ink); border: 1px solid rgba(78,88,104,.2); }
.btn-danger { background: var(--returned-bg); color: var(--returned-fg); }
.btn[disabled] { opacity: .5; cursor: default; }

/* 토스트 */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 20px 12px 16px; border-radius: var(--r-pill); font-weight: 700; font-size: 15px; animation: rise .3s var(--ease) both; }
.toast::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.toast.toast-error { color: var(--returned-fg); background: #FFF3EE; border-color: rgba(194,65,12,.35); }
.toast-error::before { background: var(--returned-solid); }
.toast.toast-ok { color: var(--passed-fg); background: #EEFBF5; border-color: rgba(15,138,95,.35); }
.toast-ok::before { background: var(--passed-solid); }
.toast-out { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* 빈 화면 / 안내 상자 */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  border-radius: var(--r-md); background: rgba(255,255,255,.45); border: 1.5px dashed rgba(78,88,104,.35);
  color: var(--ink-2); text-align: center; padding: 24px;
}
.empty strong { font-size: 18px; color: var(--ink); }

/* 불러오는 중 */
.skeleton { border-radius: var(--r-md); background: linear-gradient(110deg, rgba(255,255,255,.35) 35%, rgba(255,255,255,.75) 50%, rgba(255,255,255,.35) 65%);
  background-size: 200% 100%; animation: shine 1.6s ease-in-out infinite; }
.lite .skeleton { animation: none; background: rgba(255,255,255,.6); }

/* ---------- 입구 (index.html) ---------- */
.main-wrap { max-width: 1040px; padding: 48px 24px 72px; gap: 40px; }
.main-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.brand { padding: 10px 18px; font-weight: 700; font-size: 16px; }
.main-title { margin: 8px 0 0; font-size: clamp(40px, 9vw, 60px); line-height: 1.1; font-weight: 900; letter-spacing: -0.03em; }
.last-class {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px;
  border-radius: var(--r-lg); text-decoration: none; color: var(--ink); flex-wrap: wrap;
}
.last-class:hover { color: var(--ink); }
.last-class .sub { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.last-class .big { font-size: clamp(22px, 5vw, 30px); font-weight: 900; letter-spacing: -0.02em; }
.go-dot { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: var(--r-pill); background: var(--accent); color: #fff; flex: none; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px; }
.class-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 140px; border-radius: var(--r-lg); text-decoration: none; color: var(--ink);
}
.class-btn:hover { color: var(--ink); }
.class-btn .n { font-size: 52px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.class-btn .u { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.main-wrap .lift:hover { transform: translateY(-4px) scale(1.02); }
@media (max-width: 480px) {
  .main-wrap { padding: 32px 16px 56px; gap: 28px; }
  .class-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
  .class-btn { height: 112px; }
  .class-btn .n { font-size: 44px; }
}

/* ---------- 반 페이지 (class.html) ---------- */
.class-wrap { max-width: 1200px; padding: 32px 24px 24px; gap: 24px; }
.class-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.class-top .left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.class-title { margin: 0; font-size: 36px; font-weight: 900; letter-spacing: -0.03em; view-transition-name: class-title; }
.lesson-chip { padding: 8px 16px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.class-body { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.board-card { flex: 999 1 560px; min-width: 0; border-radius: 32px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 4px 8px 0; flex-wrap: wrap; }
.board-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.board-note { font-size: 14px; font-weight: 500; }
.board-empty { min-height: clamp(220px, 40vh, 480px); }
/* 연결 끊김 표시: 화면은 그대로 두고 위쪽에 작게 */
.net-badge { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60; padding: 8px 18px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 700; color: var(--pending-fg); animation: rise .3s var(--ease) both; }
.side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sim-card { border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.sim-card h2 { margin: 0 0 4px 4px; font-size: 18px; font-weight: 700; }
.sim-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px;
  border-radius: 16px; background: rgba(255,255,255,.6); text-decoration: none; color: var(--ink); font-size: 16px; font-weight: 500;
}
.sim-link:hover { color: var(--ink); }
@media (max-width: 600px) {
  .class-wrap { padding: 20px 16px 16px; gap: 18px; }
  .class-title { font-size: 28px; }
  .board-card { padding: 12px; border-radius: var(--r-lg); }
}

/* ---------- 관리 (teacher/index.html) ---------- */
.admin-wrap { max-width: 1100px; padding: 32px 24px 80px; gap: 24px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-top h1 { margin: 0; font-size: 32px; font-weight: 900; letter-spacing: -0.03em; }
.card { border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.card h2 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.login-card { max-width: 420px; width: 100%; margin: 10vh auto 0; }

.today-list { display: flex; flex-direction: column; gap: 8px; }
.today-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 8px 8px 8px 16px; border-radius: 18px; background: rgba(255,255,255,.55); }
.today-row .cls { font-size: 18px; font-weight: 900; }

.grid-2 { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; }
.sim-rows { display: flex; flex-direction: column; gap: 8px; }
.class-picks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.sim-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 44px; gap: 8px; align-items: center; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.board-groups { display: flex; flex-direction: column; gap: 12px; }
.board-group { border-radius: 20px; background: rgba(255,255,255,.55); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.board-group header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.board-group header b { font-size: 17px; }
.board-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid rgba(78,88,104,.12); }
.board-item .cls { font-weight: 900; width: 44px; }
.board-item .src { flex: 1 1 200px; min-width: 0; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); }
.tag-today { background: var(--accent-tint); color: var(--accent); }
.tag-warn { background: var(--returned-bg); color: var(--returned-fg); }

dialog.sheet { border: 0; padding: 0; background: transparent; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
dialog.sheet::backdrop { background: rgba(11,18,32,.35); }
dialog.sheet .card { max-height: calc(100vh - 32px); overflow: auto; }

@media (max-width: 600px) {
  .admin-wrap { padding: 20px 16px 64px; }
  .card { padding: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .sim-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .sim-row .sim-url { grid-column: 1; }
  .sim-row .sim-del { grid-row: 1 / span 2; grid-column: 2; }
  .today-row { grid-template-columns: 48px minmax(0, 1fr); }
  .today-row .today-links { grid-column: 1 / -1; justify-self: end; }
}

/* ---------- 상태 점 색 ---------- */
.is-idle     { --s-dot: var(--idle-dot); }
.is-pending  { --s-dot: var(--pending-dot); }
.is-returned { --s-dot: var(--returned-solid); }
.is-passed   { --s-dot: var(--passed-solid); }

/* ---------- 반 페이지: 우리 모둠 ---------- */
.group-card { position: relative; overflow: hidden; border-radius: 32px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.group-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 12px; }
.group-head h2 { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -0.02em; white-space: nowrap; }
.link-btn { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; min-height: 44px; padding: 0 4px; white-space: nowrap; }
.link-btn:hover { color: var(--ink); }
#mine-body { display: flex; flex-direction: column; gap: 12px; }
.code-form { display: flex; flex-direction: column; gap: 12px; }
.code-form label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.code-input {
  height: 56px; width: 100%; border-radius: 18px; border: 1px solid rgba(78,88,104,.25); background: rgba(255,255,255,.8);
  padding: 0 18px; font: inherit; font-size: 22px; letter-spacing: .3em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.code-input:focus { outline: 3px solid rgba(36,87,230,.35); outline-offset: 1px; }
.code-input::placeholder { color: rgba(78,88,104,.45); letter-spacing: 0; }
.code-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.code-slots i { height: 4px; border-radius: 2px; background: rgba(78,88,104,.18); transition: background-color .15s; }
.code-slots i.on { background: var(--accent); }
.code-input.shake { animation: shake .4s var(--ease); border-color: var(--returned-solid); }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.num-input { letter-spacing: .1em; }
.form-err { margin: 0; font-size: 14px; font-weight: 700; color: var(--returned-fg); }
.state-box { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--r-md); background: var(--s-bg); }
.state-title { font-size: 20px; font-weight: 900; color: var(--s-fg); }
.spinner { flex: none; width: 44px; height: 44px; border-radius: 999px; border: 4px solid rgba(138,83,0,.18); border-top-color: var(--pending-fg); }
.returned-box { flex-direction: column; align-items: stretch; gap: 10px; }
.state-row { display: flex; align-items: center; gap: 10px; }
.bang { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 999px; background: var(--returned-solid); color: #fff; font-weight: 900; }
.memo { padding: 12px 14px; border-radius: var(--r-sm); background: rgba(255,255,255,.75); font-size: 16px; line-height: 1.5; word-break: break-word; }
.memo b { font-weight: 700; }
.passed-box { position: relative; overflow: hidden; flex-direction: column; justify-content: center; gap: 10px; padding: 28px 18px; text-align: center; }
.passed-box .confetti-bit { animation-iteration-count: 2; animation-fill-mode: both; }
.pass-check { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 999px; background: var(--passed-solid); color: #fff; box-shadow: 0 10px 24px rgba(15,138,95,.35); }
.pass-title { font-size: 30px; font-weight: 900; color: var(--passed-fg); }
.pass-sub { font-size: 15px; color: #23523F; }
#mine-body.morph { animation: morph .5s var(--ease); }

/* ---------- 반 페이지: 모둠 현황 ---------- */
.status-card { border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.status-card h2 { margin: 0 0 0 4px; font-size: 18px; font-weight: 700; }
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gs { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px 14px; border-radius: 16px; background: var(--s-bg); }
.gs .dot { flex: none; width: 10px; height: 10px; border-radius: 999px; background: var(--s-dot); }
.gs b { font-size: 15px; font-weight: 700; white-space: nowrap; }
.gs .lbl { margin-left: auto; font-size: 13px; font-weight: 500; color: var(--s-fg); white-space: nowrap; }
.gs.is-mine { box-shadow: inset 0 0 0 1.5px rgba(36,87,230,.4); }

/* ---------- 교사 공통 ---------- */
.gate { width: 100%; }

/* ---------- 검사 (teacher/check.html, 휴대폰 우선) ---------- */
.check-wrap { max-width: 520px; min-height: 100vh; min-height: 100dvh; padding: 0; }
.check-app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.check-wrap .gate { padding: 20px; }
.check-top { display: flex; align-items: center; gap: 10px; padding: max(28px, env(safe-area-inset-top)) 20px 4px; }
.check-top h1 { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -0.03em; }
.class-pick { position: relative; display: inline-flex; align-items: center; min-height: 44px; border-radius: var(--r-pill); color: var(--ink); }
.class-pick select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; font-size: 16px; font-weight: 700;
  color: var(--ink); min-height: 44px; padding: 0 38px 0 16px; cursor: pointer; border-radius: var(--r-pill);
}
.class-pick svg { position: absolute; right: 14px; pointer-events: none; }
.wait-badge { margin-left: auto; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(255,196,77,.3); color: var(--pending-fg); font-size: 15px; font-weight: 900; white-space: nowrap; }
.check-lesson { margin: 0; padding: 0 22px; min-height: 22px; font-size: 14px; color: var(--ink-2); }
.check-list { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 12px 20px 20px; }
.check-note { border-radius: var(--r-md); padding: 22px; text-align: center; font-size: 16px; font-weight: 500; color: var(--ink-2); }
.pending-list { display: flex; flex-direction: column; gap: 14px; }
.pending-list:empty { display: none; }
.pending-list.locked .sub-actions, .pending-list.locked .sub-return { display: none; }
.sub-card { border-radius: 26px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.sub-top { display: flex; align-items: center; gap: 10px; }
.sub-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sub-name b { font-size: 24px; font-weight: 900; letter-spacing: -0.02em; }
.sub-name span { font-size: 13px; color: var(--ink-2); }
.posts-go { margin-left: auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--accent-tint); color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.posts-sheet { display: flex; flex-direction: column; gap: 12px; }
.posts-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.posts-sheet-top h2 { margin: 0; font-size: 20px; }
.sub-actions { display: flex; gap: 10px; }
.act { height: 56px; border: 0; border-radius: var(--r-pill); font: inherit; font-size: 18px; font-weight: 900; cursor: pointer; }
.act[disabled] { opacity: .5; cursor: default; }
.act-again { flex: 1; background: rgba(255,122,69,.18); color: var(--returned-fg); }
.act-pass { flex: 1.4; background: var(--passed-solid); color: #fff; box-shadow: 0 8px 20px rgba(15,138,95,.3); }
.sub-actions.stack { flex-direction: column; }
.sub-actions.stack .act { flex: none; width: 100%; }
.act-cancel { flex: 1; height: 48px; font-size: 16px; font-weight: 700; background: rgba(255,255,255,.7); color: var(--ink); border: 1px solid rgba(78,88,104,.25); }
.act-send { flex: 2; height: 68px; font-size: 21px; background: var(--returned-solid); color: #fff; box-shadow: 0 10px 24px rgba(194,65,12,.3); }
.sub-return { display: flex; flex-direction: column; gap: 10px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset { min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid rgba(78,88,104,.25); background: rgba(255,255,255,.7); font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.preset[aria-pressed="true"] { border-color: var(--returned-solid); background: rgba(255,122,69,.18); color: var(--returned-fg); }
.memo-label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.memo-in { border-radius: var(--r-sm); background: rgba(255,255,255,.85); }
.done-h { margin: 10px 0 0 4px; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.done-box { border-radius: var(--r-md); padding: 6px 16px; }
.done-row { display: flex; align-items: center; gap: 10px; min-height: 52px; border-bottom: 1px solid rgba(78,88,104,.12); }
.done-row:last-child { border-bottom: 0; }
.done-row b { font-size: 16px; font-weight: 700; }
.done-row .muted { font-size: 13px; }
.done-tag { margin-left: auto; padding: 4px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; }
.check-bottom { position: sticky; bottom: 0; z-index: 5; padding: 16px 20px max(20px, env(safe-area-inset-bottom)); background: linear-gradient(rgba(237,241,247,0), rgba(237,241,247,.94) 40%); }
.reveal-open {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff; text-decoration: none; font-size: 17px; font-weight: 900; box-shadow: 0 12px 28px rgba(11,18,32,.3);
}
.reveal-open:hover { color: #fff; }
.check-admin { align-self: center; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; }

/* ---------- 순위 발표 (teacher/reveal.html, 프로젝터) ---------- */
.reveal-wrap { max-width: none; min-height: 100vh; padding: 0; }
.reveal-wrap .gate { padding: 24px; }
.reveal-ready { min-height: 100vh; display: flex; flex-direction: column; padding: 32px 24px; }
.ready-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding-bottom: 10vh; }
.ready-chip { padding: 8px 18px; font-size: 16px; font-weight: 700; color: var(--ink-2); }
.ready-title { margin: 6px 0 0; font-size: clamp(40px, 6vw, 72px); line-height: 1.08; font-weight: 900; letter-spacing: -0.04em; }
.ready-info { margin: 0; font-size: 20px; font-weight: 500; color: var(--ink-2); }
.ready-warn { margin: 0; padding: 10px 18px; border-radius: var(--r-pill); background: var(--pending-bg); color: var(--pending-fg); font-size: 16px; font-weight: 700; }
.ready-actions { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ready-start { min-width: 260px; min-height: 68px; font-size: 24px; }
.ready-cancel { min-height: 48px; padding: 0 22px; font-size: 16px; }
.ready-classes { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ready-cls { display: inline-flex; align-items: center; justify-content: center; width: 104px; height: 80px; border-radius: var(--r-md); text-decoration: none; color: var(--ink); font-size: 26px; font-weight: 900; }
.ready-cls:hover { color: var(--ink); }

.stage { position: fixed; inset: 0; z-index: 30; color: #fff; overflow: hidden; cursor: pointer; user-select: none; }
.stage-dim { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 20%, #1B2A4A 0%, #0B1220 60%, #05080F 100%); }
.stage.plain .stage-dim { animation: fade-in .5s var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } }
.stage-inner { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 3vh; padding: 4vh 4vw 12vh; overflow-y: auto; }
.stage-label { margin: 0; padding: 8px 20px; border-radius: var(--r-pill); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-size: clamp(16px, 1.6vw, 22px); font-weight: 700; color: rgba(255,255,255,.85); }
.stage-empty { margin: auto 0; font-size: clamp(28px, 4vw, 48px); font-weight: 900; }
.podium { width: min(1200px, 100%); margin-top: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4vw; align-items: end; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 2vh; }
.slot.empty { visibility: hidden; }
.slot-top { position: relative; isolation: isolate; width: min(100%, 320px, 36vh); display: flex; flex-direction: column; align-items: center; gap: 1.4vh; }
.pts { padding: 8px 18px; border-radius: var(--r-pill); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); font-size: clamp(16px, 1.8vw, 24px); font-weight: 900; white-space: nowrap; opacity: 0; }
.crown { position: relative; z-index: 2; margin-bottom: -2.4vh; opacity: 0; filter: drop-shadow(0 6px 14px rgba(242,183,5,.45)); }
.flip { width: 100%; perspective: 1200px; }
.flip-inner { position: relative; transform-style: preserve-3d; }
.face { border-radius: 28px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 5 / 4; }
.face.back { background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.22); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.face.back span { font-size: clamp(56px, 7vw, 110px); font-weight: 900; color: rgba(255,255,255,.35); }
.face.front { position: absolute; inset: 0; transform: rotateY(180deg); background: rgba(255,255,255,.95); color: var(--ink); border: 4px solid var(--ring); box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.face.front b { font-size: clamp(36px, 4.6vw, 72px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.face.front span { font-size: clamp(16px, 1.6vw, 22px); font-weight: 700; color: var(--ink-2); }
.block { width: 100%; display: flex; justify-content: center; padding-top: 2vh; border-radius: 24px 24px 12px 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.block span { font-size: clamp(44px, 5vw, 80px); font-weight: 900; letter-spacing: -0.04em; color: var(--ring); line-height: 1; }
.slot[data-rank="1"] .block { height: 28vh; }
.slot[data-rank="2"] .block { height: 21vh; }
.slot[data-rank="3"] .block { height: 16.5vh; }
.rays-bg { position: absolute; left: 50%; top: 50%; width: 220%; aspect-ratio: 1; margin-left: -110%; transform-origin: center; translate: 0 -50%; opacity: 0; pointer-events: none; z-index: -1; }
.rays-spin { width: 100%; height: 100%; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255,214,107,.28) 0deg 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0 20%, transparent 68%); mask: radial-gradient(circle, #000 0 20%, transparent 68%); }
.slot[data-rank="1"] .block { position: relative; overflow: hidden; isolation: isolate; }
.slot.is-open[data-rank="1"] .block::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.3) 50%, transparent 80%);
  transform: translateX(-100%); animation: shine-x 3.2s ease-in-out infinite; will-change: transform; }
.lite .slot.is-open[data-rank="1"] .block::after { display: none; }
.slot.is-open .flip-inner { transform: rotateY(180deg); }
.slot.is-open .pts, .slot.is-open .crown, .slot.is-open .rays-bg { opacity: 1; }
/* gsap을 못 쓸 때(저사양·움직임 줄이기·불러오기 실패) */
.stage.plain .slot:not(.empty) .block { animation: grow .7s var(--ease) both; transform-origin: bottom; }
.stage.plain .slot.is-open .flip { animation: pop .6s var(--ease-back) both; }
.stage.plain .slot.is-open .pts { animation: rise .5s var(--ease) .2s both; }
.stage.plain .rest:not(.hidden) li { animation: rise .45s var(--ease) both; animation-delay: var(--d, 0s); }
.lite .stage .slot.is-open[data-rank="1"] .block { animation: none; }
.rest { width: min(900px, 100%); margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.rest li { display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 0 22px; border-radius: 20px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: clamp(18px, 1.8vw, 24px); }
.rest .r { width: 40px; font-weight: 900; color: rgba(255,255,255,.6); text-align: center; }
.rest b { font-weight: 900; }
.rest .muted-d { color: rgba(255,255,255,.6); font-size: .8em; }
.rest .p { margin-left: auto; font-weight: 900; }
.stage-ctrl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; padding: 2vh 3vw; pointer-events: none; }
.stage-btn { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: var(--r-pill); border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.stage-next { background: rgba(255,255,255,.92); color: var(--ink); border-color: transparent; }

/* ---------- 관리: 오늘 보드 링크, 태그 ---------- */
.today-links { display: flex; gap: 6px; }
.tag-done { background: var(--passed-bg); color: var(--passed-fg); }
.tag-off { background: rgba(78,88,104,.12); color: var(--ink-2); }

/* ---------- 관리: 명단과 코드 ---------- */
.cls-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cls-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid rgba(78,88,104,.2); background: rgba(255,255,255,.6); font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; }
.cls-tab .num { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.cls-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cls-tab.on .num { color: rgba(255,255,255,.8); }
.roster-count { font-size: 14px; }
.roster { display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow-y: auto; }
.roster-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 8px 6px 16px; border-radius: 16px; background: rgba(255,255,255,.55); }
.roster-row > b { width: 48px; font-size: 16px; font-weight: 900; }
.roster-row.off { opacity: .6; }
.roster-code { font-size: 15px; font-weight: 800; letter-spacing: .08em; min-width: 64px; }
.roster-btns { margin-left: auto; display: flex; gap: 6px; }
.codes-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 14px; max-height: 50vh; overflow-y: auto; font-size: 15px; }
.codes-preview b { font-weight: 900; letter-spacing: .06em; }

/* ---------- 관리: 반별 마지막 번호 ---------- */
.roster-size { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.45); }
.roster-size-label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.roster-size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.roster-size-item { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.roster-size-item span { width: 40px; }
.roster-size-item .input { width: 72px; height: 44px; text-align: center; padding: 0 6px; }

/* ---------- 모둠 편성 (teacher/groups.html) ---------- */
.groups-wrap { max-width: 1280px; padding: 28px 24px 64px; gap: 18px; }
.groups-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.groups-top h1 { margin: 0; font-size: 32px; font-weight: 900; letter-spacing: -0.03em; }
.groups-top .cls-tabs { margin-left: auto; }
.groups-lesson { margin: -6px 0 0 62px; min-height: 22px; font-size: 15px; color: var(--ink-2); }
.groups-panel { gap: 14px; }
.groups-controls { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.gcount { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.gcount .input { width: 72px; height: 44px; text-align: center; font-size: 18px; font-weight: 900; padding: 0 6px; }
.mode-row { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mode-label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.gstats { margin-left: auto; font-size: 14px; color: var(--ink-2); }
.roll { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.roll-chip {
  height: 48px; border-radius: 14px; border: 1.5px solid rgba(78,88,104,.2); background: rgba(255,255,255,.75);
  font: inherit; font-size: 18px; font-weight: 900; color: var(--ink); cursor: pointer; transition: transform .15s, background .15s, border-color .15s;
}
.roll-chip:active { transform: scale(.94); }
.roll-chip:hover { border-color: var(--accent); }
.roll-chip.off { background: var(--returned-bg); border-color: var(--returned-solid); color: var(--returned-fg); text-decoration: line-through; }
.roll-chip.tied { background: var(--c); border-color: transparent; color: #fff; }
.roll-chip.picking { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36,87,230,.25); }
.roll-chip[disabled] { cursor: default; }
.cluster-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cluster-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cluster-list:empty { display: none; }
.cluster-item { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px 0 14px; border-radius: var(--r-pill); background: rgba(255,255,255,.7); border: 1.5px solid var(--c); font-size: 15px; font-weight: 700; }
.cluster-item .dot { width: 10px; height: 10px; border-radius: 999px; background: var(--c); }
.groups-actions { margin-top: 4px; }
.groups-actions .btn { min-height: 52px; padding: 0 28px; font-size: 17px; }
.groups-state { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.groups-state.is-saved { color: var(--passed-fg); }
.warn-note { margin: 0; padding: 10px 16px; border-radius: var(--r-sm); background: var(--pending-bg); color: var(--pending-fg); font-size: 14px; font-weight: 700; }
/* 편성 결과: 화면 전체를 덮는 창. 모둠 카드는 같은 크기(격자 칸을 똑같이 나눔), 글자는 카드 크기에 맞춰 커짐 */
.gstage {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; gap: 2vh;
  padding: 3vh 3vw; background: rgba(237,241,247,.82);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  animation: fade-in .3s var(--ease) both;
}
.lite .gstage { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
.gstage-top { display: flex; align-items: baseline; gap: 16px; }
.gstage-top h2 { margin: 0; font-size: clamp(28px, 4.4vh, 48px); font-weight: 900; letter-spacing: -0.03em; }
.gstage-sub { font-size: clamp(15px, 2vh, 20px); font-weight: 500; color: var(--ink-2); }
.gstage-close { margin-left: auto; align-self: center; border: 0; cursor: pointer; }
.gstage-grid {
  flex: 1; min-height: 0; display: grid; gap: 2vh 1.6vw;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows, 2), minmax(0, 1fr));
}
.gstage-bottom { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.gstage-bottom .btn { min-height: 52px; padding: 0 28px; font-size: 17px; }
.gcard { container-type: size; min-width: 0; min-height: 0; border-radius: var(--r-lg); padding: clamp(14px, 2.6vh, 30px) clamp(16px, 1.8vw, 34px); display: flex; flex-direction: column; gap: 1vh; overflow: hidden; }
.gcard header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.gcard header b { font-size: clamp(20px, 13cqmin, 64px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.gcard header span { font-size: clamp(13px, 6cqmin, 26px); font-weight: 700; color: var(--ink-2); }
/* --fs: 번호 글자 크기(모든 카드 같게), --per: 이 카드의 한 줄 인원. 둘 다 groups.js가 카드 크기를 재서 정한다 */
.gmembers { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--per, 4), auto); align-content: center; justify-content: center; gap: .2em; font-size: var(--fs, 32px); }
.gm {
  min-width: 1.9em; padding: 0 .3em; border-radius: .3em; background: var(--accent-tint); text-align: center;
  font-size: 1em; font-weight: 900; line-height: 1.25; color: var(--ink);
}
.gm-empty { grid-column: 1 / -1; }
.gm.tied { box-shadow: inset .14em 0 0 var(--c); }
.gm-empty { font-size: clamp(14px, 6cqmin, 22px); color: var(--ink-2); }
@media (max-width: 600px) {
  .groups-wrap { padding: 20px 16px 48px; }
  .groups-top .cls-tabs { margin-left: 0; }
  .groups-lesson { margin-left: 0; }
  .gstats { margin-left: 0; }
}

/* ---------- 관리: 빠른 피드백 버튼 ---------- */
.preset-list { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-list:empty { display: none; }
.preset-item { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 4px 0 14px; border-radius: var(--r-pill); background: rgba(255,255,255,.7); border: 1px solid rgba(78,88,104,.2); font-size: 14px; font-weight: 700; }
.preset-del { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; }
.preset-del:hover { background: var(--returned-bg); color: var(--returned-fg); }
.preset-add { display: flex; gap: 8px; max-width: 420px; }

@media (max-width: 600px) {
  .roster-row { padding: 8px 10px 8px 14px; }
  .roster-btns { margin-left: 0; width: 100%; justify-content: flex-end; }
}

/* ---------- 코드 카드 인쇄 (A4, 3칸 × 8줄) ---------- */
.print-sheet { display: none; }
@page { size: A4; margin: 10mm; }
@media print {
  body { background: #fff !important; min-height: 0; }
  body > :not(.print-sheet), dialog { display: none !important; }
  .print-sheet { display: flex !important; flex-wrap: wrap; align-content: flex-start; width: 190mm; }
  .code-card {
    width: 63.33mm; height: 34mm; padding: 3mm 4mm; border: 0.3mm dashed #888; break-inside: avoid;
    display: flex; flex-direction: column; justify-content: space-between; color: #000; font-family: 'Noto Sans KR', sans-serif;
  }
  .cc-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 10pt; }
  .cc-top span { font-size: 9pt; }
  .cc-code { font-size: 24pt; font-weight: 900; letter-spacing: .08em; text-align: center; font-variant-numeric: tabular-nums; }
  .cc-bottom { display: flex; justify-content: space-between; align-items: flex-end; font-size: 8pt; color: #444; }
  .cc-name { flex: 1; margin-right: 3mm; border-bottom: 0.3mm solid #999; padding-bottom: 0.5mm; }
}

/* ---------- 3단계 공통 ---------- */
.page-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tag-pending { background: var(--pending-bg); color: var(--pending-fg); }
.mv-up { color: var(--passed-solid); }
.mv-down { color: var(--returned-solid); }
.mv-new { color: var(--accent); }
.me-chip { padding: 3px 10px; border-radius: var(--r-pill); background: var(--accent); font-size: 12px; font-weight: 700; color: #fff; flex: none; }
.top-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 내 기록 (me.html) ---------- */
.me-wrap { max-width: 960px; padding: 32px 24px 72px; gap: 24px; }
.me-login { max-width: 460px; width: 100%; margin: 4vh auto 0; border-radius: var(--r-xl); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.me-login h1 { margin: 0; font-size: 32px; font-weight: 900; letter-spacing: -0.03em; }
.me-body { display: flex; flex-direction: column; gap: 24px; }
.me-hero { border-radius: var(--r-xl); padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.me-avatar { flex: none; width: 200px; height: 200px; }
.me-avatar svg { width: 100%; height: 100%; }
.me-main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.me-name-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.me-name { margin: 0; font-size: 40px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.15; overflow-wrap: anywhere; }
.nick-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: -8px; }
.nick-form { display: flex; gap: 8px; flex-wrap: wrap; }
.nick-form .input { flex: 1 1 180px; width: auto; }
.me-level { display: flex; align-items: center; gap: 20px; margin-top: 4px; }
.lv-ring { position: relative; flex: none; width: 112px; height: 112px; }
.lv-ring svg { transform: rotate(-90deg); }
.lv-arc { transition: stroke-dashoffset 1.6s var(--ease) .2s; }
.lv-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lv-text span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.lv-text b { font-size: 38px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.lv-bar-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lv-bar-head { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.lv-bar-head b { font-weight: 900; color: var(--ink); }
.xp-track { height: 18px; border-radius: var(--r-pill); background: rgba(36,87,230,.12); overflow: hidden; }
.xp-fill { width: 0; height: 100%; border-radius: var(--r-pill); background: var(--accent); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.stat-k { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.stat-v { display: flex; align-items: center; gap: 8px; font-size: 36px; font-weight: 900; letter-spacing: -0.03em; }
.stat-s { min-height: 20px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.stat-s.muted { font-weight: 500; color: var(--ink-2); }
.me-card { border-radius: 32px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.me-card h2 { margin: 0 0 0 4px; font-size: 22px; font-weight: 900; }
.me-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wear-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.wear-opt {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: var(--r-md);
  border: 2px solid transparent; background: rgba(255,255,255,.6); font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.wear-opt:hover { border-color: rgba(36,87,230,.3); }
.wear-opt[aria-checked="true"] { border-color: var(--accent); background: rgba(255,255,255,.9); box-shadow: 0 8px 20px rgba(36,87,230,.18); }
.hist { display: flex; flex-direction: column; }
.hist-row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 8px; border-bottom: 1px solid rgba(78,88,104,.12); }
.hist-row:last-child { border-bottom: 0; }
.hist-d { width: 48px; flex: none; font-size: 14px; color: var(--ink-2); }
.hist-w { min-width: 0; font-size: 16px; font-weight: 500; }
.hist-a { margin-left: auto; flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.hist-a b { font-size: 16px; font-weight: 900; }
.hist-a small { font-size: 12px; font-weight: 700; opacity: .8; }
.hist-a.up { color: var(--passed-solid); }
.hist-a.down { color: var(--returned-solid); }

/* 레벨업 */
.lvup { position: fixed; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center;
  background: rgba(237,241,247,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lite .lvup { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(237,241,247,.94); }
.lvup-plain { animation: fade-in .4s ease both; }
.lvup-plain .lvup-card { animation: pop .8s var(--ease-back) both; }
.lvup-box { position: relative; width: 420px; max-width: calc(100% - 48px); }
.lvup-rays { position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; margin: -280px 0 0 -280px; opacity: .5; pointer-events: none; }
.lvup-rays svg { width: 100%; height: 100%; }
.lvup-card { position: relative; border-radius: 40px; padding: 32px 32px 36px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.lvup-av { position: relative; width: 184px; height: 184px; display: grid; place-items: center; margin-bottom: 4px; }
.lvup-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.lvup-h { font-size: 18px; font-weight: 700; color: var(--accent); }
.lvup-n { font-size: 96px; font-weight: 900; letter-spacing: -0.05em; line-height: 1; }
.lvup-s { font-size: 16px; color: var(--ink-2); }
.lvup-card .btn { margin-top: 10px; min-width: 160px; }

@media (max-width: 600px) {
  .me-wrap { padding: 20px 16px 56px; gap: 18px; }
  .me-hero { padding: 22px; justify-content: center; gap: 18px; }
  .me-avatar { width: 160px; height: 160px; }
  .me-name { font-size: 30px; }
  .me-level { gap: 14px; }
  .lv-ring { width: 92px; height: 92px; }
  .lv-ring svg { width: 92px; height: 92px; }
  .lv-text b { font-size: 30px; }
}

/* ---------- 순위표 (rank.html) ---------- */
.rank-wrap { max-width: 960px; padding: 32px 24px 72px; gap: 32px; }
.rank-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.rank-chip { padding: 6px 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.rank-head h1 { margin: 8px 0 0; font-size: clamp(40px, 8vw, 60px); line-height: 1.05; font-weight: 900; letter-spacing: -0.04em; }
.rank-head .muted { font-size: 15px; }
.rank-tabs { align-self: center; margin-top: 10px; }
.podium-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.pod.empty { visibility: hidden; }
.pod-top { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.pod-av { display: inline-flex; border-radius: var(--r-pill); background: rgba(255,255,255,.85); border: 4px solid var(--ring); box-shadow: 0 10px 26px rgba(28,39,76,.16); }
.crown-ic { margin-bottom: -6px; filter: drop-shadow(0 4px 10px rgba(242,183,5,.4)); }
.pod-name { font-size: 20px; font-weight: 900; letter-spacing: -0.02em; text-align: center; overflow-wrap: anywhere; }
.pod-xp { font-size: 26px; font-weight: 900; }
.pod-xp small, .rr-xp small { font-weight: 700; color: var(--ink-2); }
.pod-xp small { font-size: 14px; }
.pod-block { width: 100%; border-radius: 24px 24px 12px 12px; display: flex; justify-content: center; padding-top: 14px; }
.pod-block span { font-size: 44px; font-weight: 900; color: var(--ring); letter-spacing: -0.04em; line-height: 1; }
.pod[data-rank="1"] .pod-block { height: 200px; }
.pod[data-rank="2"] .pod-block { height: 150px; }
.pod[data-rank="3"] .pod-block { height: 118px; }
.rank-list { margin: 0; padding: 8px; list-style: none; border-radius: var(--r-lg); display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px; border-radius: 20px; border: 1.5px solid transparent; }
.rank-row.is-mine { background: rgba(36,87,230,.12); border-color: rgba(36,87,230,.35); }
.rank-row svg.av { flex: none; }
.rr-rank { width: 32px; flex: none; font-size: 20px; font-weight: 900; color: var(--ink-2); text-align: center; }
.rr-name { min-width: 0; font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-who { min-width: 0; display: flex; align-items: center; gap: 14px; }
.rr-tags { display: flex; align-items: center; gap: 8px; flex: none; }
.rr-move { margin-left: auto; width: 52px; flex: none; font-size: 14px; font-weight: 700; color: #6B7383; text-align: right; }
.rr-move.mv-up { color: var(--passed-solid); }
.rr-move.mv-down { color: var(--returned-solid); }
.rr-move.mv-new { color: var(--accent); }
.rr-xp { width: 84px; flex: none; text-align: right; font-size: 18px; font-weight: 900; }
.rr-xp small { font-size: 12px; }
@media (max-width: 600px) {
  .rank-wrap { padding: 20px 16px 56px; gap: 24px; }
  .rank-tabs .class-tab { padding: 0 18px; font-size: 15px; }
  .podium-row { gap: 8px; }
  .pod-av svg { width: 64px; height: 64px; }
  .pod-name { font-size: 15px; }
  .pod-xp { font-size: 20px; }
  .pod[data-rank="1"] .pod-block { height: 140px; }
  .pod[data-rank="2"] .pod-block { height: 104px; }
  .pod[data-rank="3"] .pod-block { height: 84px; }
  .pod-block span { font-size: 32px; }
  .rank-row { gap: 10px; padding: 6px 10px; }
  .rr-who { flex-direction: column; align-items: flex-start; gap: 2px; }
  .rr-tags .chip { padding: 1px 8px; font-size: 12px; }
  .rr-move { width: 40px; }
  .rr-xp { width: auto; font-size: 16px; }
}

/* ---------- 반 페이지: 우리 모둠원 캐릭터 ---------- */
.mates { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.mate { margin: 0; width: 60px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mate figcaption { max-width: 100%; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mate.me figcaption { color: var(--accent); }

/* ---------- 관리: 닉네임 승인 ---------- */
.nick-list { display: flex; flex-direction: column; gap: 6px; }
.nick-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 8px 8px 16px; border-radius: 16px; background: rgba(255,255,255,.55); }
.nick-row > b { width: 76px; font-weight: 900; }
.nick-row .new { font-size: 17px; font-weight: 900; }
.nick-row .old { font-size: 13px; color: var(--ink-2); }
.nick-row .roster-btns { margin-left: auto; }
.nick-rule { margin: 0 0 10px; font-size: 13px; }
.nick-edit { padding-top: 6px; padding-bottom: 6px; }
.nick-edit > b { width: 48px; }
.nick-edit .input { width: 150px; height: 40px; font-weight: 700; }
.nick-edit .req { font-size: 13px; color: var(--ink-2); }
.nick-edit .btn { margin-left: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- 입구: 로그인 (index.html) ---------- */
.login-view { display: flex; flex-direction: column; gap: 24px; }
.login-box { max-width: 560px; width: 100%; border-radius: var(--r-xl); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.login-classes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.login-cls {
  height: 64px; border-radius: var(--r-md); border: 1.5px solid rgba(78,88,104,.2); background: rgba(255,255,255,.7);
  display: flex; align-items: baseline; justify-content: center; gap: 1px; font: inherit; color: var(--ink); cursor: pointer;
  padding-top: 14px;
}
.login-cls b { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; }
.login-cls span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.login-cls.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(36,87,230,.3); }
.login-cls.on span { color: rgba(255,255,255,.85); }
.login-cls.is-other { position: relative; border-style: dashed; }
.login-cls .cls-go { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.login-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.guest { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.guest-label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.guest-links { display: flex; gap: 8px; flex-wrap: wrap; }
.guest-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 700; }
.guest-link:hover { color: var(--ink); }

/* ---------- 입구: 로그인 뒤 (왼쪽 캐릭터, 오른쪽 메뉴) ---------- */
.home { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.home-me { border-radius: var(--r-xl); padding: 32px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.home-av { width: 240px; height: 240px; }
.home-av svg { width: 100%; height: 100%; }
.home-nick { margin: 8px 0 0; font-size: 32px; font-weight: 900; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.home-menu { display: flex; flex-direction: column; gap: 16px; }
.home-item {
  flex: 1; min-height: 110px; display: flex; align-items: center; gap: 18px; padding: 20px 26px;
  border-radius: var(--r-lg); text-decoration: none; color: var(--ink);
}
.home-item:hover { color: var(--ink); }
.home-item[hidden] { display: none; }
.home-ic { flex: none; width: 60px; height: 60px; border-radius: 18px; background: var(--accent-tint); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.home-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-txt b { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.home-txt span { font-size: 15px; color: var(--ink-2); min-height: 1em; }
.home-go { margin-left: auto; font-size: 34px; font-weight: 500; color: var(--ink-2); line-height: 1; }
.main-wrap .home-item.lift:hover { transform: translateY(-3px); }
/* 수업: 로그인 뒤 가장 먼저 누르는 칸이라 크게 */
#go-class.home-item {
  flex: 1.6; min-height: 150px; color: #fff; border-color: rgba(255,255,255,.3);
  background: radial-gradient(120% 90% at 100% 0%, #5B8CFF 0%, transparent 55%), linear-gradient(150deg, #2F66F2 0%, #1C3FB5 100%);
  box-shadow: 0 16px 36px rgba(36,87,230,.28), inset 0 1px 0 rgba(255,255,255,.35);
}
#go-class.home-item:hover { color: #fff; }
#go-class .home-ic { background: rgba(255,255,255,.2); color: #fff; }
#go-class .home-txt b { font-size: 32px; }
#go-class .home-txt span, #go-class .home-go { color: rgba(255,255,255,.88); }
.home-mats { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .home { grid-template-columns: 1fr; }
  .home-av { width: 180px; height: 180px; }
  .home-item { min-height: 88px; }
}
@media (max-width: 480px) {
  .login-box { padding: 20px; }
  .login-classes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .login-row { grid-template-columns: 96px minmax(0, 1fr); }
  .home-txt b { font-size: 22px; }
  #go-class .home-txt b { font-size: 26px; }
  #go-class.home-item { min-height: 120px; }
}

/* ---------- 반 페이지: 로그인 안 했을 때 ---------- */
.login-need { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.login-need .state-title { font-size: 17px; }
.mine-num { font-size: 14px; font-weight: 500; }

/* ---------- 관리 첫 화면 (teacher/index.html) ---------- */
.admin-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.panel { display: flex; flex-direction: column; gap: 24px; }
.panel.card { gap: 16px; }

/* 관리 사이드바 (teacher-side.js). 흐림 없이 거의 불투명한 흰색(스크롤 때 다시 그리지 않게) */
:root { --side-w: 248px; }
aside.side { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: var(--side-w); display: flex; flex-direction: column; gap: 6px;
  padding: 18px 12px 16px; background: rgba(255,255,255,.9); border-right: 1px solid rgba(11,18,32,.07);
  overflow-y: auto; overscroll-behavior: contain; transition: transform var(--t-fast) var(--ease); }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 6px 12px; }
.side-top b { font-size: 19px; font-weight: 900; letter-spacing: -0.02em; }
.side-x { width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.side-x:hover { background: rgba(11,18,32,.06); color: var(--ink); }
.side-x svg { width: 21px; height: 21px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-label { display: flex; align-items: center; gap: 7px; margin: 14px 0 4px 12px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.side-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--g); }
.side-link { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 12px;
  background: transparent; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer; }
.side-link:hover { background: rgba(11,18,32,.05); color: var(--ink); }
.side-link[aria-current="page"] { background: var(--accent-tint); color: var(--accent); font-weight: 700; }
.side-link > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-ic { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--g-bg, rgba(11,18,32,.06)); color: var(--g, var(--ink-2)); }
.side-ic svg { width: 16px; height: 16px; }
.side-ext { flex: none; width: 14px; height: 14px; color: var(--ink-2); opacity: .55; display: grid; }
.side-ext svg { width: 14px; height: 14px; }
.side-badge { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill); background: var(--returned-solid); color: #fff;
  font-style: normal; font-weight: 900; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
.side-out { margin-top: 8px; color: var(--ink-2); }
.side-scrim { display: none; }
.side-open { display: none; cursor: pointer; }

@media (min-width: 961px) {
  /* 로그인 뒤(관리 화면이 보일 때)만 사이드바 자리를 비운다 */
  html:not(.side-closed) body:has(#v-admin:not(.hidden)) { padding-left: var(--side-w); }
  html:not(.side-closed) .admin-top .top-out { display: none; }
  html.side-closed aside.side { transform: translateX(-100%); visibility: hidden; }
  html.side-closed .side-open { display: grid; }
}
@media (min-width: 961px) and (max-width: 1180px) {
  html:not(.side-closed) .hub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  aside.side { width: min(280px, 84vw); background: #F8FAFD; transform: translateX(-100%); visibility: hidden; box-shadow: var(--shadow-strong);
    transition: transform var(--t-fast) var(--ease), visibility 0s linear var(--t-fast); }
  html.side-drawer aside.side { transform: none; visibility: visible; transition: transform var(--t-fast) var(--ease); }
  html.side-drawer .side-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(11,18,32,.3); }
  .side-open { display: grid; }
}
@media (prefers-reduced-motion: reduce) { aside.side { transition: none; } }

/* 묶음: 수업 · 학생 · 점수와 상점 · 기타. 묶음마다 아이콘 색만 다르다 */
.hub { display: flex; flex-direction: column; gap: 28px; }
.hub-group { display: flex; flex-direction: column; gap: 12px; }
.g-class   { --g: #2457E6; --g-bg: rgba(36,87,230,.12); }
.g-student { --g: #0F8A5F; --g-bg: rgba(15,138,95,.13); }
.g-point   { --g: #C26A00; --g-bg: rgba(255,170,51,.20); }
.g-etc     { --g: #6D4FD8; --g-bg: rgba(125,92,232,.14); }
.hub-label { display: flex; align-items: center; gap: 8px; margin: 0 0 0 4px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--ink-2); }
.hub-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--g); }
.hub-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

.hub-item {
  position: relative; min-height: 132px; padding: 20px 22px; border-radius: var(--r-lg); text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
}
.hub-item:hover { color: var(--ink); }
.hub-item b { font-size: 19px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.3; }
.hub-item span { font-size: 13.5px; color: var(--ink-2); min-height: 1.2em; }
.hub-item b { margin-top: 12px; }
.hub-ic { flex: none; margin-bottom: auto; width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; background: var(--g-bg); color: var(--g); transition: transform .3s var(--ease-back); }
.hub-ic svg { width: 22px; height: 22px; }
.hub-item:hover .hub-ic { transform: scale(1.08) rotate(-4deg); }
.hub-go { position: absolute; top: 20px; right: 20px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: var(--g); background: rgba(255,255,255,.7);
  opacity: 0; transform: translate(-4px, 4px); transition: opacity .2s, transform .25s var(--ease); }
.hub-go svg { width: 16px; height: 16px; }
.hub-item:hover .hub-go, .hub-item:focus-visible .hub-go { opacity: 1; transform: none; }
.hub-badge { position: absolute; top: 18px; right: 18px; z-index: 1; min-width: 30px; height: 30px; padding: 0 9px; border-radius: var(--r-pill);
  background: var(--returned-solid); color: #fff; font-style: normal; font-weight: 900; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(194,65,12,.35); }
.hub-badge:not(.hidden) ~ .hub-go { display: none; }

/* 수업 시작: 2칸 x 2줄 큰 카드. .lite .glass의 흰 배경보다 이겨야 해서 선택자를 세게 쓴다 */
.hub-item.hub-start.glass {
  grid-column: span 2; grid-row: span 2; min-height: 278px; padding: 28px 30px;
  background: radial-gradient(120% 90% at 100% 0%, #5B8CFF 0%, transparent 55%), linear-gradient(150deg, #2F66F2 0%, #1C3FB5 100%);
  color: #fff; border-color: rgba(255,255,255,.25);
  box-shadow: 0 18px 40px rgba(36,87,230,.32), inset 0 1px 0 rgba(255,255,255,.35);
}
.hub-start::before { content: ""; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%;
  border: 36px solid rgba(255,255,255,.08); pointer-events: none; }
.hub-start:hover { color: #fff; }
.hub-item.hub-start b { font-size: 34px; letter-spacing: -0.03em; }
.hub-item.hub-start span { font-size: 15px; color: rgba(255,255,255,.85); }
.hub-start .hub-ic { width: 60px; height: 60px; border-radius: 18px; background: rgba(255,255,255,.18); color: #fff; }
.hub-start .hub-ic svg { width: 28px; height: 28px; fill: currentColor; }
.hub-start .hub-go { top: 28px; right: 28px; width: 40px; height: 40px; opacity: 1; transform: none; color: #fff; background: rgba(255,255,255,.18); }
.hub-start:hover .hub-go { background: #fff; color: var(--accent); }
.hub-start.glass-live::after { background: radial-gradient(260px circle at var(--mx,50%) var(--my,0%), rgba(255,255,255,.25), transparent 60%); }

@media (max-width: 900px) {
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-item.hub-start.glass { grid-row: auto; min-height: 190px; }
  .hub-item.hub-start b { font-size: 28px; }
}
@media (max-width: 420px) {
  .hub-grid { gap: 10px; }
  .hub-item { min-height: 118px; padding: 16px; }
  .hub-item b { font-size: 16px; }
  .hub-item span { font-size: 12.5px; }
  .hub-ic { width: 36px; height: 36px; border-radius: 11px; }
  .hub-ic svg { width: 19px; height: 19px; }
  .hub-start .hub-ic { width: 48px; height: 48px; }
  .hub-item.hub-start.glass { min-height: 170px; padding: 20px; }
  .hub-item.hub-start b { font-size: 24px; }
  .hub-start .hub-go { top: 20px; right: 20px; }
}

/* ---------- 관리: 수업 시작 (차시 창) ---------- */
.lesson-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.lesson-win { gap: 14px; }
.lesson-win.is-open { box-shadow: var(--shadow-strong), inset 0 0 0 2px rgba(36,87,230,.35); }
.lesson-win-top { display: flex; align-items: center; gap: 10px; }
.lesson-code { font-size: 30px; font-weight: 900; letter-spacing: -0.03em; flex: none; }
.lesson-title { height: 40px; font-size: 15px; }
.lesson-src-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.lesson-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lesson-sheet { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ws-pick { position: relative; cursor: pointer; }
.ws-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.lesson-go { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lesson-need { font-size: 13px; }
.lesson-classes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lesson-cls { min-height: 64px; border: 1px solid rgba(78,88,104,.2); border-radius: var(--r-md); background: rgba(255,255,255,.75);
  font: inherit; font-size: 22px; font-weight: 900; color: var(--ink); cursor: pointer; }
.lesson-cls:hover { border-color: var(--accent); color: var(--accent); }
.lesson-cls.is-last { background: var(--accent); border-color: var(--accent); color: #fff; }
.lesson-cls[disabled] { opacity: .5; cursor: default; }
.lesson-add { max-width: 560px; }
@media (max-width: 600px) { .lesson-list { grid-template-columns: 1fr; } }

/* 반별 잠금 */
.lock-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.lock-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-radius: 18px; background: rgba(255,255,255,.6); }
.lock-row b { font-size: 20px; font-weight: 900; width: 52px; }
.lock-row.is-locked { background: var(--returned-bg); }
.switch { margin-left: auto; position: relative; flex: none; width: 60px; height: 34px; border: 0; border-radius: var(--r-pill); background: rgba(78,88,104,.25); cursor: pointer; transition: background .2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--returned-solid); }
.switch[aria-checked="true"] span { transform: translateX(26px); }
.switch[disabled] { opacity: .5; cursor: default; }
.switch-on[aria-checked="true"] { background: var(--passed-solid); }
.lock-row.is-open { background: var(--passed-bg); }

/* 등장(rise)이 끝난 뒤 hover의 transform(lift)이 먹도록: 끝난 상태를 붙잡지 않는다 */
.rise { animation-fill-mode: backwards; }

/* ---------- 포인트 상점 (shop.html) ---------- */
.shop-coins { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shop-coins span + svg { margin-left: 14px; }
.shop-coins b { font-size: 40px; font-weight: 900; letter-spacing: -0.03em; }
.shop-coins span { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.try-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255,255,255,.7); }
.try-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.try-k { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.try-info > b { font-size: 18px; font-weight: 900; }
.try-price { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 900; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.shop-item {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px 14px; border-radius: var(--r-md);
  border: 2px solid rgba(78,88,104,.18); background: rgba(255,255,255,.62); font: inherit; color: var(--ink); cursor: pointer;
}
.shop-item.r-rare { border-color: rgba(36,87,230,.55); }
.shop-item.r-legend { border-color: var(--gold); isolation: isolate; }
.shop-item.r-legend::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.75) 50%, transparent 80%);
  transform: translateX(-100%); animation: shine-x 3.2s ease-in-out infinite; will-change: transform; }
.shop-item[aria-pressed="true"] { background-color: rgba(255,255,255,.95); box-shadow: 0 10px 24px rgba(36,87,230,.2); outline: 3px solid var(--accent); outline-offset: -2px; }
.shop-item.is-locked svg.av { opacity: .45; }
.shop-rarity { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 900; background: var(--accent-tint); color: var(--accent); }
.r-legend .shop-rarity { background: rgba(209,154,0,.16); color: #8A6400; }
.shop-name { font-size: 15px; font-weight: 700; text-align: center; }
.shop-price { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 900; }
.shop-price.short { color: var(--ink-2); opacity: .7; }
.shop-lock { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.lite .shop-item.r-legend::after { display: none; }

.reward-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.reward { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-md); background: rgba(255,255,255,.65); }
.reward-row { display: flex; align-items: center; gap: 14px; }
.reward-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; }
.reward-ic.ic-pair { background: rgba(36,87,230,.12); color: var(--accent); }
.reward-ic.ic-plain { background: rgba(242,183,5,.18); color: #8A6400; }
.reward-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reward-txt b { font-size: 17px; font-weight: 700; }
.reward-txt span { font-size: 14px; color: var(--ink-2); }
.reward-btn, .reward-tag { margin-left: auto; flex: none; }
.reward-btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.swap-box { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 8px 0 4px; }
.swap-rate { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink-2); }
.swap-rate b { color: var(--ink); }
.swap-step { display: flex; align-items: center; gap: 14px; }
.swap-pm { width: 48px; min-height: 48px; padding: 0; font-size: 22px; font-weight: 700; }
.swap-sum { display: flex; align-items: center; gap: 6px; min-width: 190px; justify-content: center; font-size: 24px; font-weight: 900; }
.swap-sum svg { width: 26px; height: 26px; }
.swap-arrow { margin: 0 6px; color: var(--ink-2); font-weight: 500; }
.swap-go { min-height: 48px; min-width: 160px; font-size: 16px; }
.reward-tag { padding: 8px 14px; font-size: 14px; }
.pair-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pair-label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.pair-sel { width: auto; min-width: 96px; min-height: 44px; }
.reward-sub { margin-top: 10px !important; font-size: 18px !important; }
.buy-tag { margin-left: auto; flex: none; }
.stat-link { text-decoration: none; }
.stat-link:hover { color: var(--accent); }

/* 관리: 상점 설정 */
.set-list { display: flex; flex-direction: column; gap: 6px; }
.set-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px 8px 16px; border-radius: 16px; background: rgba(255,255,255,.55); }
.set-row .input { height: 44px; }
.set-reward > .input { flex: 1 1 160px; width: auto; }
.set-name { flex: 1 1 140px; font-weight: 900; }
.set-num { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.set-num .input { width: 88px; }
.set-sel { width: auto; min-width: 84px; }

/* 관리: 점수 주기, 포인트 규칙 */
.roll-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.grant-fields { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.grant-reason { flex: 1 1 220px; }
.grant-amt { margin-left: auto; font-weight: 900; }
.points-grid { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 120px) minmax(0, 120px); gap: 8px 12px; align-items: center; justify-content: start; }
.points-grid > b { font-size: 14px; color: var(--ink-2); }
.points-grid > span { font-weight: 700; }
.level-grid { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* ---------- 수업 모드 덮개 안(embed=1)의 모둠 편성·순위 발표 ---------- */
.embed .groups-top > a.icon-btn, .embed #cls-tabs, .embed .ready-top { display: none; }
.embed .groups-wrap { padding-top: 24px; }

/* ---------- 수업 모드 (teacher/live.html) ---------- */
.live-body { overflow: hidden; }
.live-app { position: fixed; inset: 0; }
.live-lesson { position: absolute; inset: 0; background: #fff; }
.live-frame { display: block; width: 100%; height: 100%; border: 0; }
.live-empty { position: absolute; inset: 24px; }
/* 다른 출처 수업자료: 오른쪽 아래 구석에 마우스를 가져가면 보이는 버튼 */
.live-corner { position: absolute; right: 0; bottom: 0; z-index: 5; width: 200px; height: 120px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 16px; }
.live-corner .btn { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s var(--ease); }
.live-corner.is-shown .btn, .live-corner:hover .btn, .live-corner .btn:focus-visible { opacity: 1; transform: none; }
.live-corner.is-cover { display: none; }

/* 덮개: 수업자료 위에 겹치기만 한다 (수업자료는 그대로 뒤에 남음)
   흐림은 쓰지 않는다: 아래에서 시뮬레이션이 돌면 흐림이 매 순간 다시 계산되므로 불투명한 바탕 */
.cover {
  position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 16px;
  background: var(--bg);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .35s var(--ease), transform .45s var(--ease), visibility 0s linear .45s;
}
.cover:focus { outline: none; }
/* 덮개 안 유리 카드도 흐림 없이 (바탕이 불투명해 보이는 모습은 같고, 아래 수업자료가 움직여도 다시 계산하지 않음) */
.cover .glass, .cover .glass-strong { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,.82); }
.cover.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .35s var(--ease), transform .45s var(--ease), visibility 0s; }
.cover-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cover-title { margin: 0; font-size: clamp(22px, 3.2vh, 34px); font-weight: 900; letter-spacing: -0.03em; min-width: 0; }
.cover-body { position: relative; flex: 1; min-height: 0; }
.cover-pane { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; }
.cover-embed { flex: 1; min-height: 0; border-radius: var(--r-lg); overflow: hidden; background: rgba(255,255,255,.6); }
.cover-frame { display: block; width: 100%; height: 100%; border: 0; }
.cover-msg { flex: 1; min-height: 0; display: flex; }
.cover-empty { flex: 1; }
.cover-empty strong { font-size: clamp(20px, 3vh, 30px); }

/* 탭: 위쪽 오른쪽 (수업자료 위 메뉴처럼). 타이머는 2026-11-06 덮개에서 뺌(리모컨 타이머는 그대로) */
.cover .timer[hidden] { display: none; }
.cover-tabs { margin-left: auto; display: flex; gap: 6px; padding: 6px; border-radius: var(--r-pill); }
.cover-tab { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--r-pill);
  background: transparent; font: inherit; font-size: 17px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.cover-tab:hover { color: var(--ink); }
.cover-tab.on { background: var(--accent); color: #fff; }
.cover-tab kbd { font: inherit; font-size: 12px; font-weight: 700; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center; background: rgba(78,88,104,.12); color: inherit; }
.cover-tab.on kbd { background: rgba(255,255,255,.22); }
.cover-close { color: var(--ink); }

/* 타이머: 오른쪽 위 */
.timer { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: var(--r-pill); }
.timer-num { min-width: 3.2em; text-align: center; font-size: clamp(28px, 4.4vh, 44px); font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.timer-step { width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(78,88,104,.1); font: inherit; font-size: 22px; font-weight: 700; color: var(--ink); cursor: pointer; }
.timer-step[disabled] { opacity: .35; cursor: default; }
.timer.is-running .timer-num { color: var(--ink); }
.timer.is-done .timer-num { color: var(--accent); animation: timer-blink .5s steps(1) 6; }
@keyframes timer-blink { 50% { opacity: .15; } }

/* 모둠 카드: 1모둠부터 번호 순서, 화면에 맞게 같은 크기 */
.lg-grid { flex: 1; min-height: 0; display: grid; gap: 1.6vh 1.2vw;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 2), minmax(0, 1fr)); }
.lg-card { min-width: 0; min-height: 0; border-radius: var(--r-lg); padding: clamp(10px, 1.8vh, 22px) clamp(12px, 1.4vw, 24px);
  display: flex; flex-direction: column; gap: 1vh; overflow: hidden; }
.lg-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lg-card header b { font-size: clamp(20px, 3.4vh, 40px); font-weight: 900; letter-spacing: -0.03em; white-space: nowrap; }
.lg-state { padding: 6px 14px; border-radius: var(--r-pill); font-size: clamp(14px, 2.2vh, 22px); font-weight: 900; white-space: nowrap; color: var(--s-fg); background: var(--s-bg); }
.lg-card.is-pending .lg-state { animation: breathe 1.8s ease-in-out infinite; }
.lg-card.is-returned { box-shadow: var(--shadow-strong), inset 0 0 0 3px var(--returned-solid); }
.lg-mates { flex: 1; min-height: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 4px 8px; }
.lg-mate { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lg-mate svg.av { width: var(--av, 72px); height: var(--av, 72px); }
.lg-mate figcaption { font-size: clamp(14px, 2vh, 22px); font-weight: 900; color: var(--ink-2); }
.lg-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.lg-quiz-note { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.lg-quiz { margin-left: 6px; padding: 4px 12px; border-radius: var(--r-pill); font-size: clamp(12px, 1.8vh, 18px); font-weight: 800; white-space: nowrap; background: var(--accent-tint); color: var(--accent); }
.lg-quiz.is-done { background: rgba(78,88,104,.12); color: var(--ink-2); }
.lite .lg-card.is-pending .lg-state { animation: none; }

/* ---------- 수업 모드 위 띠 (딴 화면 + 학습지). 2026-11-05 새 디자인: 검정 = 누르는 것만, 초록 = 끝남 ----------
   수업자료 위 메뉴가 있으면 그 오른쪽 끝에 겹쳐 한 줄처럼(.is-docked, 위치는 live.js), 없으면 오른쪽 위 알약 */
.live-bar { --accent: #0D0D0D; --ink: #0D0D0D; --ink-2: #5D5D5D;
  position: absolute; top: 12px; right: 12px; z-index: 6; display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 18px; border-radius: 999px; background: #fff;
  box-shadow: 0 0 0 1px #ECECEC, 0 8px 24px rgba(0,0,0,.06); font-family: 'Noto Sans KR', system-ui, sans-serif; }
.live-bar.is-docked { top: 10px; padding: 0 6px 0 14px; background: none; box-shadow: none; }
.live-bar.is-docked::before { content: ''; position: absolute; left: 0; top: 50%; width: 1px; height: 22px; margin-top: -11px; background: #E3E3E3; }
.live-bar .ws-band, .live-bar .away-chip { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.live-bar .hidden { display: none; }
.ws-band-h { font-size: 13.5px; font-weight: 500; color: #5D5D5D; }
.ws-band > b { font-size: 17px; font-weight: 900; color: #0D0D0D; margin-left: 2px; }
.ws-band > .num { font-size: 14px; font-weight: 700; color: #8A8A8A; }
.ws-band > .ws-band-h.num { font-size: 13.5px; font-weight: 500; color: #8A8A8A; }
@media (max-width: 1500px) { .ws-band > .ws-pinlist { display: none; } }
.ws-band.is-all > b { color: #0F8A5F; }
.live-bar .btn { min-height: 40px; padding: 0 16px; gap: 8px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 700; box-shadow: none; }
.live-bar .btn-primary { background: #0D0D0D; color: #fff; }
.live-bar .btn-primary:hover { background: #2B2B2B; }
.live-bar .btn-line { background: #F0F0F0; color: #0D0D0D; }
.live-bar .btn-line:hover { background: #E6E6E6; }
.live-bar .btn[disabled] { background: #F0F0F0; color: #8A8A8A; }
.live-bar .btn b { font-size: 14px; font-weight: 900; color: inherit; }
.live-bar kbd { font: inherit; font-size: 11.5px; font-weight: 700; min-width: 20px; padding: 1px 6px; border-radius: 6px; text-align: center;
  background: rgba(0,0,0,.08); color: inherit; }
.live-bar .btn-primary kbd { background: rgba(255,255,255,.2); }
.ws-band-on { padding: 0 14px; min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px;
  background: rgba(34,197,130,.14); color: #0F8A5F; font-size: 14px; font-weight: 700; }
.ws-band [data-act="group"] { margin-left: 4px; }
.ws-band [data-act="group"][aria-pressed="true"] { background: #0D0D0D; color: #fff; }
.away-chip { padding: 0 14px; min-height: 40px; border-radius: 999px; background: rgba(255,122,69,.16); }
.away-chip span { font-size: 13.5px; font-weight: 700; color: #A23B0B; }
.away-chip b { font-size: 17px; font-weight: 900; color: #A23B0B; }
.away-chip:not(.hidden) + .ws-band:not(.hidden) { padding-left: 4px; }

/* ---------- 수업 모드: 제출한 것 보기(쪽별 첫 답 창). 흰 창 + 연회색 큰 상자에 학습지 쪽 ---------- */
.wsf { --accent: #0D0D0D; --accent-tint: #F0F0F0; --ink: #0D0D0D; --ink-2: #5D5D5D;
  position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 3vh 3vw;
  background: rgba(13,13,13,.32); font-family: 'Noto Sans KR', system-ui, sans-serif; animation: wsf-in .3s var(--ease); }
.wsf-card { width: min(1180px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 22px; padding: 30px 32px 26px;
  border-radius: 32px; background: #fff; box-shadow: 0 0 0 1px #ECECEC, 0 24px 60px -12px rgba(0,0,0,.28); animation: wsf-pop .45s var(--ease); }
.wsf-top { display: flex; align-items: center; gap: 18px; }
.wsf-av { flex: none; width: 76px; height: 76px; border-radius: 999px; background: #F7F7F7; display: grid; place-items: center; overflow: hidden; }
.wsf-av svg.av { width: 72px; height: 72px; display: block; }
.wsf-who { flex: 1; min-width: 0; display: flex; flex-direction: column-reverse; gap: 4px; }
.wsf-name { font-size: clamp(30px, 4.6vh, 46px); font-weight: 900; letter-spacing: -0.04em; line-height: 1.1; color: #0D0D0D;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wsf-meta { font-size: 14px; font-weight: 700; color: #8A8A8A; }
.wsf-badge { flex: none; padding: 10px 20px; border-radius: 999px; background: #F0F0F0; color: #5D5D5D; font-size: 17px; font-weight: 700; }
.wsf-badge.is-paid { background: rgba(34,197,130,.14); color: #0F8A5F; }
.wsf-body { flex: 1; min-height: 0; overflow: auto; padding: 26px 30px; border-radius: 28px; background: #F7F7F7; }
.wsf-page { font-size: clamp(18px, 2.4vh, 24px); color: #0D0D0D; }
.wsf-page h3::before { background: #0D0D0D; border-radius: 3px; }
.wsf-page table { background: #fff; border-radius: 16px; overflow: hidden; }
.wsf-page :is(td, th) { border-color: #ECECEC; }
.wsf-page img { border-color: #ECECEC; }
.wsf-page .ws-in, .wsf-page .ws-in[disabled] { background: #fff; opacity: 1; border-color: #E3E3E3; color: #0D0D0D; }
.wsf-page .ws-sim { display: none; }
.wsf-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.wsf-note { margin-right: auto; font-size: 15px; font-weight: 700; color: #8A8A8A; }
.wsf-foot .btn { min-height: 56px; min-width: 140px; padding: 0 26px; gap: 10px; border: 0; border-radius: 999px;
  font-size: 19px; font-weight: 700; box-shadow: none; }
.wsf-foot .btn-primary { background: #0D0D0D; color: #fff; }
.wsf-foot .btn-primary:hover { background: #2B2B2B; }
.wsf-foot .btn-line { background: #F0F0F0; color: #0D0D0D; }
.wsf-foot .btn-line:hover { background: #E6E6E6; }
.wsf-foot .btn[disabled] { opacity: .5; }
.wsf-foot kbd { font: inherit; font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 7px; background: rgba(0,0,0,.08); }
.wsf-foot .btn-primary kbd { background: rgba(255,255,255,.2); }
@keyframes wsf-in { from { opacity: 0; } }
@keyframes wsf-pop { from { opacity: 0; transform: translateY(18px) scale(.97); } }
/* 게임형 쪽 미션 기록판 (수업 모드 V, 2026-11-14) */
.wsg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.wsg-row { padding: 18px 22px; border-radius: 22px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.wsg-head { display: flex; align-items: center; gap: 12px; }
.wsg-n { flex: none; width: 34px; height: 34px; border-radius: 999px; background: #F0F0F0; display: grid; place-items: center; font-weight: 900; font-size: 17px; }
.wsg-name { flex: 1; min-width: 0; font-size: clamp(20px, 2.8vh, 28px); font-weight: 900; letter-spacing: -0.02em; }
.wsg-tag { flex: none; padding: 4px 14px; border-radius: 999px; background: #F0F0F0; font-size: 15px; font-weight: 700; color: #5D5D5D; }
.wsg-count { flex: none; font-size: 18px; font-weight: 700; color: #5D5D5D; }
.wsg-count b { font-size: 26px; font-weight: 900; color: #0D0D0D; }
.wsg-bar { height: 12px; border-radius: 999px; background: #F0F0F0; overflow: hidden; }
.wsg-bar i { display: block; height: 100%; border-radius: 999px; background: #22C582; transition: width .4s ease; }
.wsg-stars { display: flex; gap: 22px; flex-wrap: wrap; font-size: 18px; font-weight: 700; color: #0B6B47; }
.wsg-stars b { color: #0D0D0D; font-weight: 900; }
.wsg-stars .wsg-try { color: #8A8A8A; }
.wsg-firsts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wsg-ft { font-size: 15px; font-weight: 700; color: #8A8A8A; margin-right: 4px; }
.wsg-first { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #F0F0F0; font-size: 17px; color: #5D5D5D; }
.wsg-first b { color: #0D0D0D; font-weight: 900; }
.wsg-first.is-ok { background: rgba(34,197,130,.16); color: #0B6B47; }
@media (prefers-reduced-motion: reduce) { .wsf, .wsf-card { animation: none; } }

/* ---------- 8단계: 반 페이지 탭 [개인 학습지] [모둠활동] ---------- */
.class-tabs { align-self: flex-start; max-width: 100%; display: flex; gap: 6px; padding: 6px; border-radius: var(--r-pill); }
.class-tab { min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--r-pill); background: transparent;
  font: inherit; font-size: 17px; font-weight: 800; color: var(--ink-2); cursor: pointer; }
.class-tab.on { background: var(--accent); color: #fff; }

/* ---------- 8단계: 개인 학습지 카드 ---------- */
.ws-card { width: 100%; max-width: 960px; border-radius: 32px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.ws-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ws-where { min-width: 0; }
.ws-slide { font-size: 14px; font-weight: 800; color: var(--accent); }
.ws-head h2 { margin: 2px 0 0; font-size: 24px; font-weight: 900; letter-spacing: -0.02em; word-break: keep-all; }
.ws-chip { flex: none; background: var(--passed-bg); color: var(--passed-fg); }
/* 모둠 학습지: 대표 기기에서 쓰면 모둠원 모두에게 기록 (2026-10-26) */
.ws-group { margin: 0; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: var(--r-pill);
  background: rgba(36,87,230,.1); color: var(--accent); font-size: 15px; font-weight: 800; word-break: keep-all; }
.ws-group.is-none { background: var(--pending-bg); color: var(--pending-fg); }
.ws-nav { display: flex; align-items: center; gap: 10px; }
.ws-nav .icon-btn { border: 0; cursor: pointer; }
.ws-nav .icon-btn[disabled] { opacity: .35; cursor: default; }
.ws-dots { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.ws-dot { min-width: 44px; height: 44px; padding: 0 8px; border-radius: var(--r-pill); border: 2px solid rgba(78,88,104,.2); background: rgba(255,255,255,.7);
  font: inherit; font-size: 14px; font-weight: 800; color: var(--ink-2); cursor: pointer; }
.ws-dot { display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.ws-dot.is-full { border-color: var(--accent); color: var(--accent); }
.ws-dot.is-done { background: var(--passed-solid); border-color: var(--passed-solid); color: #fff; }
.ws-dot.is-bad { background: var(--returned-bg); border-color: var(--returned-solid); color: var(--returned-fg); }
.ws-dot.is-closed { opacity: .4; border-style: dashed; }
.ws-dot.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.ws-closed { gap: 10px; color: var(--ink-2); }
/* 수업 따라가기(2026-11-05): 학습지가 수업자료 쪽을 따라감. 앞뒤 단추는 숨기고 쪽 점은 보기만 */
.ws-card.is-follow:not(.can-move) .ws-nav .icon-btn { visibility: hidden; }
.ws-card.is-follow .ws-dot.is-off { pointer-events: none; opacity: .45; }
/* 선생님이 열어 둔 쪽(2026-11-10): 그 쪽 점만 누를 수 있고, 지금 수업 쪽이 아니면 [지금 수업 쪽으로] */
.ws-card.is-follow .ws-dot.is-off.is-done { opacity: .6; }
.ws-gonow { margin-left: 6px; }
.ws-blank { gap: 8px; min-height: 220px; }
.ws-blank span { font-size: 15px; color: var(--ink-2); }
.ws-wait-open { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r-pill);
  background: rgba(78,88,104,.1); color: var(--ink-2); font-weight: 700; }
.ws-wait-open svg { width: 20px; height: 20px; flex: none; }
.ws-dot.on.is-done { box-shadow: 0 0 0 3px var(--passed-solid); }
.ws-dot-ck { flex: none; }
.ws-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.ws-foot:empty { display: none; }
.ws-save { margin-right: auto; font-size: 14px; }
.ws-badn { font-size: 15px; font-weight: 800; color: var(--returned-fg); }
.ws-chkn { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--idle-fg); }
/* AI 판정을 기다리는 칸: 회색 점선 + 도는 고리 (상태를 글자로도 씀: '확인 중 n칸') */
.ws-chk-sand { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(78,88,104,.25); border-top-color: var(--idle-fg); animation: ws-chk-spin 1s linear infinite; }
@keyframes ws-chk-spin { to { transform: rotate(360deg); } }
.lite .ws-chk-sand { animation: none; border-top-color: rgba(78,88,104,.25); border-style: dotted; }
@media (prefers-reduced-motion: reduce) { .ws-chk-sand { animation: none; } }
.ws-dot.is-checking { border-style: dashed; border-color: var(--idle-dot); }
.ws-done { width: 100%; }
.ws-prog { font-size: 15px; color: var(--ink-2); }
.ws-prog b { font-weight: 900; color: var(--ink); }
.ws-pagedone { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  background: var(--passed-bg); color: var(--passed-fg); font-weight: 900; font-size: 16px; }
.ws-pagedone-ck { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 999px; background: var(--passed-solid); color: #fff; }

/* 학습지 완료 화면: 쪽 카드가 차례로 뒤집히며 초록 → 도장 → 숫자 → 색종이 (--stamp: 도장이 찍히는 때) */
.wsdone { position: fixed; inset: 0; z-index: 46; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden;
  background: rgba(237,241,247,.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade-in .3s ease both; }
.lite .wsdone { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(237,241,247,.94); }
.wsdone-card { position: relative; width: 440px; max-width: 100%; border-radius: 40px; padding: 32px 28px 30px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  animation: pop .6s var(--ease-back) both, wsd-thud .35s ease-out var(--stamp); }
.wsdone-sheet { position: relative; width: 100%; min-height: 120px; display: flex; align-items: center; justify-content: center; padding: 18px 56px 18px 12px; margin-bottom: 26px; border-radius: 24px; background: rgba(255,255,255,.75); border: 1.5px solid rgba(78,88,104,.14); }
.wsdone-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wsd-tile { position: relative; width: 44px; height: 54px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--passed-solid); color: #fff; font-size: 14px; font-weight: 900; box-shadow: 0 4px 10px rgba(15,138,95,.25);
  animation: wsd-flip .45s var(--ease-back) var(--d, 0s) both; }
.wsdone-stamp { position: absolute; right: -18px; bottom: -30px; width: 112px; height: 112px; border-radius: 999px;
  display: grid; place-items: center; border: 5px solid var(--accent); color: var(--accent); background: rgba(255,255,255,.94);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.9), inset 0 0 0 7px var(--accent);
  animation: wsd-stamp .4s cubic-bezier(.3,0,.4,1) var(--stamp) both; }
.wsdone-stamp span { font-size: 30px; font-weight: 900; letter-spacing: .04em; }
.wsdone-t { font-size: 15px; font-weight: 700; color: var(--ink-2); animation: rise .4s ease calc(var(--stamp) + .15s) both; }
.wsdone-h { margin: 0; font-size: 34px; font-weight: 900; letter-spacing: -0.03em; color: var(--passed-fg); animation: pop .6s var(--ease-back) calc(var(--stamp) + .2s) both; }
.wsdone-gain { display: flex; gap: 10px; margin-top: 6px; animation: rise .4s ease calc(var(--stamp) + .3s) both; }
.wsdone-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 8px 18px; border-radius: var(--r-pill); background: rgba(36,87,230,.1); color: var(--accent); font-weight: 800; font-size: 16px; }
.wsdone-chip b { font-size: 26px; font-weight: 900; }
.wsdone-chip b::before { content: '+'; }
.wsdone-chip.is-coin { background: rgba(209,154,0,.14); color: #8A6400; }
.wsdone-card .btn { margin-top: 14px; min-width: 160px; animation: rise .4s ease calc(var(--stamp) + .45s) both; }
.wsdone-fx { position: absolute; inset: 0; pointer-events: none; }
.wsd-bit { position: absolute; top: -16px; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: wsd-fall 2.4s ease-in var(--d, 0s) 1 both; }
@keyframes wsd-flip { 0% { opacity: 0; transform: perspective(300px) rotateY(90deg) scale(.7); background: rgba(78,88,104,.18); }
  60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes wsd-stamp { 0% { opacity: 0; transform: scale(2.4) rotate(-4deg); } 70% { opacity: 1; transform: scale(.94) rotate(-14deg); } 100% { opacity: 1; transform: scale(1) rotate(-12deg); } }
@keyframes wsd-thud { 0%, 100% { transform: none; } 30% { transform: translateY(4px) scale(.985); } 60% { transform: translateY(-2px); } }
@keyframes wsd-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x, 0), 105vh) rotate(var(--r, 300deg)); } }
@media (max-width: 600px) {
  .wsdone-card { padding: 24px 18px; border-radius: var(--r-lg); }
  .wsd-tile { width: 38px; height: 48px; }
  .wsdone-sheet { padding-right: 44px; }
  .wsdone-stamp { width: 96px; height: 96px; right: -10px; }
  .wsdone-stamp span { font-size: 26px; }
  .wsdone-h { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .wsdone, .wsdone *, .wsdone-card { animation: none !important; }
  .wsdone-stamp { transform: rotate(-12deg); }
}

/* 학습지 본문 (웹판의 class는 앞에 w-가 붙어 온다) */
.ws-page { font-size: 17px; line-height: 1.9; word-break: keep-all; overflow-wrap: break-word; min-width: 0; }
.ws-page > :first-child { margin-top: 0; }
.ws-page h2, .ws-page h3, .ws-page h4 { margin: 18px 0 8px; font-size: 18px; font-weight: 900; line-height: 1.4; display: flex; align-items: center; gap: 8px; }
.ws-page h3::before { content: ''; flex: none; width: 10px; height: 10px; background: var(--accent); }
.ws-page p { margin: 8px 0; }
.ws-page img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid rgba(78,88,104,.15); }
.ws-tscroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ws-page table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 16px; background: rgba(255,255,255,.55); }
.ws-page td, .ws-page th { border: 1px solid rgba(78,88,104,.18); padding: 10px 12px; text-align: left; vertical-align: middle; line-height: 1.8; }
.ws-page th { background: rgba(78,88,104,.07); font-size: 14px; color: var(--ink-2); }
.ws-page td small { display: block; color: var(--accent); font-size: 12.5px; font-weight: 700; }
.ws-page .w-item { margin-top: 14px; }
.ws-page .w-q { margin: 8px 0; }
.ws-page .w-q.ws-simq { display: none; } /* 시뮬레이션 안에 같은 문항이 있음 (worksheet.js hideSim) */
.ws-page .w-n { display: inline-block; min-width: 22px; margin-right: 4px; font-weight: 900; color: var(--accent); }
.ws-page .w-n:empty { display: none; }
.ws-page .w-qline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ws-page .w-pool { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; padding: 8px 14px; border: 1.5px solid var(--ink); border-radius: 12px; font-size: 15px; }
.ws-page .w-pool .w-tag { font-weight: 900; }
.ws-page .w-two, .ws-page .w-defs, .ws-page .w-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ws-page .w-two > div { border: 1.5px dashed rgba(78,88,104,.35); border-radius: 14px; padding: 10px 12px; font-weight: 700; }
.ws-page .w-row2 { display: grid; grid-template-columns: minmax(0, 230px) minmax(0, 1fr); gap: 16px; align-items: start; }
.ws-page .w-ineq { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; margin: 10px 0; font-size: 16px; }
.ws-page .w-ineq > :first-child { text-align: right; }
.ws-page .w-mine { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ws-page .w-mine i, .ws-page .w-ox i { font-style: normal; border: 1.5px solid rgba(78,88,104,.4); border-radius: var(--r-pill); padding: 0 10px; }

/* 칸 */
/* 학습지 안 시뮬레이션: 누를 때만 iframe */
.ws-sim { margin: 12px 0; padding: 10px 14px; border: 1.5px solid rgba(78,88,104,.22); border-radius: 16px; background: rgba(255,255,255,.7); }
.ws-sim-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-sim-t { font-weight: 900; font-size: 16px; }
.ws-sim-btn { min-height: 44px; }
.ws-sim.is-open { padding-bottom: 14px; }
.ws-sim-frame { display: block; width: 100%; aspect-ratio: 4 / 3; min-height: 420px; margin-top: 10px; border: 0; border-radius: 12px; background: #fff; }
/* 넓은 화면: 시뮬레이션이 있는 쪽은 학습지 왼쪽, 시뮬레이션 오른쪽(화면 높이에 맞춰 따라옴) */
.ws-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.class-wrap.is-wide { max-width: 1680px; }
.ws-card.has-side { max-width: none; display: grid; grid-template-columns: minmax(440px, 5fr) minmax(0, 6fr); column-gap: 24px; align-items: start; }
.ws-side { position: sticky; top: 16px; height: calc(100vh - 32px); min-height: 480px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ws-side .ws-sim-frame { flex: 1; min-height: 0; aspect-ratio: auto; margin-top: 0; border: 1.5px solid rgba(78,88,104,.22); }
.ws-side-nums { display: flex; gap: 6px; }
/* 쓸 칸이 없는 쪽: 제목 → 큰 시뮬레이션 → 쪽 번호 순으로 한 줄로 */
.ws-card.has-side.sim-only { display: flex; flex-direction: column; }
.ws-card.sim-only .ws-main { display: contents; }
.ws-card.sim-only .ws-head, .ws-card.sim-only .ws-group, .ws-card.sim-only #ws-login, .ws-card.sim-only .ws-page { order: 1; }
.ws-card.sim-only .ws-side { order: 2; position: static; width: 100%; height: calc(100vh - 230px); min-height: 520px; }
.ws-card.sim-only .ws-nav { order: 3; }
.ws-card.sim-only .ws-foot { order: 4; }
/* 게임형 쪽 (2026-11-14): 제목 → 게임 → 미션 기록(가로로) → 아래 띠 → 쪽 넘기기 */
.ws-card.is-game .ws-page { order: 3; align-self: stretch; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ws-card.is-game .ws-page > :not(.w-mission) { grid-column: 1 / -1; }
.ws-card.is-game .ws-page .w-mission { margin: 0; }
.ws-card.is-game .ws-nav { order: 5; }
/* nogame:start */
/* 723 달 맞추기: [시작]을 누르면 게임 칸이 화면 가득(팝업). 게임 안 [작게]로 되돌림 (2026-11-16) */
.ws-side.mm-big, .ws-sim.mm-big { position: fixed !important; inset: 0 !important; z-index: 9000; width: auto !important; height: auto !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: #080B17; display: flex; flex-direction: column; animation: mm-big-in .32s var(--ease); }
.mm-big > .ws-sim-bar { display: none; }
.mm-big > .ws-sim-frame { flex: 1; width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; margin: 0; border: 0 !important; border-radius: 0; background: #080B17; }
body.mm-open { overflow: hidden; }
@keyframes mm-big-in { from { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .ws-side.mm-big, .ws-sim.mm-big { animation: none; } }
/* nogame:end */
.ws-gate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 16px; border-radius: 16px;
  background: var(--accent-tint); border: 1.5px solid var(--accent); color: var(--accent); }
.ws-gate.is-open { background: var(--passed-bg); border-color: var(--passed-solid); color: var(--passed-fg); animation: ws-gate-in .4s var(--ease); }
.ws-gate-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: currentColor; }
.ws-gate-ic svg { color: #fff; }
.ws-gate-txt { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.ws-gate-txt b { font-size: 17px; font-weight: 900; }
.ws-gate-txt small { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.ws-gate-prog { flex: none; padding: 4px 12px; border-radius: var(--r-pill); background: #fff; font-weight: 900; font-size: 16px; }
@keyframes ws-gate-in { from { opacity: 0; transform: translateY(-6px); } }
/* 잠긴 칸: 눌러도 칸 대신 문항이 눌리게(눌렀을 때 알림을 띄우려고) */
.ws-page.is-gated .ws-in, .ws-page.is-gated .ws-opt { pointer-events: none; opacity: .55; }
.ws-page.is-gated .w-q, .ws-page.is-gated table { cursor: not-allowed; }
.ws-page.is-gated .ws-in.ws-part-open, .ws-page.is-gated .ws-part-open .ws-opt { pointer-events: auto; opacity: 1; }
.ws-page.is-gated tr:has(.ws-part-open) { cursor: auto; }
.ws-side.is-need .ws-sim-frame, .ws-sim.is-need { border-color: var(--accent); }
.ws-sim.is-need { border-width: 2px; }
.ws-side.is-shut, .ws-sim.is-shut { position: relative; }
.ws-side.is-shut > *, .ws-sim.is-shut > * { opacity: .35; filter: grayscale(1); pointer-events: none; }
.ws-side.is-shut::after, .ws-sim.is-shut::after { content: '선생님이 열면 할 수 있어요'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 10px 18px; border-radius: 999px; background: #F0F0F0; color: #5D5D5D; font-weight: 900; font-size: 16px; white-space: nowrap; pointer-events: none; }
.ws-sim.is-shut::after { left: auto; right: 14px; transform: translateY(-50%); font-size: 14px; }
.ws-sim.is-shut [data-sim-act="open"] { visibility: hidden; }
.ws-pulse { animation: ws-pulse .9s var(--ease) 2; }
@keyframes ws-pulse { 50% { box-shadow: 0 0 0 6px var(--accent-tint); transform: scale(1.01); } }
@media (prefers-reduced-motion: reduce) { .ws-pulse, .ws-gate.is-open { animation: none; } }
.ws-in { font-weight: 700; }
.ws-bl { display: inline-block; vertical-align: middle; width: 8em; height: 42px; margin: 2px 4px; padding: 0 8px; text-align: center; border-radius: 12px; font-size: 17px; }
.ws-bl.ws-s { width: 5em; }
.ws-bl.ws-l { width: 12em; }
.ws-fill { display: block; height: auto; min-height: 76px; margin-top: 6px; padding: 10px 14px; line-height: 1.5; resize: vertical; font-size: 16px; font-weight: 500; }
.ws-page .w-qline .ws-fill { flex: 1 1 100%; }
.ws-sim-in { background: rgba(0,102,204,.05); border-style: dashed; cursor: default; resize: none; }
.ws-sim-in::placeholder { color: rgba(0,102,204,.55); font-size: 14px; }
/* 게임형 쪽 미션 기록 (2026-11-14): 미션마다 한 줄, 깬 미션은 초록 + 별, 실전(블라인드)은 회색 꼬리표 */
.ws-page .w-mission { margin: 6px 0; }
.ws-stage { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 18px; border-radius: 18px; background: #F0F0F0; color: #5D5D5D; line-height: 1.4; }
.ws-stage-n { flex: none; width: 28px; height: 28px; border-radius: 999px; background: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 900; color: #0D0D0D; }
.ws-stage-name { flex: 1; min-width: 0; font-weight: 700; color: #0D0D0D; }
.ws-stage-tag { flex: none; padding: 2px 10px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 700; color: #5D5D5D; }
.ws-stage-st { flex: none; font-size: 14.5px; font-weight: 700; color: #8A8A8A; }
.ws-stage-stars { flex: none; font-size: 20px; letter-spacing: 2px; color: #0B6B47; }
.ws-stage-stars i { font-style: normal; color: rgba(11,107,71,.22); }
.ws-stage.is-clear { background: rgba(34,197,130,.14); }
.ws-stage.is-clear .ws-stage-n { background: #22C582; color: #fff; }
.ws-sim-ox { padding: 3px; border: 2px dashed rgba(0,102,204,.35); background: rgba(0,102,204,.05); }
.ws-sim-ox .ws-opt[disabled]:not([aria-pressed="true"]) { opacity: .45; }
.ws-ox { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; margin: 2px 4px; border-radius: 26px; }
.ws-opt { min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 2px solid rgba(78,88,104,.22); background: rgba(255,255,255,.9);
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ink); cursor: pointer; line-height: 1.3; }
.ws-opt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: #fff; }
.ws-sym .ws-opt { min-width: 52px; padding: 0; font-size: 22px; font-weight: 900; }
.ws-opt[disabled] { cursor: default; opacity: .7; }
.ws-opt[disabled][aria-pressed="true"] { opacity: 1; }
.ws-in[disabled] { opacity: .85; background: rgba(255,255,255,.55); }
.ws-in.is-wrong { border: 2px solid var(--returned-solid); background: var(--returned-bg); }
.ws-in.is-empty { border: 2px dashed var(--pending-dot); background: var(--pending-bg); }
.ws-ox.is-wrong { box-shadow: 0 0 0 3px var(--returned-solid); background: var(--returned-bg); }
.ws-ox.is-empty { box-shadow: 0 0 0 3px var(--pending-dot); background: var(--pending-bg); }
.ws-in.is-checking { border: 2px dashed var(--idle-dot); background: rgba(78,88,104,.06); }
.ws-ox.is-checking { box-shadow: 0 0 0 3px var(--idle-dot); }
/* 점 찍기 칸: 점 ● → 채점 뒤 맞은 점 ○, 틀린 점 × (색만으로 구분하지 않게 모양도 다름) */
.ws-plot { display: block; max-width: 480px; margin: 10px 0; padding: 8px; border: 1.5px solid rgba(78,88,104,.22); border-radius: 16px; background: rgba(255,255,255,.85); }
.ws-plot-svg { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.ws-plot[data-locked] .ws-plot-svg { cursor: default; }
.ws-plot-grid line { stroke: rgba(78,88,104,.16); stroke-width: 1; }
.ws-plot-axis { fill: none; stroke: var(--ink); stroke-width: 2; }
.ws-plot-tick text { font-size: 16px; font-weight: 700; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.ws-plot-label { font-size: 16px; font-weight: 900; fill: var(--ink); }
.ws-pt-dot { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.ws-pt-x { display: none; fill: none; stroke: var(--returned-solid); stroke-width: 3.5; stroke-linecap: round; }
.ws-pt.is-ok .ws-pt-dot { fill: #fff; stroke: var(--passed-solid); stroke-width: 3; }
.ws-pt.is-bad .ws-pt-dot { display: none; }
.ws-pt.is-bad .ws-pt-x { display: inline; }
.ws-plot-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 6px; line-height: 1.3; }
.ws-plot-n { margin-right: auto; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.ws-plot-btn { min-height: 44px; }
.ws-plot.is-wrong { border: 2px solid var(--returned-solid); background: var(--returned-bg); }
.ws-plot.is-empty { border: 2px dashed var(--pending-dot); background: var(--pending-bg); }

@media (max-width: 600px) {
  .ws-card { padding: 16px; border-radius: var(--r-lg); }
  .ws-page { font-size: 16px; }
  .ws-page .w-two, .ws-page .w-defs, .ws-page .w-pair, .ws-page .w-row2 { grid-template-columns: 1fr; }
  .ws-page .w-ineq { grid-template-columns: 1fr; }
  .ws-page .w-ineq > :first-child { text-align: left; }
  .class-tab { padding: 0 16px; }
}

/* ---------- 8단계: 관리 화면 학습지 미리보기 ---------- */
.ws-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
dialog.ws-dlg { width: min(880px, calc(100vw - 32px)); }
.ws-report { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ws-rep-btn { width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 10px; align-items: baseline; text-align: left;
  padding: 10px 12px; border-radius: var(--r-sm); border: 1.5px solid rgba(78,88,104,.15); background: rgba(255,255,255,.7); font: inherit; color: var(--ink); cursor: pointer; }
.ws-rep-btn b { font-size: 16px; font-weight: 900; }
.ws-rep-t { font-weight: 700; }
.ws-rep-k { grid-column: 2; font-size: 13px; }
.ws-rep.on .ws-rep-btn { border-color: var(--accent); }
.ws-rep-w { display: block; margin: 4px 0 0 12px; font-size: 13px; font-weight: 700; color: var(--returned-fg); }
.ws-preview { border-radius: var(--r-md); background: rgba(255,255,255,.75); padding: 16px; max-height: 50vh; overflow: auto; }

/* ---------- 오목 (omok.html) ---------- */
.omok-wrap { max-width: 1040px; }
.omok-body { display: flex; flex-direction: column; gap: 20px; }
.omok-msg { align-items: center; text-align: center; padding: 40px 24px; }
.omok-msg-h { margin: 0; font-size: 32px; font-weight: 900; }
.omok-msg p { margin: 0; }
.omok-hero { border-radius: var(--r-xl); padding: 20px 28px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.omok-av { width: 120px; height: 120px; flex: none; }
.omok-av svg { width: 100%; height: 100%; }
.omok-hero-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.omok-reward { margin: 0; font-size: 17px; color: var(--ink-2); }
.omok-reward b { color: var(--ink); font-weight: 900; }
.omok-today { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); font-weight: 700; }
.omok-today b { color: var(--ink); }
.omok-dots { display: inline-flex; gap: 6px; }
.omok-dots i { width: 14px; height: 14px; border-radius: 50%; background: rgba(78,88,104,.18); }
.omok-dots i.on { background: var(--passed-solid); animation: pop .5s var(--ease-back) both; }

.omok-play { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: start; }
.omok-board-box { position: relative; border-radius: var(--r-lg); padding: 3%; }
.omok-board { position: relative; width: 100%; aspect-ratio: 1; display: grid;
  grid-template-columns: repeat(15, 1fr); grid-template-rows: repeat(15, 1fr); }
.omok-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  stroke: rgba(11,18,32,.28); stroke-width: .18; }
.omok-lines g { fill: rgba(11,18,32,.45); stroke: none; }
.oc { position: relative; border: 0; padding: 0; background: none; cursor: pointer; min-width: 0; }
.oc:disabled { cursor: default; }
.oc i { position: absolute; inset: 8%; border-radius: 50%; transition: transform .15s; }
.oc:not(.black):not(.white):not(:disabled):hover i { background: rgba(36,87,230,.16); }
.oc.black i { background: radial-gradient(circle at 34% 30%, #4A5466, #0B1220 68%); box-shadow: 0 2px 4px rgba(11,18,32,.35); animation: oc-drop .22s var(--ease-back) both; }
.oc.white i { background: radial-gradient(circle at 34% 30%, #fff, #E3E8F0 75%); box-shadow: 0 2px 4px rgba(11,18,32,.22), inset 0 0 0 1px rgba(11,18,32,.12); animation: oc-drop .22s var(--ease-back) both; }
.oc.last i { outline: 2.5px solid var(--accent); outline-offset: 1px; }
.oc.win i { outline: 3px solid var(--passed-solid); outline-offset: 1px; animation: bump .5s var(--ease-back) both; }
@keyframes oc-drop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

.omok-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px;
  border-radius: var(--r-lg); background: rgba(237,241,247,.55); }
.omok-cover-card { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 26px 32px; min-width: 240px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.omok-cover-card > b { font-size: 20px; font-weight: 900; }
.omok-cover-card svg { color: var(--ink-2); }
.omok-cover-card .row-actions { margin-top: 8px; justify-content: center; }
.omok-result-h { font-size: 40px; font-weight: 900; letter-spacing: -0.03em; }
.omok-cover-card.is-win .omok-result-h { color: var(--passed-fg); }
.omok-result-s { font-size: 17px; font-weight: 700; color: var(--ink-2); min-height: 1.4em; }
.omok-cover-card.is-win .omok-result-s { color: var(--passed-fg); }

.omok-side { display: flex; flex-direction: column; gap: 14px; }
.omok-state { gap: 4px; padding: 18px 22px; border-radius: var(--r-md); }
.omok-turn { font-size: 22px; font-weight: 900; }
.omok-turn.thinking { color: var(--ink-2); animation: breathe 1.4s ease-in-out infinite; }
.omok-turn.won { color: var(--passed-fg); }
.omok-moves { font-size: 14px; }
.omok-score { flex-direction: row; justify-content: space-around; padding: 16px; border-radius: var(--r-md); }
.omok-score div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.omok-score b { font-size: 30px; font-weight: 900; color: var(--ink); line-height: 1.1; }
.omok-stone { width: 22px; height: 22px; border-radius: 50%; }
.omok-stone.black { background: radial-gradient(circle at 34% 30%, #4A5466, #0B1220 68%); }
.omok-stone.white { background: radial-gradient(circle at 34% 30%, #fff, #E3E8F0 75%); box-shadow: inset 0 0 0 1px rgba(11,18,32,.15); }
.omok-btns { display: grid; grid-template-columns: 1fr; gap: 10px; }
.lite .omok-turn.thinking { animation: none; }
.omok-modes { align-self: stretch; align-items: center; }
.omok-modes-h { padding: 0 14px 0 16px; font-size: 20px; font-weight: 900; letter-spacing: -0.02em; white-space: nowrap; }
.omok-modes a.class-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 420px) { .omok-modes-h { padding: 0 6px 0 10px; font-size: 17px; } .omok-modes a.class-tab { padding: 0 10px; } }

/* 오목 랭킹 (omok-rank.html) */
.omr-me { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.omr-me b { color: var(--ink); font-weight: 900; }
.omr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.omr-h { margin: 0 0 10px 8px; font-size: 20px; font-weight: 900; }
.omr-h .muted { font-size: 15px; font-weight: 700; }
.omr-cols .rr-xp { margin-left: auto; }
.omr-sub { font-size: 17px; }
.omr-empty { padding: 20px 16px; color: var(--ink-2); font-size: 15px; }
@media (max-width: 820px) { .omr-cols { grid-template-columns: 1fr; } }

/* 오목 1대1 (omok-online.html) */
.om-players { display: flex; flex-direction: column; gap: 10px; }
.om-players .rk-opp { padding: 10px 14px; }
.om-players .rk-opp-av { width: 44px; height: 44px; }
.om-players .omok-stone { flex: none; }

@media (max-width: 820px) {
  .omok-play { grid-template-columns: 1fr; }
  .omok-side { display: grid; grid-template-columns: 1fr 1fr; }
  .omok-btns { grid-column: 1 / -1; }
  .om-side { display: flex; }
  .om-side .omok-state { flex-direction: row; align-items: baseline; justify-content: space-between; padding: 14px 20px; }
}
@media (max-width: 480px) {
  .omok-hero { padding: 18px; gap: 14px; }
  .omok-av { width: 88px; height: 88px; }
  .omok-board-box { padding: 2%; }
  .omok-result-h { font-size: 32px; }
}

/* ---------- 루미큐브 (rummikub.html) ---------- */
.rk-wrap { max-width: 1180px; }
.rk-body { display: flex; flex-direction: column; gap: 20px; }
.rk-hero-av { width: 104px; height: 104px; }

.rk-lobby { position: relative; border-radius: var(--r-xl); padding: 32px 24px; min-height: 300px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.rk-lobby-h { font-size: 22px; font-weight: 900; }
.rk-lobby .omok-cover { border-radius: var(--r-xl); }
.rk-seats { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.rk-seat { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 104px; font-size: 14px; font-weight: 700; }
.rk-seat span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-seat-av { width: 72px; height: 72px; display: grid; place-items: center; }
.rk-seat-av svg { width: 100%; height: 100%; }
.rk-seat-empty { border-radius: 50%; border: 2px dashed rgba(78,88,104,.35); color: var(--ink-2); font-size: 26px; font-weight: 900; }
.rk-seat-empty.wait { animation: breathe 1.6s ease-in-out infinite; }

.rk-table { display: flex; flex-direction: column; gap: 14px; }
.rk-opps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rk-opp { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-md);
  transition: box-shadow var(--t-fast), opacity var(--t-fast); }
.rk-opp.is-turn { box-shadow: 0 0 0 2.5px var(--pending-dot), var(--shadow); }
.rk-opp.is-left { opacity: .55; }
.rk-opp-av { width: 52px; height: 52px; flex: none; }
.rk-opp-av svg { width: 100%; height: 100%; }
.rk-opp-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rk-opp-main b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-opp-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rk-count { font-size: 14px; font-weight: 900; color: var(--ink); }
.rk-opp-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(78,88,104,.12); }
.rk-opp-bar i { display: block; height: 100%; background: var(--pending-dot); transform-origin: left; transition: transform .25s linear; }

.rk-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 20px; border-radius: var(--r-md); }
.rk-turn { font-size: 18px; font-weight: 900; }
.rk-turn.mine { color: var(--accent); }
.rk-clock { font-size: 18px; font-weight: 900; min-width: 3.2em; }
.rk-clock.warn { color: var(--returned-solid); animation: breathe 1s ease-in-out infinite; }
.rk-last { font-size: 14px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pool { font-size: 14px; font-weight: 700; color: var(--ink-2); }

.rk-board-box { position: relative; border-radius: var(--r-lg); padding: 16px; min-height: 260px;
  background-image: radial-gradient(rgba(11,18,32,.06) 1px, transparent 1px); background-size: 18px 18px; }
.rk-board { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 12px 18px; min-height: 228px; }
.rk-empty { margin: auto; font-size: 14px; }
.rk-set { display: flex; gap: 3px; padding: 5px; border-radius: 12px; background: rgba(255,255,255,.45);
  box-shadow: inset 0 0 0 1px rgba(78,88,104,.12); }
.rk-set.bad { background: var(--returned-bg); box-shadow: inset 0 0 0 2px var(--returned-solid); }
.drop-on { outline: 3px dashed var(--accent); outline-offset: 3px; }
.rk-add, .rk-new { border: 2px dashed rgba(36,87,230,.5); background: var(--accent-tint); color: var(--accent); border-radius: 10px;
  font-weight: 900; cursor: pointer; font-family: inherit; }
.rk-add { width: 34px; font-size: 22px; }
.rk-new { min-height: 62px; padding: 0 18px; font-size: 15px; }
.rk-back { min-height: 62px; }

/* 타일 */
.rt { --tc: #1E2633; position: relative; width: 42px; height: 58px; flex: none; border: 0; padding: 0; border-radius: 8px; cursor: default;
  background: linear-gradient(#FFFDF7, #F1ECDF); color: var(--tc); font-family: inherit;
  box-shadow: 0 2px 0 #D9D1BD, 0 4px 8px rgba(28,39,76,.14), inset 0 1px 0 #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast); }
.rt b { font-size: 22px; font-weight: 900; line-height: 1; }
.rt i { width: 9px; height: 9px; background: currentColor; opacity: .85; }
.rt.c-black { --tc: #1E2633; } .rt.c-black i { border-radius: 50%; }
.rt.c-red { --tc: #D23B32; } .rt.c-red i { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.rt.c-blue { --tc: #2457E6; } .rt.c-blue i { border-radius: 1px; }
.rt.c-orange { --tc: #D97A00; } .rt.c-orange i { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.rt.joker { --tc: #B4237A; }
.rt.joker svg { width: 24px; height: 24px; }
.rt.joker small { position: absolute; right: 4px; bottom: 2px; font-size: 10px; font-weight: 900; color: var(--ink-2); }
.is-mine .rt[draggable="true"] { cursor: pointer; }
.is-mine .rt[draggable="true"]:hover { transform: translateY(-3px); }
.rt.sel { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--accent), 0 8px 14px rgba(36,87,230,.28); }
.rt.fresh { box-shadow: 0 2px 0 #D9D1BD, 0 0 0 2px rgba(36,87,230,.55), inset 0 1px 0 #fff; }
.rt.fresh.sel { box-shadow: 0 0 0 3px var(--accent), 0 8px 14px rgba(36,87,230,.28); }
.rt.recent { animation: rt-in .45s var(--ease-back) both; box-shadow: 0 2px 0 #D9D1BD, 0 0 0 2px var(--pending-dot), inset 0 1px 0 #fff; }
@keyframes rt-in { from { transform: translateY(-10px) scale(.9); opacity: .2; } to { transform: none; opacity: 1; } }

.rk-me { border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.is-mine .rk-me { box-shadow: 0 0 0 2.5px var(--accent), var(--shadow-strong); }
.rk-me-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rk-me-who { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.rk-me-av { width: 36px; height: 36px; }
.rk-me-av svg { width: 100%; height: 100%; }
.rk-rack { display: flex; flex-wrap: wrap; gap: 6px; min-height: 66px; padding: 8px; border-radius: 16px;
  background: linear-gradient(#E9DCC0, #DCCBA6); box-shadow: inset 0 2px 6px rgba(87,60,20,.18); }
.rk-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rk-hint { font-size: 15px; font-weight: 700; }

.rk-result { max-width: 420px; }
.rk-scores { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 4px; }
.rk-score { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-radius: 12px; background: rgba(255,255,255,.6); font-size: 14px; font-weight: 700; }
.rk-score.win { background: var(--passed-bg); color: var(--passed-fg); }
.lite .rk-seat-empty.wait, .lite .rk-clock.warn { animation: none; }

/* 규칙 창 */
dialog.rk-help { width: min(680px, calc(100vw - 32px)); }
.rk-help-card { border-radius: var(--r-lg); padding: 0; display: flex; flex-direction: column; overflow: hidden !important; font-size: 15px; line-height: 1.6; }
.rk-help-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 26px 12px;
  border-bottom: 1px solid rgba(78,88,104,.12); flex: none; }
.rk-help-top h2 { margin: 0; font-size: 22px; font-weight: 900; }
.rk-help-body { overflow: auto; padding: 18px 26px 24px; display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.rk-help section { display: flex; flex-direction: column; gap: 8px; }
.rk-help h3 { margin: 0; font-size: 17px; font-weight: 900; color: var(--accent); }
.rk-help p, .rk-help ul { margin: 0; }
.rk-help ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.rk-help .muted { font-size: 14px; }
.rk-ex { display: flex; gap: 3px; padding: 5px; border-radius: 12px; width: fit-content; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(78,88,104,.12); }
.rk-ex.bad { background: var(--returned-bg); box-shadow: inset 0 0 0 2px var(--returned-solid); }
.rk-ex .rt { width: 36px; height: 50px; pointer-events: none; }
.rk-ex .rt b { font-size: 19px; }
.rk-help-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rk-help-two > div { display: flex; flex-direction: column; gap: 6px; }
.rk-help-no { font-weight: 900; color: var(--returned-fg); }
.rk-help-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.rk-help-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.rk-mini { display: inline-block; width: 30px; height: 20px; padding: 0; }
.rk-mini-t { width: 16px; height: 22px; border-radius: 4px; animation: none; }
.rk-help-ok { align-self: center; min-width: 140px; }
@media (max-width: 520px) {
  .rk-help-top { padding: 14px 18px 10px; }
  .rk-help-body { padding: 16px 18px 20px; }
  .rk-help-two { grid-template-columns: 1fr; }
  .rk-ex .rt { width: 30px; height: 42px; }
  .rk-ex .rt b { font-size: 16px; }
}

@media (max-width: 720px) {
  .rk-opps { grid-template-columns: 1fr; gap: 10px; }
  .rk-opp { padding: 10px 12px; }
  .rk-opp-av { width: 40px; height: 40px; }
  .rk-board-box { padding: 10px; }
  .rk-board { gap: 10px 12px; }
  .rt { width: 32px; height: 46px; border-radius: 6px; }
  .rt b { font-size: 17px; }
  .rt i { width: 7px; height: 7px; }
  .rt.joker svg { width: 18px; height: 18px; }
  .rk-new, .rk-back { min-height: 48px; padding: 0 12px; }
  .rk-add { width: 28px; }
  .rk-actions .row-actions { width: 100%; }
  .rk-actions .row-actions .btn { flex: 1; padding: 0 10px; }
}

/* =========================================================
   퀴즈 배틀 (quiz.html) — 시안 docs/design/quiz-sample.html
   ========================================================= */
.qb-wrap { max-width: 960px; }
.qb-body, .qb-table { display: flex; flex-direction: column; gap: 14px; }
.qb-lobby { position: relative; border-radius: var(--r-xl); padding: 32px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.qb-seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; width: 100%; }
.qb-seat { width: 124px; padding: 16px 10px 14px; border-radius: 22px; background: rgba(255,255,255,.55);
  border: 1.5px solid rgba(78,88,104,.16); display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color .2s, background .2s; }
.qb-seat.is-in { background: rgba(255,255,255,.9); border-color: rgba(36,87,230,.45); box-shadow: 0 10px 24px rgba(36,87,230,.1); }
.qb-seat.is-wait .qb-seat-av { opacity: .42; filter: grayscale(1); }
.qb-seat-av { width: 72px; height: 72px; }
.qb-seat-av svg { width: 100%; height: 100%; }
.qb-seat-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.qb-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.qb-p { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 20px; }
.qb-p.is-me { box-shadow: inset 0 0 0 2px rgba(36,87,230,.45); }
.qb-p.is-done { background: rgba(255,255,255,.92); }
.qb-p.is-off { opacity: .55; }
.qb-p-av { flex: none; width: 48px; height: 48px; }
.qb-p-av svg { width: 100%; height: 100%; }
.qb-p-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.qb-p-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.qb-p-top b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qb-p-top .tag { flex: none; }
.qb-p-pts { font-size: 14px; font-weight: 900; color: var(--accent); }
.qb-p-gain { position: absolute; right: 12px; top: -10px; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--passed-solid); color: #fff; font-size: 13px; font-weight: 900;
  box-shadow: 0 6px 14px rgba(15,138,95,.28); animation: pop .35s var(--ease-back) both; }

.qb-bar { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 20px; flex-wrap: wrap; }
.qb-round { font-size: 16px; font-weight: 900; color: var(--accent); }
.qb-step-dots { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; min-width: 0; }
.qb-step-dots i { width: 8px; height: 8px; border-radius: 999px; background: rgba(78,88,104,.22); }
.qb-step-dots i.done { background: var(--passed-solid); }
.qb-step-dots i.now { width: 18px; background: var(--accent); }
.qb-type { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.qb-clock { margin-left: auto; font-size: 18px; font-weight: 900; }
.qb-clock.warn { color: var(--returned-fg); }
.qb-timer-track { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(36,87,230,.12); }
.qb-timer-fill { height: 100%; width: 100%; background: var(--accent); transform-origin: left center; transform: scaleX(var(--left, 1)); }

.qb-card { position: relative; overflow: hidden; border-radius: 28px; padding: 26px 24px;
  display: flex; flex-direction: column; gap: 18px; min-height: 300px; }
.qb-q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.qb-q-title { margin: 0; font-size: 18px; font-weight: 900; color: var(--ink-2); }
.qb-q-body { font-size: 19px; line-height: 1.75; padding: 18px 20px; border-radius: 20px;
  background: rgba(255,255,255,.65); border: 1px solid rgba(78,88,104,.14); overflow-wrap: anywhere; }
.qb-q-body .w-q, .qb-q-body .w-item { margin: 0; }
.qb-ctx-table { border-collapse: collapse; width: 100%; font-size: 17px; }
.qb-ctx-table td, .qb-ctx-table th { border: 1px solid rgba(78,88,104,.25); padding: 6px 10px; text-align: left; }
.qb-slot-solved { display: inline-flex; align-items: center; padding: 1px 12px; margin: 0 3px; border-radius: 10px;
  background: var(--passed-bg); color: var(--passed-fg); font-weight: 800; font-size: .92em; }
.qb-slot-target { display: inline-flex; align-items: center; justify-content: center; min-width: 76px; padding: 2px 16px; margin: 0 4px;
  border-radius: 12px; background: var(--accent); color: #fff; font-weight: 900; box-shadow: 0 6px 16px rgba(36,87,230,.32); }
.qb-slot-target.is-reveal { background: var(--passed-solid); box-shadow: 0 6px 16px rgba(15,138,95,.32); animation: pop .35s var(--ease-back) both; }
.qb-slot-later { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 1px 10px; margin: 0 3px;
  border-radius: 10px; background: rgba(78,88,104,.12); color: var(--ink-2); font-weight: 700; font-size: .88em; }
.qb-ready { display: grid; place-items: center; min-height: 140px; }
.qb-ready b { font-size: 64px; font-weight: 900; color: var(--accent); }

.qb-ans-area { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.qb-choices { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.qb-opt { flex: 1 1 160px; max-width: 280px; min-height: 58px; padding: 0 22px; border-radius: 20px;
  border: 2px solid rgba(78,88,104,.22); background: rgba(255,255,255,.88);
  font: inherit; font-size: 20px; font-weight: 900; color: var(--ink); cursor: pointer;
  transition: transform .15s var(--ease), border-color .15s, background .15s; }
.qb-opt:hover:not([disabled]) { border-color: var(--accent); transform: translateY(-2px); }
.qb-opt[disabled] { cursor: default; }
.qb-opt.is-picked { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.qb-opt.is-right { border-color: var(--passed-solid); background: var(--passed-bg); color: var(--passed-fg); }
.qb-opt.is-wrong { border-color: var(--returned-solid); background: var(--returned-bg); color: var(--returned-fg); }
.qb-blank-form { display: flex; gap: 10px; max-width: 520px; width: 100%; margin: 0 auto; }
.qb-blank-in { flex: 1; min-width: 0; height: 56px; border-radius: 18px; border: 2px solid rgba(78,88,104,.25);
  background: rgba(255,255,255,.92); padding: 0 18px; font: inherit; font-size: 20px; font-weight: 700; color: var(--ink); }
.qb-blank-in:focus { outline: 3px solid rgba(36,87,230,.35); border-color: var(--accent); }
.qb-blank-in.is-right { border-color: var(--passed-solid); background: var(--passed-bg); color: var(--passed-fg); }
.qb-blank-in.is-wrong { border-color: var(--returned-solid); background: var(--returned-bg); color: var(--returned-fg); }
.qb-status-line { text-align: center; font-size: 15px; font-weight: 700; color: var(--ink-2); min-height: 22px; }
.qb-card .omok-cover { border-radius: 28px; }
.qb-card.is-over > :not(.omok-cover) { display: none; }
.qb-card.is-over .omok-cover { position: static; background: none; padding: 0; }
.qb-card.is-over .omok-cover-card { width: 100%; max-width: 560px; }
.qb-card.is-over .rk-scores { width: 100%; }
#result-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; }

/* 반 페이지 [모둠활동]: 퀴즈 배틀 카드 (열렸을 때만) */
.qb-entry { flex: 1 1 100%; display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--r-lg); flex-wrap: wrap; }
.qb-entry-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qb-entry-main b { font-size: 18px; font-weight: 900; }

@media (max-width: 560px) {
  .qb-card { padding: 20px 16px; }
  .qb-q-body { font-size: 17px; padding: 14px; }
  .qb-opt { flex-basis: 100%; max-width: none; }
  .qb-seat { width: 104px; }
}
.lite .qb-p-gain, .lite .qb-slot-target.is-reveal { animation: none; }

/* ---------- 모둠 게시판 (패들렛 대체, posts.js) ----------
   칸(모둠)을 가로로 늘어놓고, 넘치면 가로로 넘김. 가린 칸(발표 전 다른 모둠)은 좁게 */
.post-board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding: 2px 2px 10px; overscroll-behavior-x: contain; }
.post-col { flex: 0 0 290px; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-md); background: rgba(255,255,255,.42); }
.post-col.is-mine { flex-basis: 340px; background: rgba(255,255,255,.62); box-shadow: inset 0 0 0 2px rgba(36,87,230,.25); }
.post-col.is-hidden { flex-basis: 150px; }
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; min-height: 32px; }
.col-head h3 { margin: 0; font-size: 17px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.col-add { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; border: 0; border-radius: var(--r-sm);
  background: var(--accent); color: #fff; cursor: pointer; font: inherit; }
.col-add:hover { filter: brightness(1.08); }
.col-posts { display: flex; flex-direction: column; gap: 10px; }
.col-hidden, .col-empty { padding: 14px 8px; text-align: center; font-size: 14px; color: var(--ink-2); }
.col-hidden { border: 1.5px dashed rgba(78,88,104,.3); border-radius: var(--r-sm); }
.post { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-sm); background: #fff; box-shadow: 0 2px 10px rgba(11,18,32,.07);
  animation: rise .3s var(--ease) both; overflow-wrap: anywhere; }
.post-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.post-av { flex: none; width: 40px; height: 40px; }
.post-av svg { display: block; }
.post-who { font-size: 14px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-at { margin-left: auto; font-size: 13px; color: var(--ink-2); }
.post-title { margin: 0; font-size: 16px; font-weight: 700; }
.post-body { margin: 0; font-size: 15px; line-height: 1.55; white-space: pre-wrap; }
.post-photo { display: block; border-radius: 10px; overflow: hidden; background: rgba(78,88,104,.08); }
.post-photo img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; }
.post-link { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 10px; background: var(--accent-tint);
  font-size: 14px; font-weight: 700; text-decoration: none; min-width: 0; }
.post-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-acts { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.post-act { white-space: nowrap; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: rgba(78,88,104,.1); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.post-act.is-del { background: var(--returned-bg); color: var(--returned-fg); }
.lite .post { animation: none; }
/* 글쓰기 창 */
.compose { display: flex; flex-direction: column; gap: 12px; }
.compose h2 { margin: 0; font-size: 20px; }
.compose-body { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; font: inherit; font-size: 16px; line-height: 1.5; }
.compose-photo { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.compose-photo img { display: block; max-width: 100%; max-height: 240px; border-radius: 12px; }
.compose-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.compose-gap { flex: 1; }
.compose-pick { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
@media (max-width: 600px) {
  .post-col { flex-basis: min(290px, 82vw); }
  .post-col.is-mine { flex-basis: min(340px, 86vw); }
}
/* 수업 모드 [게시판] 탭: 프로젝터라 크게, 칸이 넘치면 가로로 */
.live-board { flex: 1; min-height: 0; overflow: auto; padding: 4px; }
.live-board .post-col { flex: 0 0 clamp(260px, 22vw, 380px); max-height: 100%; overflow-y: auto; background: rgba(255,255,255,.7); }
.live-board .col-head h3 { font-size: 22px; }
.live-board .post-title { font-size: 19px; }
.live-board .post-body { font-size: 18px; }
.live-board .col-hidden { font-size: 17px; padding: 22px 8px; }


/* ---------- 반 게시판 (교사가 올리는 자료, materials.js) ----------
   모둠 게시판(.post-board·.post-col·.post)과 같은 모양. 섹션 칸을 가로로 늘어놓음 */
.mat-col { flex-basis: 300px; background: rgba(255,255,255,.55); }
.mat-col-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.mat-col-acts .post-act { min-height: 32px; padding: 0 10px; }
.post-act:disabled { opacity: .35; cursor: default; }
.post.mat.is-hidden > :not(.post-acts):not(.mat-hidden-chip) { opacity: .45; }
.mat-hidden-chip { align-self: flex-start; font-size: 12px; }
.mat-pdf { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; border-radius: 10px;
  background: rgba(162,59,11,.08); color: var(--ink); text-decoration: none; min-width: 0; }
.mat-pdf svg { flex: none; color: #A23B0B; }
.mat-pdf-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-pdf-open { flex: none; font-size: 13px; font-weight: 800; color: var(--accent); }
.mat-yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 10px; overflow: hidden;
  background: #000; cursor: pointer; }
.mat-yt img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mat-yt-play { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: rgba(11,18,32,.72); color: #fff; }
.mat-yt-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; background: #000; }
@media (max-width: 600px) {
  .mat-col { flex-basis: min(300px, 84vw); }
}
/* 관리 '반 게시판' */
.mat-admin { display: flex; flex-direction: column; gap: 14px; }
.mat-admin-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mat-admin-bar .gap { flex: 1; }
.mat-file-now { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.mat-file-now img { display: block; max-width: 100%; max-height: 200px; border-radius: 12px; }

/* ---------- 관리: 노션식 문서 화면 (진도 관리 · 보드) ----------
   body.doc: 흰 바탕, 배경 원·유리 없음. 표는 얇은 선, 칸은 평소엔 글자처럼 보이고 누르면 고친다(nd-ghost) */
body.doc { background: #fff; }
body.doc .bg { display: none; }
body.doc .admin-top .icon-btn, body.doc .admin-top .btn-line {
  background: #fff; border: 1px solid #ECEDEF; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.nd { --nd-ink: #1F2328; --nd-ink2: #6B7280; --nd-ink3: #9CA3AF; --nd-line: #ECEDEF; --nd-hover: #F5F6F7;
  display: flex; flex-direction: column; width: 100%; max-width: 980px; color: var(--nd-ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.nd .muted { color: var(--nd-ink3); }
.nd-props { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 12px; align-items: center; margin: 0 0 28px; }
.nd-props > span:nth-child(odd) { color: var(--nd-ink2); }
.nd-views { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--nd-line); flex-wrap: wrap; }
.nd-views [role="tab"] { border: 0; background: none; padding: 8px 10px; font: inherit; font-size: 14px; color: var(--nd-ink2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 40px; }
.nd-views [role="tab"][aria-selected="true"] { color: var(--nd-ink); border-bottom-color: var(--nd-ink); font-weight: 700; }
.nd-views .gap { flex: 1; }
.nd-views .nd-bar { display: flex; align-items: center; gap: 4px; color: var(--nd-ink2); }
.nd-btn { border: 0; background: none; font: inherit; font-size: 14px; color: var(--nd-ink2); padding: 6px 10px; border-radius: 6px; cursor: pointer; min-height: 34px; text-decoration: none; display: inline-flex; align-items: center; }
.nd-btn:hover { background: var(--nd-hover); color: var(--nd-ink); }
.nd-btn:disabled { opacity: .45; cursor: default; background: none; }
.nd-btn.primary { background: var(--accent); color: #fff; font-weight: 700; }
.nd-btn.primary:hover { background: var(--accent-hover); color: #fff; }
.nd-btn.danger { color: #A6321A; }
/* 넓은 화면에서는 ⋯ 메뉴가 잘리지 않게 넘침을 두고, 좁은 화면에서만 옆으로 밀기 */
.nd-scroll { overflow: visible; }
@media (max-width: 760px) { .nd-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; } }
.nd-table { width: 100%; border-collapse: collapse; }
.nd-table th { text-align: left; font-weight: 400; color: var(--nd-ink2); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--nd-line); white-space: nowrap; }
.nd-table td { padding: 5px 10px; border-bottom: 1px solid var(--nd-line); white-space: nowrap; vertical-align: middle; height: 40px; }
.nd-table tbody tr:hover td { background: var(--nd-hover); }
.nd-table td.n { color: var(--nd-ink2); width: 52px; }
.nd-table td.clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.nd-table tr.nd-now td { background: #F3F7FF; }
.nd-table tr.nd-group td { background: #FAFAFB; font-weight: 700; height: 44px; }
.nd-table tr.nd-group:hover td { background: #FAFAFB; }
.nd-table tr.nd-day td { color: var(--nd-ink2); font-size: 13px; padding-top: 16px; height: auto; }
.nd-table tr.nd-day:hover td { background: none; }
.nd-table tr.nd-day b { color: var(--nd-ink); font-weight: 700; margin-right: 8px; font-size: 14px; }
.nd-row-acts { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.nd-empty { padding: 18px 10px; color: var(--nd-ink3); }
/* 평소엔 글자처럼, 마우스를 올리면 옅은 회색, 누르면 고치기 */
.nd-ghost { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; color: inherit; padding: 4px 6px; margin: 0 -6px;
  border-radius: 5px; min-height: 30px; max-width: 100%; cursor: pointer; }
.nd-ghost:hover { background: #ECEDEF; }
.nd-ghost:focus { outline: 2px solid rgba(36,87,230,.35); background: #fff; }
input.nd-ghost { cursor: text; width: 100%; min-width: 90px; }
input.nd-ghost::placeholder { color: transparent; }
input.nd-ghost:hover::placeholder, input.nd-ghost:focus::placeholder { color: var(--nd-ink3); }
select.nd-ghost.dim { color: var(--nd-ink3); }
/* 색 태그 */
.nd-tag { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: 13px; line-height: 22px; margin: 0; min-height: 0; white-space: nowrap; }
select.nd-tag { padding: 1px 8px; margin: 0; }
.nd-tag.blue, .nd-tag[data-kind-v="수업"] { background: #E3ECFD; color: #1F4FC9; }
.nd-tag.gray, .nd-tag[data-kind-v="휴강"] { background: #EFF0F2; color: #5B616B; }
.nd-tag.yellow, .nd-tag[data-kind-v="자습"] { background: #FCF1D2; color: #8A5A00; }
.nd-tag.red, .nd-tag[data-kind-v="수행평가"] { background: #FDE4DF; color: #A6321A; }
.nd-tag.orange, .nd-tag[data-kind-v="미정"] { background: #FDE9D6; color: #9A4A00; }
.nd-tag.green { background: #DDF3E8; color: #0B6B47; }
.nd-tag.purple { background: #EEE7FC; color: #5B3BB0; }
.nd-bar-in { display: inline-block; width: 72px; height: 6px; border-radius: 3px; background: var(--nd-line); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.nd-bar-in i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.nd-bar-in.done i { background: #22A06B; }
.nd-good { color: #0B6B47; font-weight: 700; }
.nd-warn { color: #8A5A00; font-weight: 700; }
.nd-bad { color: #A6321A; font-weight: 700; }
/* ⋯ 메뉴 */
.nd-menu { position: relative; display: inline-block; }
.nd-menu > summary { list-style: none; cursor: pointer; color: var(--nd-ink3); padding: 2px 8px; border-radius: 5px; font-size: 16px; line-height: 26px; }
.nd-menu > summary::-webkit-details-marker { display: none; }
.nd-menu > summary:hover, .nd-menu[open] > summary { background: #ECEDEF; color: var(--nd-ink); }
.nd-menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 180px; background: #fff; border-radius: 8px; padding: 4px;
  box-shadow: 0 0 0 1px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.14); display: flex; flex-direction: column; }
.nd-menu-list .nd-btn { justify-content: flex-start; width: 100%; white-space: nowrap; }
/* 설정(접기) */
.nd-more { margin-top: 36px; border-top: 1px solid var(--nd-line); }
.nd-more > summary { cursor: pointer; padding: 12px 0; color: var(--nd-ink2); list-style: none; }
.nd-more > summary::-webkit-details-marker { display: none; }
.nd-more > summary::before { content: '▸'; display: inline-block; width: 16px; }
.nd-more[open] > summary::before { content: '▾'; }
.nd-sec { margin: 8px 0 28px; display: flex; flex-direction: column; gap: 8px; }
.nd-sec h3 { margin: 0; font-size: 15px; font-weight: 700; }
.nd-sec .nd-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--nd-ink2); }
.nd input[type="date"].nd-ghost, .nd input[type="time"].nd-ghost { width: auto; min-width: 0; }
.nd-tt td { padding: 2px 4px; text-align: center; }
.nd-tt select.nd-ghost { width: 100%; min-width: 44px; text-align: center; text-align-last: center; }
.nd-tt select.nd-ghost.on { background: #E3ECFD; color: #1F4FC9; font-weight: 700; }
.nd-url { font-size: 12px; color: var(--nd-ink2); word-break: break-all; background: #FAFAFB; border-radius: 6px; padding: 8px 10px; }
@media (max-width: 640px) { .nd-props { grid-template-columns: 90px minmax(0, 1fr); } }

/* ---------- 퀴즈 쇼 (11단계) ----------
   보기 색 6가지(색 + 모양으로 같이 구분). 크리에이터는 흰 문서 화면, 프로젝터·학생은 밝은 화면 */
.qs-c0 { --qc: #2457E6; } .qs-c1 { --qc: #D9480F; } .qs-c2 { --qc: #0F8A5F; }
.qs-c3 { --qc: #6F42C1; } .qs-c4 { --qc: #B7791F; } .qs-c5 { --qc: #0C7C8C; }
.qs-shape { flex: none; display: block; }

/* 크리에이터 */
.qse-body { --nd-ink: #1F2328; --nd-ink2: #6B7280; --nd-ink3: #9CA3AF; --nd-line: #ECEDEF; --nd-hover: #F5F6F7; }
.qse-body .icon-btn { background: #fff; border: 1px solid var(--nd-line); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.qse-list-wrap { max-width: 860px; padding: 28px 16px 60px; gap: 18px; }
.qse-list-top { display: flex; align-items: center; gap: 12px; }
.qse-list-top h1 { margin: 0; font-size: 26px; font-weight: 900; flex: 1; }
.qse-sets { display: flex; flex-direction: column; border-top: 1px solid var(--nd-line); }
.qse-set { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--nd-line); padding: 8px 4px; }
.qse-set:hover { background: var(--nd-hover); }
.qse-set-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--nd-ink); padding: 6px 4px; }
.qse-set-main b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qse-set-main span { font-size: 13px; }
.qse-set-btns { display: flex; gap: 6px; }
.qse-warn { color: #A6321A; font-style: normal; font-weight: 700; }

.qse { display: grid; grid-template-columns: 230px minmax(0, 1fr) 260px; grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; color: var(--nd-ink); }
.qse-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--nd-line); background: #fff; }
.qse-title { flex: 1; min-width: 0; max-width: 520px; font-weight: 700; }
.qse-save { font-size: 13px; min-width: 64px; }
.qse-save[data-kind="error"] { color: #A6321A; font-weight: 700; }
.qse-side { border-right: 1px solid var(--nd-line); display: flex; flex-direction: column; min-height: 0; background: #FAFAFB; }
.qse-items { list-style: none; margin: 0; padding: 8px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.qse-item { position: relative; border-radius: 10px; }
.qse-item.on { background: #E8EFFE; }
.qse-item.is-over { box-shadow: inset 0 3px 0 var(--accent); }
.qse-item.is-drag { opacity: .45; }
.qse-item-main { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer;
  padding: 8px 8px; border-radius: 10px; color: inherit; min-height: 52px; }
.qse-item:not(.on) .qse-item-main:hover { background: var(--nd-hover); }
.qse-item-no { flex: none; width: 22px; text-align: center; color: var(--nd-ink2); font-weight: 700; font-size: 13px; }
.qse-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qse-item-body small { color: var(--nd-ink2); font-size: 11.5px; }
.qse-item-text { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qse-item-img { flex: none; width: 34px; height: 26px; object-fit: cover; border-radius: 4px; }
.qse-item-bad { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #D9480F; color: #fff; font-size: 12px; font-weight: 900; display: grid; place-items: center; }
.qse-item-btns { position: absolute; right: 6px; top: 4px; display: none; gap: 2px; background: inherit; }
.qse-item:hover .qse-item-btns, .qse-item:focus-within .qse-item-btns { display: flex; }
.qse-mini { border: 0; background: #fff; color: var(--nd-ink2); width: 30px; height: 30px; border-radius: 7px; display: inline-grid; place-items: center; cursor: pointer;
  box-shadow: 0 0 0 1px var(--nd-line); flex: none; }
.qse-mini:hover { color: var(--nd-ink); background: var(--nd-hover); }
.qse-mini:disabled { opacity: .35; cursor: default; }
.qse-side-btns { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--nd-line); flex-wrap: wrap; }
.qse-main { overflow: auto; padding: 22px; background: #F4F6FA; }
.qse-card { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.qse-q { font-size: 22px; font-weight: 700; text-align: center; resize: vertical; min-height: 64px; background: #fff; }
.qse-media { background: #fff; border-radius: 14px; border: 2px dashed #D6DAE1; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; }
.qse-media.is-over { border-color: var(--accent); background: #F3F7FF; }
.qse-media.has-img { border-style: solid; border-color: var(--nd-line); }
.qse-img-box { position: relative; max-width: 100%; display: inline-block; line-height: 0; }
.qse-img-box img { max-width: 100%; max-height: 320px; border-radius: 8px; display: block; }
.qse-media.is-pin .qse-img-box { cursor: crosshair; }
.qse-pin-zone { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(15,138,95,.22); border: 2px solid #0F8A5F; pointer-events: none; }
.qse-pin-dot { position: absolute; width: 14px; height: 14px; transform: translate(-50%, -50%); border-radius: 50%; background: #0F8A5F; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); pointer-events: none; }
.qse-img-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.qse-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(280px, calc(50% - 5px))), 1fr)); gap: 10px; }
.qse-opt { display: flex; align-items: center; gap: 8px; min-width: 0; background: #fff; border-radius: 12px; padding: 8px 10px; min-height: 64px; box-shadow: inset 6px 0 0 var(--qc); }
.qse-opt.is-ok { box-shadow: inset 6px 0 0 var(--qc), 0 0 0 2px #0F8A5F; }
.qse-opt-shape { color: var(--qc); display: grid; place-items: center; width: 34px; }
.qse-opt-in { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; padding: 8px 4px; }
.qse-opt-in:focus { outline: 2px solid rgba(36,87,230,.3); border-radius: 6px; }
.qse-opt-img { width: 48px; height: 40px; object-fit: cover; border-radius: 6px; }
.qse-ok { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2px solid #C9CED6; background: #fff; color: transparent; display: grid; place-items: center; cursor: pointer; }
.qse-ok[aria-pressed="true"] { background: #0F8A5F; border-color: #0F8A5F; color: #fff; }
.qse-ok:hover { border-color: #0F8A5F; }
.qse-answers, .qse-puzzle { background: #fff; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.qse-ans-row { display: flex; gap: 8px; align-items: center; }
.qse-ans-row .input { flex: 1; }
.qse-slider { background: #fff; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.qse-slider-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qse-slider-prev { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.qse-slider-prev input { width: 100%; }
.qse-pz-row { display: flex; align-items: center; gap: 8px; background: #FAFAFB; border-radius: 10px; padding: 6px 8px; box-shadow: inset 5px 0 0 var(--qc); }
.qse-pz-no { width: 26px; text-align: center; font-weight: 900; color: var(--qc); }
.qse-pin-r { background: #fff; border-radius: 14px; padding: 14px 16px; }
.qse-range-row { display: flex; align-items: center; gap: 12px; }
.qse-range-row input { flex: 1; }
.qse-slide-body { min-height: 140px; font-size: 17px; background: #fff; }
.qse-problem { margin: 0; color: #A6321A; font-weight: 700; text-align: center; }
.qse-props { border-left: 1px solid var(--nd-line); padding: 16px; overflow: auto; display: flex; flex-direction: column; gap: 14px; background: #fff; }
.qse-props-h { margin: 0; font-size: 15px; font-weight: 700; }
.qse-type-btn { justify-content: space-between; width: 100%; }
.qse-hint { margin: -6px 0 0; font-size: 12.5px; }
.qse-props-end { margin-top: auto; }
.qse-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qse-type { border: 1px solid var(--nd-line); background: #fff; border-radius: 12px; padding: 12px 14px; text-align: left; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-height: 64px; }
.qse-type:hover { border-color: var(--accent); background: #F3F7FF; }
.qse-type span { font-size: 13px; }
.qse-paste { font-family: ui-monospace, monospace; font-size: 13px; }
.qse-imp-note { margin: 0; font-size: 13px; }
.qse-seg { display: inline-flex; background: #EFF1F4; border-radius: 999px; padding: 3px; gap: 2px; }
.qse-seg-b { border: 0; background: none; font: inherit; font-weight: 700; padding: 8px 18px; border-radius: 999px; cursor: pointer; color: var(--ink-2); min-height: 40px; }
.qse-seg-b.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.qse-classes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qse-class { min-height: 56px; font-size: 18px; font-weight: 900; }
@media (max-width: 1000px) {
  .qse { grid-template-columns: 200px minmax(0, 1fr); height: auto; min-height: 100vh; }
  .qse-props { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--nd-line); }
}
@media (max-width: 700px) {
  .qse { grid-template-columns: minmax(0, 1fr); }
  .qse-side { border-right: 0; border-bottom: 1px solid var(--nd-line); }
  .qse-items { flex-direction: row; overflow-x: auto; max-height: none; }
  .qse-item { min-width: 170px; }
  .qse-opts { grid-template-columns: minmax(0, 1fr); }
  .qse-slider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qse-main { padding: 14px; }
  .qse-top { flex-wrap: wrap; }
  .qse-title { order: 5; flex-basis: 100%; max-width: none; }
}

/* 퀴즈 쇼 프로젝터 (teacher/quizshow.html): 흐림 없는 밝은 화면, 글자 크게 */
.qsh-body { background: var(--bg); }
.qsh { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 18px 28px 20px; gap: 14px; }
.qsh-top { display: flex; align-items: center; gap: 12px; }
.embed .qsh-back { display: none; }
.qsh-chip { background: var(--accent-tint); color: var(--accent); font-weight: 900; padding: 4px 14px; border-radius: 999px; }
.qsh-chip:empty { display: none; }
.qsh-title { font-size: 20px; font-weight: 900; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qsh-progress { font-weight: 900; color: var(--ink-2); font-size: 18px; }
.qsh-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.qsh-stage > section { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 18px; }
.qsh-foot { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-height: 60px; }
.qsh-hint { color: var(--ink-2); font-weight: 700; }
.qsh-foot kbd, .cover-tab kbd { font: inherit; font-size: 12px; opacity: .7; border: 1px solid currentColor; border-radius: 6px; padding: 0 6px; margin-left: 4px; }
.qsh-h { margin: 0; font-size: clamp(28px, 3.6vw, 48px); font-weight: 900; text-align: center; letter-spacing: -0.02em; }
.qsh-h2 { margin: 8px 0 0; font-size: 22px; font-weight: 900; text-align: center; }

.qsh-pick { align-items: center; justify-content: center; }
.qsh-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; width: min(1000px, 100%); }
.qsh-set { border: 0; border-radius: var(--r-md); padding: 20px; text-align: left; font: inherit; display: flex; flex-direction: column; gap: 6px; cursor: pointer; min-height: 96px; color: var(--ink); }
.qsh-set b { font-size: 19px; }
.qsh-set[disabled] { opacity: .5; cursor: default; }

.qsh-lobby { align-items: center; }
.qsh-join { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 40px; border-radius: var(--r-lg); }
.qsh-join span { color: var(--ink-2); font-weight: 700; font-size: 20px; }
.qsh-join b { font-size: clamp(30px, 4vw, 52px); font-weight: 900; color: var(--accent); }
.qsh-count { display: flex; align-items: baseline; gap: 8px; font-weight: 900; }
.qsh-count b { font-size: 56px; }
.qsh-count span { font-size: 22px; color: var(--ink-2); }
.qsh-lobby-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 1200px; overflow: auto; }
.qsh-lobby-list.is-team { align-items: flex-start; gap: 14px; }
.qsh-p { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 4px 16px 4px 4px; font-weight: 700; font-size: 18px; box-shadow: var(--shadow); }
.qsh-team-col { display: flex; flex-direction: column; gap: 6px; background: rgba(255,255,255,.6); border-radius: 18px; padding: 10px; min-width: 150px; }
.qsh-team-col > b { text-align: center; }
.qsh-team-col .qsh-p { font-size: 15px; }

.qsh-q { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #fff; border-radius: var(--r-md); padding: 16px 24px; box-shadow: var(--shadow); }
.qsh-q h1 { margin: 0; font-size: clamp(26px, 3.2vw, 44px); font-weight: 900; text-align: center; line-height: 1.3; word-break: keep-all; }
.qsh-type { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.qsh-pts { font-size: 13px; font-weight: 900; color: #fff; background: var(--gold); border-radius: 999px; padding: 2px 12px; }
.qsh-mid { flex: 1; min-height: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr) 150px; align-items: center; gap: 18px; }
.qsh-clock { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 130px; height: 130px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); justify-self: center; }
.qsh-clock b { font-size: 46px; font-weight: 900; line-height: 1; }
.qsh-clock small { color: var(--ink-2); font-weight: 700; }
.qsh-clock:last-child b { font-size: 30px; }
.qsh-media { min-height: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.qsh-img { position: relative; display: inline-block; line-height: 0; max-height: 100%; }
.qsh-img img { max-width: 100%; max-height: min(44vh, 520px); border-radius: 14px; display: block; }
.qsh-ask.is-reveal .qsh-img img { max-height: min(58vh, 680px); }
.qsh-pin { position: absolute; width: 18px; height: 18px; transform: translate(-50%, -50%); border-radius: 50%; background: #D9480F; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.qsh-pin.ok { background: #0F8A5F; }
.qsh-bar, .qsp-bar { height: 8px; border-radius: 4px; background: rgba(78,88,104,.15); overflow: hidden; }
.qsh-bar i, .qsp-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; }
.qsh-ask.is-ready .qsh-bar i { background: var(--ink-2); }
.qsh-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qsh-opts.n3, .qsh-opts.n5, .qsh-opts.n6 { grid-template-columns: repeat(3, 1fr); }
.qs-opt { display: flex; align-items: center; gap: 14px; background: var(--qc); color: #fff; border-radius: 16px; padding: 14px 20px; min-height: 76px; font-weight: 900; font-size: clamp(18px, 2vw, 28px); border: 0; text-align: left; font-family: inherit; box-shadow: 0 6px 0 rgba(0,0,0,.14); }
.qs-opt .qs-shape { width: 32px; height: 32px; }
.qs-opt-text { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; word-break: keep-all; }
.qs-opt-img { width: 72px; height: 56px; object-fit: cover; border-radius: 8px; background: #fff; flex: none; }
.qs-opt.is-no { opacity: .35; }
.qs-opt.is-ok { outline: 4px solid #fff; outline-offset: -8px; }
.qsh-multi, .qsh-say { margin: 0; text-align: center; font-size: 22px; font-weight: 700; color: var(--ink-2); }
.qsh-sum { margin: 0; text-align: center; font-size: 22px; font-weight: 900; }
.qsh-puzzle { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.qsh-pz { background: var(--qc); color: #fff; font-weight: 900; font-size: 24px; border-radius: 14px; padding: 12px 28px; min-width: min(560px, 90%); text-align: center; }
.qsh-bars { flex: 1; min-height: 140px; display: flex; justify-content: center; align-items: stretch; gap: 22px; }
.qsh-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; width: 110px; color: var(--qc); }
.qsh-bar-col > span.num { font-size: 26px; font-weight: 900; color: var(--ink); }
.qsh-bar-col > i { display: block; width: 100%; flex: 1; max-height: 260px; background: var(--qc); border-radius: 10px 10px 0 0; transform-origin: bottom; transition: transform .6s var(--ease); }
.qsh-bar-col.no > i { opacity: .35; }
.qsh-bar-shape { display: flex; gap: 4px; align-items: center; color: var(--qc); }
.qsh-key { display: flex; align-items: baseline; justify-content: center; gap: 14px; }
.qsh-key span { font-size: 20px; color: var(--ink-2); font-weight: 700; }
.qsh-key b { font-size: clamp(32px, 4vw, 56px); font-weight: 900; color: var(--passed-solid); }
.qsh-words { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.qsh-word { background: #fff; border-radius: 999px; padding: 8px 18px; font-size: 22px; font-weight: 700; color: var(--returned-fg); box-shadow: var(--shadow); }
.qsh-word.ok { color: var(--passed-fg); background: var(--passed-bg); }
.qsh-hist { position: relative; height: 200px; margin: 0 40px; border-bottom: 3px solid var(--ink-2); }
.qsh-hist i { position: absolute; bottom: 0; width: 10px; margin-left: -5px; background: #D9480F; border-radius: 4px 4px 0 0; min-height: 6px; }
.qsh-hist i.ok { background: var(--passed-solid); }
.qsh-hist-zone { position: absolute; top: 0; bottom: 0; background: var(--passed-bg); border-radius: 6px; }
.qsh-hist-axis { display: flex; justify-content: space-between; margin: 0 40px; color: var(--ink-2); font-weight: 700; }
.qsh-slide { align-items: center; justify-content: center; text-align: center; }
.qsh-slide h1 { margin: 0; font-size: clamp(32px, 4.4vw, 60px); font-weight: 900; }
.qsh-slide p { margin: 0; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.6; max-width: 1100px; }
.qsh-board, .qsh-done { align-items: center; overflow: auto; }
.qsh-rank { list-style: none; margin: 0; padding: 0; width: min(900px, 100%); display: flex; flex-direction: column; gap: 8px; }
.qsh-rank li { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 16px; padding: 8px 20px; min-height: 60px; box-shadow: var(--shadow); }
.qsh-rank.is-small li { min-height: 46px; padding: 4px 18px; }
.qsh-rk { width: 36px; text-align: center; font-size: 24px; font-weight: 900; color: var(--accent); }
.qsh-rn { flex: 1; min-width: 0; font-size: 22px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qsh-rs { font-size: 24px; font-weight: 900; }
.qsh-up { color: var(--passed-fg); font-weight: 900; }
.qsh-streak { margin-left: 10px; font-size: 14px; color: #fff; background: #D9480F; border-radius: 999px; padding: 2px 10px; vertical-align: middle; }
.qsh-podium { display: flex; align-items: flex-end; justify-content: center; gap: 18px; min-height: 0; }
.qsh-pod { display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(260px, 30vw); }
.qsh-pod-avs { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.qsh-pod-name { font-size: 24px; font-weight: 900; text-align: center; }
.qsh-pod-score { font-weight: 900; color: var(--ink-2); font-size: 20px; }
.qsh-pod-block { width: 100%; border-radius: 18px 18px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 10px; color: #fff; animation: rise .7s var(--ease-back) both; }
.qsh-pod-block b { font-size: 44px; font-weight: 900; }
.qsh-pod.r1 .qsh-pod-block { height: 190px; background: var(--gold); }
.qsh-pod.r2 .qsh-pod-block { height: 140px; background: var(--silver); animation-delay: .15s; }
.qsh-pod.r3 .qsh-pod-block { height: 100px; background: var(--bronze); animation-delay: .3s; }
@media (max-width: 800px) {
  .qsh { padding: 12px 14px; }
  .qsh-mid { grid-template-columns: 1fr 1fr; }
  .qsh-mid .qsh-media { grid-column: 1 / -1; order: -1; }
  .qsh-opts, .qsh-opts.n3, .qsh-opts.n5, .qsh-opts.n6 { grid-template-columns: 1fr; }
}

/* 퀴즈 쇼 학생 (quizshow.html) */
.qsp { max-width: 720px; padding: 14px 16px 40px; gap: 14px; }
.qsp-top { display: flex; align-items: center; gap: 12px; }
.qsp-title { flex: 1; min-width: 0; font-size: 18px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qsp-score { font-weight: 900; background: var(--accent-tint); color: var(--accent); padding: 4px 14px; border-radius: 999px; }
.qsp-stage { display: flex; flex-direction: column; }
.qsp-card { border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.qsp-msg, .qsp-lobby, .qsp-done, .qsp-result, .qsp-ready { align-items: center; text-align: center; }
.qsp-card h1 { margin: 0; font-size: 26px; font-weight: 900; }
.qsp-me-av { display: flex; justify-content: center; }
.qsp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qsp-qno { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.qsp-clock { font-size: 24px; font-weight: 900; min-width: 40px; text-align: right; }
.qsp-qtext { font-size: 21px !important; line-height: 1.4; word-break: keep-all; text-align: center; }
.qsp-count { font-size: 72px; font-weight: 900; color: var(--accent); }
.qsp-media { display: flex; justify-content: center; }
.qsp-img { position: relative; display: inline-block; line-height: 0; max-width: 100%; }
.qsp-img img { max-width: 100%; max-height: 46vh; border-radius: 12px; display: block; }
.qsp-media.is-pin .qsp-img { cursor: crosshair; touch-action: manipulation; }
.qsp-mine { background: var(--accent) !important; }
.qsp-ans { display: flex; flex-direction: column; gap: 12px; }
.qsp-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qsp-opts .qs-opt { min-height: 84px; font-size: 18px; cursor: pointer; }
.qsp-opts .qs-opt.is-on { outline: 4px solid var(--ink); outline-offset: 2px; }
.qsp-opts .qs-opt:disabled { opacity: .6; }
.qsp-multi { margin: 0; text-align: center; color: var(--ink-2); font-weight: 700; }
.qsp-send { width: 100%; }
.qsp-type-in { font-size: 20px; text-align: center; min-height: 56px; }
.qsp-slider { display: flex; flex-direction: column; gap: 8px; }
.qsp-slider input { width: 100%; height: 44px; }
.qsp-slider .qsh-hist-axis { margin: 0; }
.qsp-slider-v { font-size: 36px; font-weight: 900; text-align: center; color: var(--accent); }
.qsp-puzzle { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.qsp-pz { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 6px 8px; min-height: 56px; box-shadow: inset 6px 0 0 var(--qc); }
.qsp-pz-no { width: 28px; text-align: center; font-weight: 900; color: var(--qc); }
.qsp-pz-t { flex: 1; min-width: 0; font-weight: 700; font-size: 17px; }
.qsp-pz .qse-mini { width: 44px; height: 44px; }
.qsp-sent-box { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; }
.qsp-sent-box b { font-size: 26px; font-weight: 900; }
.qsp-result { color: #fff; }
.qsp-result.is-ok { background: var(--passed-solid); }
.qsp-result.is-no { background: var(--returned-solid); }
.qsp-result.is-none { background: var(--ink-2); }
.qsp-result-h { font-size: 40px; font-weight: 900; }
.qsp-gain { font-size: 34px; font-weight: 900; }
.qsp-streak { background: rgba(255,255,255,.22); border-radius: 999px; padding: 4px 14px; font-weight: 900; }
.qsp-key { font-size: 17px; }
.qsp-key b { font-size: 21px; }
.qsp-result .muted { color: rgba(255,255,255,.85); }
.qsp-result .qsp-me-av svg { background: #fff; border-radius: 50%; }
.qsp-rankline { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 10px; }
.qsp-rankline > b { font-size: 40px; font-weight: 900; color: var(--accent); }
.qsp-rankline > span { font-weight: 700; color: var(--ink-2); }
.qsp-reward { font-size: 22px; font-weight: 900; color: var(--passed-fg); background: var(--passed-bg); border-radius: 999px; padding: 6px 18px; }
.qsp-top5 { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.qsp-top5 li { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.75); border-radius: 12px; padding: 4px 12px; min-height: 48px; }
.qsp-top5 li.is-me { outline: 2px solid var(--accent); }
.qsp-top5 li > span { flex: 1; min-width: 0; text-align: left; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qsp-top5 li > b:first-child { width: 26px; color: var(--accent); }
@media (max-width: 420px) {
  .qsp-opts { grid-template-columns: 1fr; }
  .qsp-opts .qs-opt { min-height: 64px; }
}

/* 반 페이지 '퀴즈 쇼' 띠 */
.qs-band { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.qs-band b { font-size: 18px; font-weight: 900; }
.qs-band span { flex: 1; color: var(--ink-2); font-weight: 700; }

/* 반 페이지 [퀴즈 쇼] 탭: quizshow.html을 안에 띄운다 */
.qs-tab-box { border-radius: var(--r-lg); overflow: hidden; padding: 0; }
.qs-frame { display: block; width: 100%; height: min(78vh, 760px); border: 0; background: transparent; }
.embed .qsp-top > #back { display: none; }
.embed.qsp-body, .embed .qsp-body { background: transparent; }
.embed .bg { display: none; }
.qsh-set-go { margin-top: auto; align-self: flex-end; background: var(--accent); color: #fff; font-weight: 900; font-size: 14px; border-radius: 999px; padding: 6px 14px; }

/* ---------- 쿼리도 (quoridor.html) ---------- */
.qd-board-box { padding: 2.5%; }
.qd-board { display: block; width: 100%; aspect-ratio: 1; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.qd-cell { fill: rgba(78,88,104,.12); }
.qd-cell.can { fill: rgba(36,87,230,.14); cursor: pointer; }
.qd-cell.from { fill: rgba(78,88,104,.22); }
.qd-dot { pointer-events: none; }
.qd-wall { fill: #3A2F28; }
.qd-wall.recent { fill: #6B4A2E; animation: pop .35s var(--ease-back) both; transform-box: fill-box; transform-origin: center; }
.qd-ghost { fill: rgba(34,197,130,.7); pointer-events: none; }
.qd-ghost.bad { fill: rgba(255,122,69,.75); }
.qd-board.wall-mode { cursor: crosshair; }
.qd-board.wall-mode .qd-cell { cursor: crosshair; }
.qd-pawn { pointer-events: none; transition: transform .28s ease-out; }
.qd-pawn-c { stroke: #fff; stroke-width: .9; }
.qd-ring { fill: none; stroke: transparent; stroke-width: .9; }
.qd-pawn.me .qd-ring { stroke: var(--ink); }
.qd-pawn.turn .qd-ring { stroke: var(--pending-dot); }
.qd-pawn.win .qd-pawn-c { stroke: var(--gold); stroke-width: 1.4; }
/* 자리 색: 0 파랑 · 1 초록 · 2 주황 · 3 보라 */
.qd-pawn.s0 .qd-pawn-c, .qd-goal.s0, .qd-dot.s0 { fill: #2457E6; }
.qd-pawn.s1 .qd-pawn-c, .qd-goal.s1, .qd-dot.s1 { fill: #16A36A; }
.qd-pawn.s2 .qd-pawn-c, .qd-goal.s2, .qd-dot.s2 { fill: #E58A00; }
.qd-pawn.s3 .qd-pawn-c, .qd-goal.s3, .qd-dot.s3 { fill: #8B6CF0; }
.qd-chip { width: 18px; height: 18px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.8); }
.qd-chip.s0 { background: #2457E6; }
.qd-chip.s1 { background: #16A36A; }
.qd-chip.s2 { background: #E58A00; }
.qd-chip.s3 { background: #8B6CF0; }
.qd-last { font-size: 14px; min-height: 1.4em; }
.qd-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qd-modes .btn { padding-left: 10px; padding-right: 10px; }
.qd-modes .btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.qd-hint { font-size: 14px; min-height: 1.4em; padding-left: 6px; }
.qd-sizes { display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); gap: 14px; justify-content: center; }
.qd-size { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 16px; min-height: 44px; border-radius: var(--r-md);
  border: 0; font: inherit; color: inherit; cursor: pointer; }
.qd-size b { font-size: 24px; font-weight: 900; }
.qd-size .muted { font-size: 14px; }
.qd-q { font-size: 13px; font-weight: 700; color: var(--accent); min-height: 1.3em; }
.qd-size:disabled { opacity: .5; cursor: default; }
@media (max-width: 820px) {
  .qd-play .om-side { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .qd-pawn { transition: none; }
}

/* ---------- 윷놀이 (yut.html) ---------- */
/* 편 색: 0 파랑 · 1 주황 */
.yt-board-box { padding: 3%; }
.yt-board { display: block; width: min(100%, calc(100vh - 240px)); min-width: 280px; margin: 0 auto; aspect-ratio: 1; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.yt-line { stroke: rgba(78,88,104,.32); stroke-width: .9; }
.yt-spot { fill: #fff; stroke: rgba(78,88,104,.5); stroke-width: .8; }
.yt-spot.big { stroke: var(--ink); stroke-width: 1.1; }
.yt-start { fill: none; stroke: var(--ink-2); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.yt-label { font-size: 4.6px; font-weight: 700; fill: var(--ink-2); }
.yt-step { fill: rgba(11,18,32,.45); pointer-events: none; }
.yt-to { fill: none; stroke-width: 1.4; stroke-dasharray: 2.2 1.6; pointer-events: none; }
.yt-to.t0 { stroke: #2457E6; }
.yt-to.t1 { stroke: #E58A00; }
.yt-out { font-size: 5px; font-weight: 900; fill: var(--accent); pointer-events: none; }
.yt-recent { fill: rgba(255,196,77,.35); pointer-events: none; }
.yt-piece { transition: transform .3s ease-out; }
.yt-piece-hit { fill: transparent; }
.yt-piece-c { stroke: #fff; stroke-width: 1.1; }
.yt-piece.t0 .yt-piece-c, .yt-chip.t0, .yt-tray.t0 .yt-tray-dots i { fill: #2457E6; background: #2457E6; }
.yt-piece.t1 .yt-piece-c, .yt-chip.t1, .yt-tray.t1 .yt-tray-dots i { fill: #E58A00; background: #E58A00; }
.yt-piece-n { font-size: 5px; font-weight: 900; fill: #fff; pointer-events: none; }
.yt-piece.can { cursor: pointer; }
.yt-piece.can .yt-piece-c { stroke: var(--ink); stroke-width: 1.3; }
.yt-piece.can.hover .yt-piece-c, .yt-piece.can:focus-visible .yt-piece-c { stroke-width: 2; }
.yt-piece:focus { outline: none; }
.yt-chip { width: 18px; height: 18px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.8); }

.yt-throw { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; }
.yt-sticks { display: flex; gap: 10px; justify-content: center; height: 76px; }
.yt-stick { width: 20px; height: 72px; }
.yt-stick-b { fill: #B88A5A; stroke: #7A5634; stroke-width: 1.4; }
.yt-stick.up .yt-stick-b { fill: #F3E2C6; }
.yt-stick-x { stroke: #5B3E22; stroke-width: 1.8; stroke-linecap: round; }
.yt-stick-mark { fill: #D2361E; }
.yt-stick.toss { animation: yt-toss .65s cubic-bezier(.3, .7, .4, 1) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes yt-toss {
  0% { transform: translateY(0) rotate(0); }
  45% { transform: translateY(-26px) rotate(200deg); }
  100% { transform: translateY(0) rotate(360deg); }
}
.yt-got { font-size: 26px; font-weight: 900; min-height: 1.3em; letter-spacing: -0.02em; }
.yt-got.big { color: var(--accent); }
.yt-got.back { color: var(--returned-solid); }
.yt-throw .btn-big { width: 100%; }
.yt-results { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 0; }
.yt-res { min-width: 56px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid rgba(78,88,104,.3);
  background: rgba(255,255,255,.8); font: inherit; font-size: 17px; font-weight: 900; color: var(--ink); cursor: pointer; }
.yt-res.back { color: var(--returned-solid); }
.yt-res.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.yt-res:disabled { cursor: default; opacity: .75; }
.yt-throw .qd-hint { padding-left: 0; text-align: center; }

.yt-trays { display: grid; gap: 8px; }
.yt-tray { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: 10px 14px; border-radius: var(--r-md); font-size: 15px; }
.yt-tray-dots { display: flex; gap: 4px; min-height: 14px; }
.yt-tray-dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); }
.yt-tray .muted { font-size: 13px; }
.yt-tray .yt-new { grid-column: 1 / -1; }
.yt-mini { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.yt-mini .yt-piece { transition: none; }
.yt-mini .yt-sticks { height: 60px; gap: 6px; }
.yt-mini .yt-stick { width: 16px; height: 58px; }
.yt-mini-cap { font-size: 18px; font-weight: 900; }
.yt-mini-cap.back { color: var(--returned-solid); }
@media (max-width: 820px) {
  .yt-play .om-side { flex-direction: column; display: flex; }
}
.lite .yt-stick.toss { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .yt-piece { transition: none; }
  .yt-stick.toss { animation: none; }
}

/* ---------- 게임 모음 (games.html) ---------- */
.games-h { margin: 0 0 4px 8px; font-size: 32px; font-weight: 900; letter-spacing: -0.03em; }
.games-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.games-menu.hidden { display: none; }
#v-closed { gap: 8px; }
@media (max-width: 640px) { .games-menu { grid-template-columns: 1fr; } }

/* 쿼리도 규칙 탭 */
.qd-rules { border-radius: var(--r-xl); padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; font-size: 16px; line-height: 1.6; }
.qd-rules-h { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -0.03em; }
.qd-rule { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; padding-top: 16px; border-top: 1px solid rgba(78,88,104,.14); }
.qd-rule-text { grid-template-columns: minmax(0, 1fr); }
.qd-rule h3, .qd-rule h2 { margin: 0 0 4px; font-size: 18px; font-weight: 900; color: var(--accent); }
.qd-rule p, .qd-rule ul { margin: 0; }
.qd-rule p + p { margin-top: 4px; }
.qd-rule ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.qd-rule .muted { font-size: 14px; }
.qd-mini { width: 150px; padding: 8px; border-radius: var(--r-md); background: rgba(255,255,255,.6); }
.qd-mini .qd-pawn { transition: none; }
.qd-rules-go { align-self: center; }
@media (max-width: 520px) {
  .qd-rules { padding: 20px 18px; }
  .qd-rule { grid-template-columns: 1fr; gap: 10px; }
  .qd-mini { width: 150px; justify-self: center; }
}

/* 관리 '코인 현황' */
.coins-sum { margin: 0; }
.coins-scroll { overflow-x: auto; margin: 0 -4px; }
.coins-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.coins-table th { text-align: right; font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 8px 10px; border-bottom: 1px solid rgba(78,88,104,.18); white-space: nowrap; }
.coins-table td { text-align: right; padding: 8px 10px; border-bottom: 1px solid rgba(78,88,104,.1); white-space: nowrap; }
.coins-table th.l, .coins-table td.l { text-align: left; }
.coins-table td.bal { font-weight: 900; font-size: 16px; }
.coins-table td.minus { color: #A23B0B; }
.coins-table .wait { display: block; font-size: 12px; color: #8A5300; }
.coins-table tfoot td { font-weight: 700; border-bottom: 0; }

/* 관리 'AI 채점' (2026-10-24): 칸마다 정답·AI 켜기, 학생 답별 판정 */
.ai-fields { display: grid; gap: 12px; }
.ai-field { padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.6); display: grid; gap: 8px; }
.ai-field.is-off { opacity: .7; }
.ai-fhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-fhead b { font-weight: 900; }
.ai-key { flex: 1 1 220px; min-width: 0; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.ai-fhead .switch { margin-left: 0; }
.ai-table td.ans { white-space: normal; overflow-wrap: anywhere; min-width: 120px; }
.ai-table td.why { white-space: normal; color: var(--ink-2); font-size: 13px; }
.ai-ok { min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 0; font: inherit; font-weight: 800; cursor: pointer; }
.ai-ok.yes { background: var(--passed-bg); color: var(--passed-fg); }
.ai-ok.no { background: var(--returned-bg); color: var(--returned-fg); }
.ai-del { min-height: 36px; padding: 0 10px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }

/* ---------- 휴대폰 리모컨 (teacher/remote.html) ---------- */
.rm-wrap { max-width: 520px; min-height: 100vh; min-height: 100dvh; padding: 0 16px max(16px, env(safe-area-inset-bottom)); }
.rm-wrap .gate { padding: 20px 0; }
.rm-app { display: flex; flex-direction: column; gap: 14px; }
.rm-top { display: flex; align-items: center; gap: 10px; padding-top: max(24px, env(safe-area-inset-top)); }
.rm-top h1 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -0.03em; }
.rm-conn { margin-left: auto; padding: 4px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; background: var(--pending-bg); color: var(--pending-fg); }
.rm-conn.is-on { background: var(--passed-bg); color: var(--passed-fg); }
.rm-title { margin: -6px 0 0; font-size: 15px; font-weight: 700; color: var(--ink-2); }
.rm-off { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--r-lg); color: var(--ink-2); font-size: 14px; }
.rm-off strong { font-size: 17px; color: var(--ink); }
.rm-ctl { display: flex; flex-direction: column; gap: 14px; }
.rm-stats { display: flex; gap: 8px; }
.rm-stat { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 18px; }
.rm-stat small { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.rm-stat b { font-size: 20px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-card { border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.rm-card h2 { margin: 0; font-size: 17px; font-weight: 900; }
.rm-sub { margin: -4px 0 0; font-size: 14px; color: var(--ink-2); }
.rm-sub:empty { display: none; }
.rm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rm-grow { flex: 1 1 0; min-width: 120px; }
.rm-app kbd { font: inherit; font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 5px; border: 1px solid currentColor; opacity: .8; }
.rm-pager { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.rm-big { min-height: 120px; font-size: 22px; font-weight: 900; border-radius: 28px; }
.rm-big:disabled, .rm-app .btn:disabled { opacity: .4; }
.rm-note { margin: 0; font-size: 14px; color: var(--ink-2); text-align: center; }
.rm-lesson { display: flex; flex-direction: column; gap: 14px; }
.rm-first-h { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rm-first-h strong { font-size: 22px; font-weight: 900; }
.rm-draw { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.rm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rm-tabs .btn { min-height: 56px; }
.rm-timer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rm-time { font-size: 48px; font-weight: 900; letter-spacing: -0.02em; }
.rm-round { width: 56px; min-height: 56px; padding: 0; font-size: 26px; }
#timer.is-done .rm-time { color: var(--accent); }
.rm-row .btn { white-space: nowrap; }

/* 딴 화면 기록: 학생 화면 왼쪽 아래 작은 표시 (수업 모드가 열려 있을 때만, away.js) */
.away-note { position: fixed; left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--r-pill); background: rgba(255,255,255,.92); border: 1px solid rgba(11,18,32,.08);
  font-size: 12px; font-weight: 700; color: var(--ink-2); pointer-events: none; box-shadow: 0 2px 8px rgba(11,18,32,.06); }
.away-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--returned-fg); }

/* 리모컨: 딴 화면 목록 */
.rm-away-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.rm-away-list li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: rgba(255,255,255,.6); font-size: 15px; }
.rm-away-list li.is-now { background: var(--returned-bg, rgba(255,122,69,.16)); color: var(--returned-fg); font-weight: 700; }
.rm-away-list .rm-away-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-away-list small { color: var(--ink-2); font-weight: 500; }

/* ---------- 오델로 (othello.html) ---------- */
.ot-board-box { padding: 3%; }
.ot-board {
  position: relative; width: 100%; aspect-ratio: 1; display: grid;
  grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr);
  background: rgba(22, 163, 106, .12); border-radius: 14px;
  border: 1.5px solid rgba(11, 18, 32, .22); overflow: hidden;
}
.ot-lines {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  stroke: rgba(11, 18, 32, .22); stroke-width: .28;
}
.ot-lines g { fill: rgba(11, 18, 32, .42); stroke: none; }
.ot-cell { position: relative; border: 0; padding: 0; background: none; cursor: default; min-width: 0; }
.ot-cell.can { cursor: pointer; }
.ot-cell i { position: absolute; inset: 11%; border-radius: 50%; transition: transform .18s, box-shadow .18s; }
.ot-cell.can i::after {
  content: ''; position: absolute; inset: 34%; border-radius: 50%;
  background: rgba(22, 163, 106, .55); transition: transform .15s, background .15s;
}
.ot-cell.can:hover i::after { transform: scale(1.25); background: var(--accent); }
.ot-cell.black i {
  background: radial-gradient(circle at 34% 30%, #4A5466, #0B1220 68%);
  box-shadow: 0 2px 5px rgba(11, 18, 32, .35);
  animation: oc-drop .22s var(--ease-back) both;
}
.ot-cell.white i {
  background: radial-gradient(circle at 34% 30%, #fff, #E3E8F0 75%);
  box-shadow: 0 2px 5px rgba(11, 18, 32, .22), inset 0 0 0 1px rgba(11, 18, 32, .12);
  animation: oc-drop .22s var(--ease-back) both;
}
.ot-cell.flipped i { animation: ot-flip .36s var(--ease-back) both; }
.ot-cell.last i { outline: 2.5px solid var(--accent); outline-offset: 1px; }
.ot-cell.will-flip i { outline: 2.5px dashed var(--passed-solid); outline-offset: 2px; transform: scale(1.06); }
@keyframes ot-flip {
  0% { transform: scaleX(1); }
  45% { transform: scaleX(.12) scaleY(1.08); }
  100% { transform: scaleX(1); }
}
.ot-cnt { margin-left: auto; font-size: 22px; font-weight: 900; padding-right: 4px; }

/* ---------- 관리 화면 전체: 노션·클로드식 컴팩트 (2026-11-05) ----------
   body.admin(teacher/index.html)만. 흰 바탕, 유리·그림자·큰 모서리 없음, 얇은 선, 글자 14px, 버튼·입력 30~32px.
   960px 이하는 누르기 쉽게 38~40px. 첫 화면은 가운데 3D 장면(.hero, teacher-hero.js) */
body.admin { --a-ink: #1F2328; --a-ink2: #6B7280; --a-ink3: #9CA3AF; --a-line: #ECEDEF; --a-line2: #E3E5E8; --a-hover: #F5F6F7; --side-w: 232px;
  background: #fff; color: var(--a-ink); font-size: 14px; }
body.admin .admin-wrap { max-width: 1040px; padding: 32px 48px 80px; }
body.admin #v-admin { gap: 18px !important; }
body.admin .admin-top h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
body.admin .admin-top .icon-btn { width: 32px; height: 32px; border-radius: 6px; background: none; border: 0; box-shadow: none; color: var(--a-ink2); }
body.admin .admin-top .icon-btn:hover { background: var(--a-hover); color: var(--a-ink); }
body.admin .admin-top .icon-btn svg { width: 18px; height: 18px; }
body.admin .muted { color: var(--a-ink2); }

/* 유리·떠오름·빛 반사 끔 */
body.admin .glass, body.admin .glass-strong { background: transparent; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.admin .glass-live::after { display: none; }
body.admin .lift:hover { transform: none; box-shadow: none; }
body.admin .rise { animation: none; }

/* 카드 → 제목 + 얇은 선으로 나눈 칸 */
body.admin .panel { gap: 36px; }
body.admin .card { border-radius: 0; padding: 0; gap: 10px; }
body.admin .card h2 { font-size: 15px; font-weight: 700; letter-spacing: 0; }
body.admin .card h2 .muted { font-weight: 400; color: var(--a-ink3); }
body.admin .card > h2:first-child, body.admin .card > .card-head:first-child { padding-bottom: 8px; border-bottom: 1px solid var(--a-line); margin-bottom: 2px; }
/* 항목 자체가 카드 하나면 맨 위 제목은 페이지 제목과 같으므로 숨김 */
body.admin .card.panel > h2:first-child { display: none; }
body.admin .card-head { gap: 8px; }
body.admin .card p { line-height: 1.55; }

/* 창(대화 상자)은 흰 상자로 */
body.admin dialog .card { background: #fff; border-radius: 12px; padding: 20px 22px; gap: 12px;
  box-shadow: 0 0 0 1px rgba(15,23,42,.06), 0 16px 48px rgba(15,23,42,.18); }
body.admin dialog .card > h2:first-child { border-bottom: 0; padding-bottom: 0; font-size: 17px; }
body.admin dialog.sheet::backdrop { background: rgba(15,23,42,.28); }

/* 버튼 */
body.admin .btn { min-height: 30px; padding: 0 12px; border-radius: 6px; font-weight: 500; font-size: 14px; box-shadow: none; gap: 6px; }
body.admin .btn:active { transform: none; }
body.admin .btn-small { min-height: 28px; padding: 0 10px; font-size: 13.5px; }
body.admin .btn-line { background: #fff; border: 1px solid var(--a-line2); color: var(--a-ink); }
body.admin .btn-line:hover { background: var(--a-hover); }
body.admin .btn-primary { background: var(--accent); color: #fff; border: 0; box-shadow: none; }
body.admin .btn-primary:hover { background: var(--accent-hover, #1D47C2); color: #fff; }
body.admin .btn-danger { background: #fff; border: 1px solid #F3D3CB; color: #A6321A; }
body.admin .btn-danger:hover { background: #FDF3F0; }
body.admin .btn-pass { box-shadow: none; }
body.admin .btn-big { min-height: 36px; font-size: 15px; }
body.admin .post-act { min-height: 26px; padding: 0 8px; border-radius: 5px; font-weight: 500; font-size: 12.5px; background: var(--a-hover); }
body.admin .post-act:hover { background: #ECEDEF; }

/* 입력칸 */
body.admin .input { height: 32px; border-radius: 6px; border: 1px solid var(--a-line2); background: #fff; padding: 0 9px; font-size: 14px; }
body.admin textarea.input { height: auto; padding: 7px 9px; }
body.admin .input:focus { outline: 2px solid rgba(36,87,230,.28); outline-offset: 0; border-color: #C9D5F7; }
body.admin .field { gap: 4px; }
body.admin .field > span { font-size: 12.5px; font-weight: 500; color: var(--a-ink2); }
body.admin .check { min-height: 30px; font-weight: 400; gap: 6px; }
body.admin .check input { width: 16px; height: 16px; }
body.admin .class-pick { min-height: 32px; border: 1px solid var(--a-line2); border-radius: 6px; background: #fff; }
body.admin .class-pick select { min-height: 30px; padding: 0 30px 0 10px; font-size: 14px; font-weight: 500; border-radius: 6px; }
body.admin .class-pick svg { right: 9px; width: 14px; height: 14px; }

/* 태그·탭·스위치 */
body.admin .tag { font-size: 12.5px; font-weight: 500; padding: 1px 7px; border-radius: 4px; }
body.admin .chip { border-radius: 4px; padding: 1px 7px; font-size: 12.5px; font-weight: 500; }
body.admin .cls-tabs { gap: 2px; }
body.admin .cls-tab { min-height: 28px; padding: 0 10px; border-radius: 6px; border: 0; background: none; color: var(--a-ink2); font-size: 14px; font-weight: 500; }
body.admin .cls-tab:hover { background: var(--a-hover); color: var(--a-ink); }
body.admin .cls-tab.on { background: var(--a-ink); color: #fff; }
body.admin .switch { width: 36px; height: 20px; }
body.admin .switch span { top: 2px; left: 2px; width: 16px; height: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
body.admin .switch[aria-checked="true"] span { transform: translateX(16px); }

/* 목록 줄: 둥근 칸 → 얇은 선 줄 */
body.admin :is(.nick-list, .set-list, .roster, .today-list) { gap: 0; }
body.admin :is(.nick-row, .set-row, .roster-row, .today-row) { border-radius: 0; background: none; padding: 5px 6px; min-height: 40px; border-bottom: 1px solid var(--a-line); }
body.admin :is(.nick-row, .set-row, .roster-row, .today-row):hover { background: #FAFAFA; }
body.admin :is(.nick-row, .roster-row) > b { font-weight: 500; }
body.admin .nick-row .new { font-size: 14px; font-weight: 700; }
body.admin .nick-row .old { font-size: 12.5px; }
body.admin .nick-edit .input { height: 30px; font-weight: 500; }
body.admin .set-row .input { height: 30px; }
body.admin .set-name { font-weight: 500; }
body.admin .set-num { font-size: 13px; font-weight: 500; }
body.admin .today-row .cls { font-size: 14px; font-weight: 700; }
body.admin .roster { max-height: 560px; border-top: 1px solid var(--a-line); }
body.admin .roster-row > b { font-size: 14px; }
body.admin .roster-size { padding: 12px 14px; border-radius: 8px; background: #FAFAFA; border: 1px solid var(--a-line); gap: 8px; }
body.admin .roster-size-label { font-size: 12.5px; font-weight: 500; }
body.admin .roster-size-item { font-weight: 500; }
body.admin .roster-size-item .input { height: 30px; width: 60px; }
body.admin .roll { gap: 4px; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
body.admin .roll-chip { min-height: 32px; height: 32px; border-radius: 6px; font-size: 14px; font-weight: 500; box-shadow: none; }
body.admin .roll-chip:active { transform: none; }
body.admin .roll-chip.on { font-weight: 700; }
body.admin .preset-item { min-height: 30px; border-radius: 6px; border-color: var(--a-line2); background: #fff; font-weight: 500; padding-left: 10px; }
body.admin .preset-del { width: 24px; height: 24px; border-radius: 5px; }
body.admin .points-grid { gap: 6px 12px; }
body.admin .points-grid > span { font-weight: 500; }
body.admin .points-grid > b { font-size: 12.5px; font-weight: 500; }
body.admin .points-grid .input { height: 30px; }

/* 상자형 항목(반별 잠금·게임 켜기, 보관한 보드, AI 칸, 차시 창) */
body.admin .lock-list { gap: 6px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
body.admin .lock-row { padding: 8px 10px 8px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--a-line); gap: 10px; }
body.admin .lock-row b { font-size: 14px; font-weight: 700; width: auto; }
body.admin .lock-row.is-locked { background: #FDF3F0; border-color: #F3D3CB; }
body.admin .lock-row.is-open { background: #F0FAF5; border-color: #CDEBDB; }
body.admin .board-groups { gap: 8px; }
body.admin .board-group { border-radius: 8px; background: #fff; border: 1px solid var(--a-line); padding: 10px 12px; gap: 4px; }
body.admin .board-group header b { font-size: 14px; }
body.admin .board-item { border-top-color: var(--a-line); padding: 4px 0; }
body.admin .board-item .cls { font-weight: 700; }
body.admin .ai-field { border-radius: 8px; background: #fff; border: 1px solid var(--a-line); padding: 10px 12px; gap: 6px; }
body.admin .ai-fhead b { font-weight: 700; }
body.admin .ai-ok { min-height: 26px; padding: 0 10px; border-radius: 5px; font-weight: 500; }
body.admin .ai-del { min-height: 26px; }
body.admin .lesson-list { gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
body.admin .card.lesson-win { border: 1px solid var(--a-line); border-radius: 10px; padding: 14px 16px; background: #fff; gap: 10px; }
body.admin .card.lesson-win.is-open { box-shadow: 0 0 0 2px rgba(36,87,230,.25); border-color: #C9D5F7; }
body.admin .lesson-code { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
body.admin .lesson-title { height: 30px; font-size: 14px; }
body.admin .lesson-classes { gap: 6px; }
body.admin .lesson-cls { min-height: 40px; border-radius: 6px; border-color: var(--a-line2); background: #fff; font-weight: 500; }
body.admin .lesson-chip { padding: 2px 8px; font-size: 13px; }
body.admin .lesson-add { max-width: 520px; }

/* 표 */
body.admin .coins-table { font-size: 14px; }
body.admin .coins-table th { font-size: 12.5px; font-weight: 400; color: var(--a-ink2); padding: 6px 8px; border-bottom-color: var(--a-line); }
body.admin .coins-table td { padding: 6px 8px; border-bottom-color: var(--a-line); }
body.admin .coins-table td.bal { font-size: 14px; font-weight: 700; }
body.admin .coins-table tbody tr:hover td { background: #FAFAFA; }

/* 반 게시판 칸 */
body.admin .post-board { gap: 10px; }
body.admin .post-col, body.admin .mat-col { border-radius: 10px; background: #F7F7F5; border: 1px solid var(--a-line); box-shadow: none; padding: 10px; gap: 8px; }
body.admin .post { border-radius: 8px; box-shadow: none; border: 1px solid var(--a-line); }

/* 사이드바: 클로드 앱 왼쪽 목록처럼 */
body.admin aside.side { background: #F7F7F5; border-right: 1px solid var(--a-line); padding: 10px 8px 12px; gap: 1px; }
body.admin .side-top { padding: 4px 2px 8px 4px; }
body.admin .side-home { flex: 1; padding: 4px 6px; border-radius: 6px; color: var(--a-ink); font-size: 14px; font-weight: 700; text-decoration: none; }
body.admin .side-home:hover { background: #EAEAE7; }
body.admin .side-x { width: 28px; height: 28px; border-radius: 6px; color: var(--a-ink3); }
body.admin .side-x:hover { background: #EAEAE7; }
body.admin .side-x svg { width: 16px; height: 16px; }
body.admin .side-nav { gap: 1px; }
body.admin .side-group { gap: 1px; }
body.admin .side-label { margin: 14px 0 2px 8px; font-size: 12px; font-weight: 500; color: var(--a-ink3); }
body.admin .side-label::before { display: none; }
body.admin .side-link { min-height: 30px; padding: 0 8px; gap: 8px; border-radius: 6px; font-size: 14px; font-weight: 400; color: #3F4650; }
body.admin .side-link:hover { background: #EAEAE7; color: var(--a-ink); }
body.admin .side-link[aria-current="page"] { background: #E6E6E2; color: var(--a-ink); font-weight: 500; }
body.admin .side-ic { width: 18px; height: 18px; border-radius: 0; background: none; color: var(--a-ink2); }
body.admin .side-ic svg { width: 16px; height: 16px; }
body.admin .side-ext, body.admin .side-ext svg { width: 12px; height: 12px; }
body.admin .side-badge { min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; font-weight: 700; }
body.admin .side-out { margin-top: 10px; color: var(--a-ink2); }

/* 첫 화면 3D 장면: 가운데 어두운 우주(가장자리는 흰 바탕으로 흐려짐) 위 별 점 은하 + 아래 시각·오늘 수업 */
body.admin .hero { position: relative; height: calc(100dvh - 100px); min-height: 420px; overflow: hidden; background: #fff; touch-action: none; }
/* 가운데 어두운 우주가 가장자리에서 흰 바탕으로 자연스럽게 흐려짐(옆으로 넓게, 위 메뉴·아래 시각 쪽은 옅게) */
body.admin .hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer;
  background: radial-gradient(64% 56% at 50% 46%, #161d3a 0%, #070912 80%);
  -webkit-mask-image: radial-gradient(ellipse 66% 50% at 50% 46%, #000 46%, rgba(0,0,0,.6) 70%, transparent 100%);
          mask-image: radial-gradient(ellipse 66% 50% at 50% 46%, #000 46%, rgba(0,0,0,.6) 70%, transparent 100%); }
body.admin .hero-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 48px 36px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; pointer-events: none; }
body.admin .hero-time { margin: 0; font-size: clamp(38px, 4.6vw, 68px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.04; color: #0d0d0d; font-variant-numeric: tabular-nums; }
body.admin .hero-time b { font-weight: 900; }
body.admin .hero-next { margin: 10px 0 0; font-size: 17px; font-weight: 500; color: #5d5d5d; }
body.admin .hero-next b { color: #0d0d0d; font-weight: 700; }
body.admin .hero-next b.acc { color: var(--accent); }
body.admin .hero-today { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
body.admin .hero-chip { background: #f4f4f4; color: #0d0d0d; border-radius: 14px; padding: 9px 14px; font-size: 13.5px; line-height: 1.35; min-width: 112px; font-variant-numeric: tabular-nums; }
body.admin .hero-chip small { display: block; font-size: 12px; color: #6e6e6e; }
body.admin .hero-chip.now { background: #0d0d0d; color: #fff; }
body.admin .hero-chip.now small { color: #bdbdbd; }
body.admin .hero-chip.off { color: #6e6e6e; }
/* .hero-foot가 pointer-events:none(우주를 누를 수 있게)이라, 수업 모드로 여는 링크만 다시 눌리게 */
body.admin a.hero-chip, body.admin .hero-next a { pointer-events: auto; }

/* 위 메뉴 (teacher-side.js initTop). 961px 이상에서만, 좁은 화면은 ☰ 서랍 */
.topnav { display: none; }
@media (min-width: 961px) {
  body.admin aside.side, body.admin .side-scrim, body.admin .side-open, body.admin .admin-top .top-out { display: none !important; }
  html body.admin:has(#v-admin:not(.hidden)) { padding-left: 0; padding-top: 64px; }
  body.admin .topnav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; position: fixed; z-index: 30; top: 0; left: 0; right: 0; height: 64px; padding: 0 28px; background: #fff; }
  body.admin:not(.hero-on) .topnav { border-bottom: 1px solid var(--a-line); }
  body.admin.hero-on .topnav { background: transparent; }
  body.admin.hero-on .admin-wrap { max-width: none; padding: 0; }
  body.admin.hero-on .admin-top { display: none; }
  body.admin.hero-on .hero { position: fixed; inset: 0; height: auto; z-index: 0; }
}
.tn-brand { justify-self: start; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: #0d0d0d; text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.tn-nav { display: flex; gap: 4px; }
.tn-menu { position: relative; }
.tn-menu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.tn-btn { position: relative; height: 42px; padding: 0 16px; border: 0; border-radius: 12px; background: transparent; font: inherit; font-size: 16px; font-weight: 500; color: #3d3d3d; cursor: pointer; }
.tn-menu:hover .tn-btn, .tn-menu:focus-within .tn-btn, .tn-menu.open .tn-btn { background: #f2f2f2; color: #0d0d0d; }
.tn-menu.cur .tn-btn { color: #0d0d0d; font-weight: 700; }
.tn-menu.dot .tn-btn::after { content: ""; position: absolute; top: 9px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--returned-solid); }
.tn-drop { position: absolute; top: calc(100% + 8px); left: 50%; translate: -50% 0; z-index: 31; min-width: 230px; padding: 12px;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--rows, 6), auto); column-gap: 6px;
  border-radius: 18px; background: rgba(244,244,244,.96); box-shadow: 0 12px 40px rgba(0,0,0,.10), 0 0 0 1px rgba(0,0,0,.04);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s, transform .16s, visibility 0s linear .16s; }
.tn-menu:hover .tn-drop, .tn-menu:focus-within .tn-drop, .tn-menu.open .tn-drop { opacity: 1; visibility: visible; transform: none; transition: opacity .16s, transform .16s; }
.tn-menu.shut .tn-drop { opacity: 0 !important; visibility: hidden !important; }
.tn-menu.shut .tn-btn { background: transparent; }
.tn-app:hover, .tn-app:focus-visible { background: #f2f2f2; color: #0d0d0d; }
.tn-link { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 10px; font-size: 15px; color: #0d0d0d; text-decoration: none; white-space: nowrap; }
.tn-link:hover { background: rgba(0,0,0,.05); }
.tn-link[aria-current="page"] { background: rgba(0,0,0,.07); font-weight: 700; }
.tn-link > span { flex: none; }
.tn-link .side-ext { opacity: .5; }
.tn-link .side-badge { margin-left: auto; }
.tn-right { justify-self: end; display: flex; align-items: center; gap: 6px; }
.tn-ghost { height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-size: 14.5px; color: #3d3d3d; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.tn-ghost:hover { background: #f2f2f2; color: #0d0d0d; }
.tn-pill { margin-left: 6px; height: 42px; padding: 0 20px; border-radius: 999px; background: #0d0d0d; color: #fff; font-size: 15px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.tn-pill:hover { background: #2b2b2b; }
.tn-pill svg { width: 13px; height: 13px; }
@media (prefers-reduced-motion: reduce) { .tn-drop { transition: none; } }

@media (max-width: 960px) {
  body.admin .admin-wrap { padding: 16px 16px 64px; }
  body.admin aside.side { width: min(280px, 84vw); }
  body.admin .side-link { min-height: 40px; }
  body.admin .btn { min-height: 38px; }
  body.admin .btn-small { min-height: 36px; }
  body.admin .input, body.admin .set-row .input, body.admin .points-grid .input { height: 38px; }
  body.admin .class-pick, body.admin .class-pick select { min-height: 38px; }
  body.admin .cls-tab { min-height: 36px; }
  body.admin .roll-chip { min-height: 40px; height: 40px; }
  body.admin .hero { height: calc(100dvh - 100px); min-height: 360px; }
  body.admin .hero canvas { background: radial-gradient(80% 44% at 50% 42%, #161d3a 0%, #070912 78%);
    -webkit-mask-image: radial-gradient(ellipse 80% 40% at 50% 42%, #000 46%, rgba(0,0,0,.6) 70%, transparent 100%);
            mask-image: radial-gradient(ellipse 80% 40% at 50% 42%, #000 46%, rgba(0,0,0,.6) 70%, transparent 100%); }
  body.admin .hero-foot { flex-direction: column; align-items: stretch; padding: 0 4px 12px; gap: 14px; }
  body.admin .hero-time { font-size: 34px; }
  body.admin .hero-next { font-size: 15px; }
  body.admin .hero-today { justify-content: flex-start; }
  body.admin .hero-chip { min-width: 0; }
}

/* ===== 관리 화면 '나' 디자인 (2026-11-05 시안 mockups/admin-pages.html 승인)
   흰 바탕 + 연회색 둥근 큰 상자(#F7F7F7, 28px) 안에 흰 표·입력. 아주 굵은 큰 제목.
   색 규칙: 검정 = 누르는 것(알약 단추·고른 탭)만, 초록 = 끝남, 그 밖의 표시는 회색 ===== */
body.admin { --b-bg: #F7F7F7; --b-ink: #0D0D0D; --b-ink2: #5D5D5D; --b-ink3: #8A8A8A; --b-line: #ECECEC; --b-pill: #F2F2F2;
  --a-ink: #0D0D0D; --a-ink2: #5D5D5D; --a-ink3: #8A8A8A; --a-line: #ECECEC; --a-line2: #E3E3E3; --a-hover: #F4F4F4; }
body.admin .admin-wrap { max-width: 1200px; padding: 44px 48px 96px; }
body.admin #v-admin { gap: 24px !important; }
body.admin .admin-top h1 { font-size: 40px; font-weight: 900; letter-spacing: -0.035em; line-height: 1.1; color: var(--b-ink); }
body.admin .panel { gap: 16px; }
body.admin .panel.nd { max-width: none; --nd-ink: #0D0D0D; --nd-ink2: #5D5D5D; --nd-ink3: #8A8A8A; --nd-line: #ECECEC; --nd-hover: #F4F4F4; }

/* 큰 상자: 항목 안 카드 하나하나, 카드 하나짜리 항목, 노션식 표 칸 */
body.admin :is(.panel > .card, .card.panel, .panel.nd > .nd-scroll, .panel.nd > .nd-more, .lesson-add) {
  background: var(--b-bg); border-radius: 28px; padding: 28px 32px; gap: 14px; }
body.admin .panel.nd > .nd-scroll:empty { display: none; }
body.admin .card h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--b-ink); }
body.admin .card > h2:first-child, body.admin .card > .card-head:first-child { padding-bottom: 0; border-bottom: 0; margin-bottom: 2px; }
body.admin .card p { color: var(--b-ink2); }
body.admin .muted { color: var(--b-ink2); }

/* 단추: 알약. 주요 = 검정, 보조 = 연회색(상자 안에서는 흰색) */
body.admin .btn { min-height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 500; }
body.admin .btn-small { min-height: 32px; padding: 0 13px; font-size: 13.5px; }
body.admin .btn-big { min-height: 44px; padding: 0 22px; font-size: 15px; }
body.admin .btn-primary, body.admin .nd-btn.primary { background: var(--b-ink); color: #fff; border: 0; }
body.admin .btn-primary:hover, body.admin .nd-btn.primary:hover { background: #2B2B2B; color: #fff; }
body.admin .btn-line { background: var(--b-pill); border: 0; color: var(--b-ink); }
body.admin .btn-line:hover { background: #E8E8E8; }
body.admin :is(.panel > .card, .card.panel, .nd-scroll, .nd-more, .lesson-win, .lesson-add) .btn-line { background: #fff; }
body.admin :is(.panel > .card, .card.panel, .nd-scroll, .nd-more, .lesson-win, .lesson-add) .btn-line:hover { background: #EDEDED; }
body.admin .btn-danger { background: #fff; border: 0; color: #A6321A; box-shadow: inset 0 0 0 1px #F3D3CB; }
body.admin .nd-btn { border-radius: 999px; min-height: 34px; padding: 0 14px; color: var(--b-ink2); }
body.admin .nd-btn:hover { background: var(--b-pill); color: var(--b-ink); }
body.admin .nd-btn.primary { font-weight: 500; padding: 0 16px; }

/* 입력: 흰 바탕, 상자 안에서는 테두리 없이 */
body.admin .input { height: 36px; border-radius: 10px; border: 1px solid var(--a-line2); background: #fff; padding: 0 11px; }
body.admin :is(.panel > .card, .card.panel, .nd-more, .lesson-add) .input { border-color: transparent; }
body.admin .input:focus { outline: none; border-color: var(--b-ink); }
body.admin .class-pick { min-height: 36px; border: 0; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--a-line2); }
body.admin .class-pick select { min-height: 36px; border-radius: 999px; padding: 0 32px 0 14px; }
body.admin .field > span { font-size: 13px; color: var(--b-ink2); }

/* 탭: 알약, 고른 것만 검정 */
body.admin .cls-tab { min-height: 34px; padding: 0 14px; border-radius: 999px; color: var(--b-ink2); }
body.admin .cls-tab:hover { background: var(--b-pill); }
body.admin .cls-tab.on { background: var(--b-ink); color: #fff; }
body.admin .nd-views { border-bottom: 0; gap: 4px; margin-bottom: 4px; }
body.admin .nd-views [role="tab"] { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; color: var(--b-ink2); font-size: 14px; margin: 0; }
body.admin .nd-views [role="tab"]:hover { background: var(--b-pill); color: var(--b-ink); }
body.admin .nd-views [role="tab"][aria-selected="true"] { background: var(--b-ink); color: #fff; font-weight: 500; border: 0; }
body.admin .nd-props { margin: 0 0 8px; }

/* 표시(태그): 알약. 회색이 기본, 끝남만 초록 */
body.admin .tag, body.admin .chip { border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 500; }
body.admin .tag-off { background: transparent; color: #8A8A8A; box-shadow: inset 0 0 0 1px #E0E0E0; }
body.admin .tag-today { background: #ECECEC; color: #3D3D3D; }
body.admin .nd-tag { border-radius: 999px; padding: 1px 10px; font-weight: 500; }
body.admin .nd-tag.gray { background: #ECECEC; color: #3D3D3D; }
body.admin .nd-tag.line { background: transparent; color: #6E6E6E; box-shadow: inset 0 0 0 1px #E0E0E0; }
body.admin .nd-tag.green { background: rgba(34,197,130,.14); color: #0B6B47; }
body.admin .nd-bar-in { width: 88px; height: 6px; border-radius: 99px; background: #ECECEC; }
body.admin .nd-bar-in i { background: #9A9A9A; border-radius: 99px; }
body.admin .nd-bar-in.done i { background: #22A36D; }

/* 표: 상자 안 흰 표, 얇은 선 */
body.admin :is(.nd-table, .coins-table) { border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 18px; }
body.admin :is(.nd-table, .coins-table) th { font-size: 13px; color: #6E6E6E; padding: 12px 12px 10px; border-bottom: 1px solid var(--b-line); }
body.admin :is(.nd-table, .coins-table) td { border-bottom: 1px solid #F0F0F0; padding: 6px 12px; height: 46px; }
body.admin :is(.nd-table, .coins-table) tbody tr:last-child td { border-bottom: 0; }
body.admin :is(.nd-table, .coins-table) tbody tr:last-child td:first-child { border-bottom-left-radius: 18px; }
body.admin :is(.nd-table, .coins-table) tbody tr:last-child td:last-child { border-bottom-right-radius: 18px; }
body.admin .nd-table tbody tr:hover td, body.admin .coins-table tbody tr:hover td { background: #FAFAFA; }
body.admin .nd-table tr.nd-group td, body.admin .nd-table tr.nd-group:hover td { background: #fff; font-size: 15px; height: 52px; border-bottom-color: var(--b-line); }
body.admin .nd-table tr.nd-now td { background: #F4F4F4; }
body.admin .nd-menu > summary { border-radius: 8px; color: var(--b-ink3); }
body.admin .nd-menu > summary:hover, body.admin .nd-menu[open] > summary { background: var(--b-pill); color: var(--b-ink); }
body.admin .nd-menu-list { border-radius: 14px; padding: 6px; }
body.admin .nd-menu-list .nd-btn { border-radius: 8px; }
body.admin .nd-more > summary { padding: 0; font-size: 15px; font-weight: 700; color: var(--b-ink); }
body.admin .nd-more { margin-top: 0; border-top: 0; }
body.admin .nd-more[open] > summary { margin-bottom: 18px; }
body.admin .nd-sec .nd-scroll { background: #fff; border-radius: 18px; }
body.admin .nd-url { background: #fff; border-radius: 10px; }
body.admin .nd-empty { color: var(--b-ink3); }

/* 목록 줄: 상자 안 얇은 선 */
body.admin :is(.nick-row, .set-row, .roster-row, .today-row) { border-bottom-color: #E8E8E8; min-height: 46px; padding: 6px 4px; }
body.admin :is(.nick-row, .set-row, .roster-row, .today-row):hover { background: transparent; }
body.admin .roster { border-top-color: #E8E8E8; }

/* 상자 안 작은 상자: 흰색, 테두리 없음 */
body.admin :is(.lock-row, .board-group, .ai-field, .roster-size, .preset-item) { background: #fff; border: 0; border-radius: 14px; }
body.admin .lock-row.is-locked { background: #FDF3F0; }
body.admin .lock-row.is-open { background: #F0FAF5; }
body.admin .roll-chip { border-radius: 999px; }
body.admin .post-col, body.admin .mat-col { background: #fff; border: 0; border-radius: 18px; }

/* 수업 시작 차시 카드 */
body.admin .lesson-list { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
body.admin .card.lesson-win { background: var(--b-bg); border: 0; border-radius: 24px; padding: 22px 22px 20px; gap: 12px; box-shadow: none; }
body.admin .card.lesson-win.is-open { background: #fff; box-shadow: inset 0 0 0 1.5px #D4D4D4; }
body.admin .lesson-code { font-size: 34px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
body.admin .lesson-title { height: 34px; font-size: 15px; font-weight: 500; background: transparent !important; border-color: transparent !important; padding: 0 6px; }
body.admin .lesson-title:hover { background: #fff !important; }
body.admin .lesson-title:focus { background: #fff !important; border-color: var(--b-ink) !important; }
body.admin .card.lesson-win .lesson-src { border-color: transparent; }
body.admin .card.lesson-win.is-open :is(.lesson-src, .btn-line) { background: #F4F4F4; }
body.admin .lesson-sheet .tag-done { background: transparent; color: var(--b-ink2); padding: 0; box-shadow: none; }
body.admin .lesson-chips { gap: 4px; }
body.admin .lc-chip { min-width: 34px; height: 24px; display: inline-grid; place-items: center; padding: 0 6px; font-size: 12px; }
body.admin .lc-chip.tag-done { background: #fff; color: var(--b-ink); }
body.admin .card.lesson-win.is-open .lc-chip.tag-done { background: #F2F2F2; }
body.admin .lesson-cls { min-height: 44px; border: 0; border-radius: 999px; background: #F2F2F2; font-size: 16px; font-weight: 500; }
body.admin .lesson-cls:hover { background: #E8E8E8; color: var(--b-ink); }
body.admin .lesson-cls.is-last { background: var(--b-ink); color: #fff; }
body.admin .lesson-add { max-width: none; }

/* 포인트 규칙: 왼쪽 목록 + 오른쪽 칸 (상자 대신 칸마다 상자) */
body.admin .card.panel.pt-form { background: none; padding: 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
body.admin .pt-nav { position: sticky; top: 96px; display: flex; flex-direction: column; }
body.admin .pt-nav button { text-align: left; border: 0; background: none; font: inherit; font-size: 16px; color: var(--b-ink2); padding: 16px 2px; border-bottom: 1px solid #E6E6E6; cursor: pointer; }
body.admin .pt-nav button:hover { color: var(--b-ink); }
body.admin .pt-nav button.on { color: var(--b-ink); font-weight: 700; border-bottom-color: var(--b-ink); }
body.admin .pt-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
body.admin .pt-sec { background: var(--b-bg); border-radius: 28px; padding: 28px 32px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 88px; }
body.admin .pt-sec .input { border-color: transparent; }
body.admin .pt-sec .points-grid { grid-template-columns: minmax(0, 1fr) 120px 120px; grid-template-rows: 34px; grid-auto-rows: 50px; gap: 0; justify-content: stretch; align-items: center;
  background: linear-gradient(#E8E8E8, #E8E8E8) 0 33px / 100% 1px no-repeat, repeating-linear-gradient(to bottom, transparent 0 49px, #E8E8E8 49px 50px) 0 34px / 100% calc(100% - 34px) no-repeat; }
body.admin .pt-sec .points-grid.pt-one { grid-template-columns: minmax(0, 1fr) 120px; }
body.admin .pt-sec .points-grid > b { justify-self: end; color: #6E6E6E; font-weight: 400; font-size: 13px; }
body.admin .pt-sec .points-grid > .input { justify-self: end; width: 96px; height: 36px; text-align: right; }
body.admin .pt-sec .points-grid > span { font-weight: 400; font-size: 14.5px; }
body.admin .pt-save { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }

/* 카드 하나짜리 항목의 첫 줄 제목은 페이지 제목과 같으므로 숨김(옆 단추·반 고르기는 남김) */
body.admin .card.panel > .card-head:first-child > h2:first-child { display: none; }
body.admin .card.panel > .card-head:first-child { justify-content: flex-end; }

/* 창(대화 상자) */
body.admin dialog .card { border-radius: 24px; padding: 26px 28px; background: #fff; }
body.admin dialog .card .input { border-color: var(--a-line2); }

@media (max-width: 960px) {
  body.admin .admin-wrap { padding: 20px 16px 64px; }
  body.admin .admin-top h1 { font-size: 30px; }
  body.admin :is(.panel > .card, .card.panel, .panel.nd > .nd-scroll, .panel.nd > .nd-more, .lesson-add, .pt-sec) { padding: 20px 18px; border-radius: 22px; }
  body.admin .card.panel.pt-form { grid-template-columns: 1fr; gap: 12px; padding: 0; }
  body.admin .pt-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; }
  body.admin .pt-nav button { border: 0; border-radius: 999px; padding: 8px 14px; white-space: nowrap; font-size: 14px; }
  body.admin .pt-nav button.on { background: var(--b-ink); color: #fff; }
  body.admin .btn { min-height: 40px; }
  body.admin .input { height: 40px; }
}

/* ===== 학생 화면 공통 위 메뉴 + 리퀴드 글래스 (2026-11-05 시안 mockups/student-glass.html '가' 승인)
   유리는 떠 있는 것(위 메뉴·금화 알약·아래 탭 바)에만. 크롬은 glass.js가 가장자리 굴절(.lg-refract)을 붙임.
   .lite·투명도 줄이기면 흐림 없이 흰색 ===== */
.lg { position: relative; isolation: isolate; background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(8px) saturate(170%); backdrop-filter: blur(8px) saturate(170%);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.6), inset 1.5px 1.5px 1px -1px rgba(255,255,255,.95), inset -1.5px -1.5px 1px -1px rgba(255,255,255,.7),
    inset 0 0 14px rgba(255,255,255,.35), 0 0 0 .5px rgba(0,0,0,.06), 0 6px 22px -6px rgba(0,0,0,.14), 0 1px 3px rgba(0,0,0,.06); }
.lg.lg-refract { -webkit-backdrop-filter: var(--lg-f) saturate(170%); backdrop-filter: var(--lg-f) saturate(170%); }
.lg::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, #fff, rgba(255,255,255,.2) 30%, rgba(255,255,255,0) 50%, rgba(255,255,255,.2) 72%, rgba(255,255,255,.85));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.lite .lg, .lite .lg.lg-refract { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,.96); }
@media (prefers-reduced-transparency: reduce) { .lg, .lg.lg-refract { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,.96); } }

.stu-top { position: sticky; top: 12px; z-index: 40; margin: 12px auto 0; width: min(1160px, calc(100% - 24px)); height: 60px; border-radius: 999px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 10px 0 22px; color: #0d0d0d; font-size: 15px; }
.stu-brand { font-size: 17px; font-weight: 900; letter-spacing: -.02em; color: #0d0d0d; text-decoration: none; white-space: nowrap; }
.stu-nav { display: flex; gap: 2px; }
.stu-nav a { height: 42px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; font-weight: 500; color: #3d3d3d; text-decoration: none; white-space: nowrap; }
.stu-nav a:hover { background: rgba(0,0,0,.05); color: #0d0d0d; }
.stu-nav a.cur { background: #0d0d0d; color: #fff; }
.stu-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.stu-coin { height: 40px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.stu-coin i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; background: radial-gradient(circle at 35% 30%, #FFE7A1, #E0A92B 70%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }
.stu-coin i.s { background: radial-gradient(circle at 35% 30%, #fff, #A9B0BB 70%); }
.stu-coin .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stu-me { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #f2f2f2; }
.stu-out, .stu-login { height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: #5d5d5d; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.stu-out:hover { background: rgba(0,0,0,.05); color: #0d0d0d; }
.stu-login { background: #0d0d0d; color: #fff; padding: 0 18px; font-weight: 500; }
.stu-dock { display: none; }
/* 예전 페이지마다 있던 위쪽 링크는 위 메뉴가 대신함(되돌아가기 화살표는 그대로) */
.has-stu-top .main-top, .has-stu-top .top-links, .has-stu-top .page-top > .nav-link { display: none; }

@media (max-width: 860px) {
  .stu-top { grid-template-columns: 1fr auto; height: 56px; padding: 0 8px 0 18px; }
  .stu-nav { display: none; }
  .stu-out { height: 36px; padding: 0 10px; font-size: 13.5px; }
  .stu-coin { height: 36px; padding: 0 11px; font-size: 13.5px; }
  .stu-me { width: 38px; height: 38px; }
  /* 아래 탭 바: 화면 너비 가득한 반투명 유리 막대, 아이콘 4개, 고른 칸은 옅은 알약. 아래로 내리면 숨음(.is-away, topbar.js) */
  .stu-dock { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 40;
    width: min(440px, calc(100% - 32px)); transform: translateX(-50%); transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .25s;
    display: flex; gap: 4px; padding: 5px; border-radius: 999px; }
  .stu-dock.is-away { transform: translate(-50%, calc(100% + 28px)); opacity: 0; pointer-events: none; }
  .stu-dock a { flex: 1; min-width: 0; height: 48px; border-radius: 999px; display: grid; place-items: center;
    color: #0d0d0d; text-decoration: none; transition: background-color .2s; -webkit-tap-highlight-color: transparent; }
  .stu-dock a svg { width: 24px; height: 24px; }
  .stu-dock a.cur { background: rgba(0,0,0,.08); }
  .stu-dock a.cur svg { stroke-width: 2.4; }
  .stu-dock a:active { background: rgba(0,0,0,.12); }
  .has-stu-top body { padding-bottom: 84px; }
}
@media (max-width: 480px) { .stu-top { grid-template-columns: 1fr; padding-left: 8px; } .stu-brand { display: none; } .stu-right { justify-self: stretch; justify-content: flex-end; } }
/* 로그인 전(금화·캐릭터가 없을 때)에는 좁은 화면에서도 이름을 보임 — 빈 알약이 되지 않게 */
@media (max-width: 480px) { .stu-top:not(:has(.stu-me)) { grid-template-columns: 1fr auto; padding-left: 18px; } .stu-top:not(:has(.stu-me)) .stu-brand { display: block; } }
@media (max-width: 400px) { .stu-coin b { font-size: 13px; } .stu-coin { padding: 0 9px; gap: 4px; } }

/* ===== 학생 화면 '가' 디자인 (2026-11-05 시안 mockups/student-glass.html 승인)
   <html class="stu">인 학생 화면만. 관리 화면 '나'처럼: 흰 바탕, 연회색 둥근 큰 상자(#F7F7F7) 안에 흰 칸, 굵은 큰 제목, 알약 단추.
   검정 = 누르는 것·고른 것만. 상태색(검사 대기·다시·통과)과 게임 말·타일 색은 그대로. 유리는 떠 있는 것(.lg)에만 ===== */
html.stu { --bg: #fff; --ink: #0D0D0D; --ink-2: #5D5D5D; --accent: #0D0D0D; --accent-hover: #2B2B2B; --accent-tint: #F0F0F0;
  --s-box: #F7F7F7; --s-pill: #F0F0F0; --s-line: #E6E6E6;
  --glass-bg: #F7F7F7; --glass-strong-bg: #F7F7F7; --shadow: none; --shadow-strong: none; --idle-bg: #ECECEC; }
html.stu body { background: #fff; }
html.stu .bg { display: none; }
html.stu :focus-visible { outline: 3px solid rgba(13,13,13,.28); }
html.stu a:hover { color: inherit; }

/* 큰 상자: 예전 유리 카드 → 연회색, 그림자·흐림·테두리 없음. 상자 안 상자 → 흰색 */
html.stu :is(.glass, .glass-strong) { background: var(--s-box); border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.stu :is(.glass, .glass-strong) :is(.glass, .glass-strong) { background: #fff; }
html.stu .glass-live::after { display: none; }
html.stu .lift:hover { transform: translateY(-2px); box-shadow: none; }
html.stu .main-wrap .lift:hover { transform: translateY(-2px); }
html.stu :is(.board-card, .ws-card, .me-card, .login-box, .home-me) { border-radius: 30px; }
html.stu dialog.sheet .card, html.stu dialog.sheet > .glass-strong, html.stu dialog .glass-strong { background: #fff; box-shadow: 0 24px 60px -12px rgba(0,0,0,.28); }
html.stu dialog.sheet::backdrop { background: rgba(0,0,0,.32); }

/* 단추: 알약. 주요 = 검정, 보조 = 연회색(상자 안에서는 흰색) */
html.stu .btn { font-weight: 500; }
html.stu .btn-big { font-weight: 700; }
html.stu .btn-primary { background: #0D0D0D; color: #fff; box-shadow: none; }
html.stu .btn-primary:hover { background: #2B2B2B; color: #fff; }
html.stu .btn-line { background: var(--s-pill); border: 0; color: #0D0D0D; }
html.stu .btn-line:hover { background: #E6E6E6; }
html.stu :is(.glass, .glass-strong) .btn-line { background: #fff; }
html.stu :is(.glass, .glass-strong) .btn-line:hover { background: #EDEDED; }
html.stu .btn-glass, html.stu .icon-btn.glass, html.stu .nav-link.glass { background: var(--s-pill); }
html.stu .icon-btn.glass:hover { background: #E6E6E6; }
html.stu .chip { background: #ECECEC; color: #3D3D3D; font-weight: 500; }
html.stu .lesson-chip { background: var(--s-pill); }

/* 입력: 흰 바탕, 얇은 선 */
html.stu :is(.input, .code-input) { background: #fff; border: 1px solid var(--s-line); }
html.stu :is(.input, .code-input, .qb-blank-in):focus { outline: none; border-color: #0D0D0D; }
html.stu :is(.glass, .glass-strong) :is(.input, .code-input) { border-color: transparent; }
html.stu :is(.glass, .glass-strong) :is(.input, .code-input):focus { border-color: #0D0D0D; }
/* 학습지 표 안 빈칸(2026-11-11): 표도 칸도 흰색이라 묻혀서, 표 안 칸은 연회색으로 채운다(채점 표시 칸은 그대로) */
html.stu .ws-page td .ws-in:not(.is-wrong):not(.is-empty):not(.is-checking), html.stu .ws-page td .ws-in[disabled]:not(.is-wrong):not(.is-empty):not(.is-checking) { background: #EDEDED; }

/* 탭: 알약, 고른 것만 검정 */
html.stu .class-tabs { background: var(--s-pill); }
html.stu .class-tab.on { background: #0D0D0D; color: #fff; }

/* 파랑으로 '나·고른 것'을 표시하던 곳 → 회색·검정 */
html.stu .gs.is-mine, html.stu .qb-p.is-me { box-shadow: inset 0 0 0 1.5px #0D0D0D; }
html.stu .xp-track, html.stu .qb-timer-track { background: #E6E6E6; }
html.stu .wear-opt:hover { border-color: #CFCFCF; }
html.stu .wear-opt[aria-checked="true"] { border-color: #0D0D0D; background: #fff; box-shadow: none; }
html.stu .rank-row.is-mine { background: #ECECEC; border-color: transparent; }
html.stu .login-cls.on { background: #0D0D0D; border-color: #0D0D0D; box-shadow: none; }
html.stu .shop-item[aria-pressed="true"] { background-color: #fff; box-shadow: 0 0 0 2px #0D0D0D; outline: 0; }
html.stu .reward-ic.ic-pair { background: #ECECEC; }
html.stu .ws-group:not(.is-none), html.stu .wsdone-chip { background: #ECECEC; color: #0D0D0D; }
html.stu .qb-seat.is-in { background: #fff; border-color: #0D0D0D; box-shadow: none; }
html.stu .post-col.is-mine { background: #fff; box-shadow: inset 0 0 0 1.5px var(--s-line); }
html.stu .rk-add, html.stu .rk-new { border-color: #BDBDBD; }

html.stu .lv-ring circle:first-child { stroke: #E6E6E6; }
html.stu .lv-ring .lv-arc { stroke: #0D0D0D; }

/* 제목: 아주 굵게 크게 */
html.stu :is(.class-title, .main-title) { font-weight: 900; letter-spacing: -0.035em; }
html.stu .class-title { font-size: 40px; }

/* ---------- 입구: 왼쪽 프로필, 오른쪽 2×2 칸 + 순위 한 줄 (시안과 같음) ---------- */
html.stu .main-wrap { max-width: 1184px; padding-top: 28px; }
html.stu .home { grid-template-columns: 360px minmax(0, 1fr); gap: 22px; }
html.stu .home-me { padding: 34px 28px 28px; gap: 12px; justify-content: flex-start; }
html.stu .home-av { width: 200px; height: 200px; }
html.stu .home-nick { font-size: 28px; margin-top: 4px; }
html.stu .home-lv { width: 100%; display: grid; gap: 8px; text-align: left; margin-top: 6px; }
html.stu .home-lv.hidden, html.stu .home-stats.hidden { display: none; }
html.stu .home-lv-row { display: flex; justify-content: space-between; font-size: 14px; color: #5D5D5D; }
html.stu .home-lv-row b { color: #0D0D0D; font-size: 15px; }
.home-bar { height: 8px; border-radius: 99px; background: rgba(0,0,0,.08); overflow: hidden; }
.home-bar i { display: block; height: 100%; border-radius: 99px; background: #0D0D0D; transform-origin: left; transform: scaleX(0); transition: transform 1s var(--ease); }
html.stu .home-stats { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
html.stu .home-stats > div { padding: 12px 6px; border-radius: 16px; background: #fff; text-align: center; }
html.stu .home-stats b { display: block; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
html.stu .home-stats span { font-size: 12.5px; color: #5D5D5D; }
html.stu .home-menu { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; grid-auto-rows: auto; gap: 14px; }
html.stu .home-item { min-height: 150px; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 22px; border-radius: 26px; }
html.stu .home-item:last-child { grid-column: span 2; min-height: 0; flex-direction: row; align-items: center; }
html.stu .home-menu:has(#go-games[hidden]) .home-item:nth-child(3) { grid-column: span 2; }
html.stu .home-ic { width: 46px; height: 46px; border-radius: 14px; background: #fff; color: #0D0D0D; }
html.stu .home-ic svg { width: 24px; height: 24px; }
html.stu .home-txt b { font-size: 20px; }
html.stu .home-txt span { font-size: 14px; color: #5D5D5D; }
html.stu .home-go { display: none; }
html.stu .home-item:last-child .home-go { display: block; font-size: 22px; }
html.stu #go-class.home-item { background: #0D0D0D; color: #fff; box-shadow: none; border: 0; }
html.stu #go-class .home-ic { background: rgba(255,255,255,.14); color: #fff; }
html.stu #go-class .home-txt b { font-size: 20px; }
html.stu #go-class .home-txt span { color: #BDBDBD; }
html.stu .login-cls { background: #fff; border-color: transparent; }
html.stu .login-cls.is-other { background: transparent; border-color: #BDBDBD; }
html.stu .guest-link { background: var(--s-pill); }
@media (max-width: 860px) {
  html.stu .home { grid-template-columns: minmax(0, 1fr); }
  html.stu .home-menu { grid-template-rows: none; }
  html.stu .home-item { min-height: 128px; }
  html.stu .class-title { font-size: 32px; }
}
@media (max-width: 480px) {
  html.stu .home-menu { gap: 10px; }
  html.stu .home-item { min-height: 118px; padding: 18px; }
}

/* ---------- 수업 모드 덮개(G) + 덮개 안 모둠 편성: 새 디자인 (2026-11-05) ----------
   흰 바탕, 연회색 큰 상자(#F7F7F7) 안 흰 상자, 검정 = 누르는 것·고른 것만, 그림자·테두리 없음.
   모둠 편성은 embed(덮개 안)일 때만 바꾼다. 상태색(검사 대기·다시·통과)은 그대로 */
.cover, .embed .groups-wrap, .embed .gstage {
  --bg: #fff; --ink: #0D0D0D; --ink-2: #5D5D5D; --accent: #0D0D0D; --accent-hover: #2B2B2B; --accent-tint: #F0F0F0;
  --shadow: none; --shadow-strong: none; font-family: 'Noto Sans KR', system-ui, sans-serif; }
.cover { background: #fff; padding: 22px 28px 18px; gap: 16px; }
.cover :is(.glass, .glass-strong) { background: #F7F7F7; border: 0; box-shadow: none; }
.cover :is(.glass, .glass-strong) :is(.glass, .glass-strong) { background: #fff; }
.cover .glass-live::after { display: none; }
.cover-title { font-size: clamp(24px, 3.4vh, 36px); letter-spacing: -0.035em; }
.cover-embed { border-radius: 28px; background: #fff; }
.cover .btn { box-shadow: none; border: 0; border-radius: 999px; font-weight: 700; }
.cover .btn-primary { background: #0D0D0D; color: #fff; }
.cover .btn-primary:hover { background: #2B2B2B; }
.cover .btn-line { background: #F0F0F0; color: #0D0D0D; }
.cover .btn-line:hover { background: #E6E6E6; }
.cover .empty, .embed .groups-wrap .empty { background: #F7F7F7; border: 0; border-radius: 28px; }

/* 타이머: 연회색 알약, [시작] 검정·[초기화] 흰색 */
.cover .timer { background: #F7F7F7; padding: 6px; gap: 6px; }
.cover .timer-step { background: #fff; color: #0D0D0D; }
.cover .timer-step:hover:not([disabled]) { background: #ECECEC; }
.cover .timer-num { letter-spacing: -0.03em; }
.cover .timer .btn-line { background: #fff; }
.cover .timer .btn-line:hover { background: #ECECEC; }
.cover .timer.is-done .timer-num { color: #A23B0B; }

/* 아래 탭: 연회색 알약 안, 고른 탭만 검정 */
.cover .cover-tabs { background: #F7F7F7; padding: 6px; }
.cover-tab { color: #5D5D5D; }
.cover-tab:hover { color: #0D0D0D; background: #ECECEC; }
.cover-tab.on, .cover-tab.on:hover { background: #0D0D0D; color: #fff; }
.cover-tab kbd { background: rgba(0,0,0,.07); }
.cover-tab.on kbd { background: rgba(255,255,255,.2); }
.cover-close { color: #0D0D0D; }

/* 모둠 카드: 연회색 큰 상자, 다시는 주황 테두리(글자로도 '다시') */
.cover .lg-card { border-radius: 28px; animation-duration: .4s; }
.cover .lg-card.is-returned { box-shadow: inset 0 0 0 3px var(--returned-solid); }
.cover .lg-mate figcaption { color: #5D5D5D; }
.cover .lg-quiz { background: #fff; color: #0D0D0D; }
.cover .lg-quiz.is-done { background: rgba(34,197,130,.14); color: #0F8A5F; }
.cover .lg-quiz-note { color: #5D5D5D; }

/* 게시판: 모둠 칸 연회색, 글 카드 흰색(그림자 없음) */
.cover .live-board .post-col { background: #F7F7F7; border-radius: 24px; }
.cover .post-col.is-mine { box-shadow: none; }
.cover .post { box-shadow: none; border-radius: 18px; }
.cover .col-hidden { border: 0; background: #fff; border-radius: 16px; color: #8A8A8A; }
.cover .post-act { background: #F0F0F0; }
.cover .post-act.is-del { background: var(--returned-bg); color: var(--returned-fg); }
.cover .post-link { background: #F0F0F0; color: #0D0D0D; }

/* 덮개 안 모둠 편성 */
.embed body:has(.groups-wrap) { background: #fff; }
.embed body:has(.groups-wrap) .bg { display: none; }
.embed .groups-wrap { padding: 8px 4px 40px; gap: 14px; }
.embed .groups-top h1 { font-size: 40px; letter-spacing: -0.04em; }
.embed .groups-lesson { margin: -6px 0 0; color: #8A8A8A; font-weight: 500; }
.embed .groups-wrap :is(.glass, .glass-strong) { background: #F7F7F7; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.embed .groups-wrap .glass-live::after { display: none; }
.embed .groups-panel { border-radius: 28px; padding: 26px 28px; gap: 18px; }
.embed .gcount, .embed .mode-label { color: #5D5D5D; font-weight: 500; }
.embed .gcount .input { background: #fff; border: 0; box-shadow: none; border-radius: 999px; width: 76px; }
.embed .gcount .input:focus { outline: 2px solid #0D0D0D; outline-offset: 0; }
.embed .gstats { color: #8A8A8A; }
.embed .groups-wrap .cls-tab { border: 0; background: #fff; color: #0D0D0D; min-height: 42px; }
.embed .groups-wrap .cls-tab:hover { background: #ECECEC; }
.embed .groups-wrap .cls-tab.on { background: #0D0D0D; color: #fff; }
.embed .roll { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
.embed .roll-chip { border: 0; background: #fff; border-radius: 999px; transition: transform .15s, background .15s; }
.embed .roll-chip:hover { background: #ECECEC; border-color: transparent; }
.embed .roll-chip.off { background: var(--returned-bg); color: var(--returned-fg); }
.embed .roll-chip.picking { background: #fff; box-shadow: 0 0 0 2px #0D0D0D; }
.embed .cluster-item { background: #fff; }
.embed .groups-wrap .btn, .embed .gstage .btn { box-shadow: none; border: 0; border-radius: 999px; font-weight: 700; }
.embed .groups-wrap .btn-primary, .embed .gstage .btn-primary { background: #0D0D0D; color: #fff; }
.embed .groups-wrap .btn-primary:hover, .embed .gstage .btn-primary:hover { background: #2B2B2B; }
.embed .groups-wrap .btn-line, .embed .gstage .btn-line { background: #fff; color: #0D0D0D; }
.embed .groups-wrap .btn-line:hover, .embed .gstage .btn-line:hover { background: #ECECEC; }
.embed .groups-wrap .btn-line { background: #F0F0F0; }
.embed .groups-wrap .check-note { background: #F7F7F7; border-radius: 28px; }

/* 덮개 안 편성 결과 창: 흰 바탕, 모둠 카드 연회색, 번호 흰 알약 */
.embed .gstage { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
.embed .gstage-top h2 { letter-spacing: -0.04em; }
.embed .gstage-sub { color: #8A8A8A; }
.embed .gstage .gcard { background: #F7F7F7; border: 0; box-shadow: none; border-radius: 28px; -webkit-backdrop-filter: none; backdrop-filter: none; }
.embed .gstage .gm { background: #fff; }
.embed .gstage-close { background: #F0F0F0; box-shadow: none; }
.embed .gstage-close:hover { background: #E6E6E6; }
.embed .gstage .btn-pass { background: #0F8A5F; color: #fff; }

/* ===== 교사 단독 화면 '다' 디자인 (2026-11-05, ../디자인_규칙.md)
   <html class="tch">인 교사 화면(검사·리모컨·발표·모둠 편성·수업 모드 바탕·퀴즈 쇼·설치 도우미·편집기)만.
   관리 '나'·학생 '가'와 같은 규칙: 흰 바탕(배경 원 없음), 연회색 큰 상자 #F7F7F7(28px) 안에 흰 칸,
   검정 = 누르는 것·고른 것만, 초록 = 끝남·맞음. 그림자·테두리·흐림 없음(떠 있는 창만 예외) ===== */
html.tch { --bg: #fff; --ink: #0D0D0D; --ink-2: #5D5D5D; --accent: #0D0D0D; --accent-hover: #2B2B2B; --accent-tint: #F0F0F0;
  --t-box: #F7F7F7; --t-pill: #F0F0F0; --t-line: #E3E3E3; --t-mut: #8A8A8A;
  --glass-bg: #F7F7F7; --glass-strong-bg: #F7F7F7; --shadow: none; --shadow-strong: none; --idle-bg: #ECECEC; }
html.tch body { background: #fff; -webkit-font-smoothing: antialiased; }
html.tch .bg { display: none; }
html.tch :focus-visible { outline: 3px solid rgba(13,13,13,.28); }
html.tch a:hover { color: inherit; }
html.tch :is(.glass, .glass-strong) { background: var(--t-box); border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.tch :is(.glass, .glass-strong) :is(.glass, .glass-strong) { background: #fff; }
html.tch .glass-live::after { display: none; }
html.tch .lift:hover { box-shadow: none; }
html.tch .card { border-radius: 28px; }
html.tch dialog.sheet .card, html.tch dialog .glass-strong { background: #fff; border-radius: 28px; box-shadow: 0 24px 60px -12px rgba(0,0,0,.28); }
html.tch dialog.sheet::backdrop { background: rgba(0,0,0,.32); }
html.tch .btn { font-weight: 700; border-radius: 999px; box-shadow: none; }
html.tch .btn-primary { background: #0D0D0D; color: #fff; }
html.tch .btn-primary:hover { background: #2B2B2B; color: #fff; }
html.tch .btn-line, html.tch .btn-glass { background: var(--t-pill); border: 0; color: #0D0D0D; }
html.tch .btn-line:hover, html.tch .btn-glass:hover { background: #E6E6E6; }
html.tch :is(.glass, .glass-strong) .btn-line { background: #fff; }
html.tch :is(.glass, .glass-strong) .btn-line:hover { background: #EDEDED; }
html.tch dialog :is(.glass, .glass-strong) .btn-line { background: var(--t-pill); }
html.tch .btn-danger { background: #fff; color: #A23B0B; box-shadow: inset 0 0 0 1px #F3D3CB; }
html.tch .btn-pass { background: #0F8A5F; color: #fff; }
html.tch .btn[disabled] { background: var(--t-pill); color: var(--t-mut); opacity: 1; }
html.tch .input { background: #fff; border: 1px solid var(--t-line); border-radius: 12px; }
html.tch .input:focus { outline: none; border-color: #0D0D0D; }
html.tch :is(.glass, .glass-strong) .input { border-color: transparent; }
html.tch :is(.glass, .glass-strong) .input:focus { border-color: #0D0D0D; }
html.tch .class-pick { background: var(--t-pill); border: 0; box-shadow: none; }
html.tch .class-pick:hover { background: #E6E6E6; }
html.tch .chip { background: #ECECEC; color: #3D3D3D; font-weight: 500; }
html.tch .skeleton { background: #F0F0F0; animation: none; }
html.tch .cls-tab { border: 0; background: var(--t-pill); color: #0D0D0D; border-radius: 999px; }
html.tch .cls-tab:hover { background: #E6E6E6; }
html.tch .cls-tab.on { background: #0D0D0D; color: #fff; }
/* 교사 로그인 */
html.tch .login-card { background: var(--t-box); }
html.tch .login-card h2 { font-weight: 900; letter-spacing: -0.03em; }
/* 게시물 카드(검사 화면 '게시물 보기' 창 등): 흰 창 안 연회색 카드 */
html.tch dialog .post { background: var(--t-box); box-shadow: none; border-radius: 18px; }
html.tch .post-act { background: var(--t-pill); }
html.tch .post-act.is-del { background: var(--returned-bg); color: var(--returned-fg); }
html.tch .post-link { background: var(--t-pill); color: #0D0D0D; }
html.tch .col-empty { color: var(--t-mut); }

/* 검사 (teacher/check.html) */
html.tch .check-top { padding-top: max(32px, env(safe-area-inset-top)); }
html.tch .check-top h1 { font-size: 36px; letter-spacing: -0.045em; }
html.tch .wait-badge { background: var(--pending-bg); font-weight: 700; }
html.tch .check-lesson { color: var(--t-mut); font-weight: 500; }
html.tch .check-note { border-radius: 28px; color: var(--t-mut); }
html.tch .sub-card { border-radius: 28px; padding: 22px; }
html.tch .sub-name span { color: var(--t-mut); }
html.tch .posts-go { background: #fff; color: #0D0D0D; }
html.tch .posts-go:hover { background: #EDEDED; }
html.tch .act { font-weight: 700; transition: background .2s, transform .15s; }
html.tch .act:active { transform: scale(.98); }
html.tch .act-again { background: #fff; color: var(--returned-fg); }
html.tch .act-again:hover { background: #FDF3F0; }
html.tch .act-pass { background: #0F8A5F; box-shadow: none; }
html.tch .act-pass:hover { background: #0B7A53; }
html.tch .act-send { background: #A23B0B; box-shadow: none; }
html.tch .act-cancel { background: #fff; border: 0; }
html.tch .act-cancel:hover { background: #EDEDED; }
html.tch .preset { background: #fff; border: 0; font-weight: 500; }
html.tch .preset:hover { background: #EDEDED; }
html.tch .preset[aria-pressed="true"] { background: #0D0D0D; color: #fff; }
html.tch .memo-label { color: var(--ink-2); font-weight: 500; }
html.tch .memo-in { background: #fff; border-color: transparent; }
html.tch .done-h { font-size: 13px; color: var(--t-mut); }
html.tch .done-box { border-radius: 28px; padding: 6px 20px; }
html.tch .done-row { border-bottom-color: #E8E8E8; }
html.tch .check-bottom { background: linear-gradient(rgba(255,255,255,0), #fff 40%); }
html.tch .reveal-open { background: #0D0D0D; box-shadow: none; font-weight: 700; }
html.tch .reveal-open:hover { background: #2B2B2B; }
html.tch .check-admin { color: var(--t-mut); }

/* 휴대폰 리모컨 (teacher/remote.html) */
html.tch .rm-top h1 { font-size: 36px; letter-spacing: -0.045em; }
html.tch .rm-conn { font-weight: 500; }
html.tch .rm-title { color: var(--t-mut); font-weight: 500; }
html.tch .rm-off { border-radius: 28px; color: var(--t-mut); }
html.tch .rm-stat { border-radius: 20px; padding: 12px 14px; }
html.tch .rm-stat small { color: var(--t-mut); font-weight: 500; }
html.tch .rm-card { border-radius: 28px; padding: 22px; }
html.tch .rm-card h2 { font-size: 13px; font-weight: 700; color: var(--t-mut); letter-spacing: 0; }
html.tch .rm-sub { color: var(--ink-2); }
html.tch .rm-big { font-weight: 700; }
html.tch .rm-big:disabled, html.tch .rm-app .btn:disabled { opacity: 1; background: var(--t-pill); color: var(--t-mut); }
html.tch .rm-app kbd { border: 0; background: rgba(127,127,127,.18); opacity: 1; font-weight: 500; }
html.tch .rm-time { font-weight: 900; letter-spacing: -0.04em; }
html.tch #timer.is-done .rm-time { color: #A23B0B; }
html.tch .rm-first .chip { background: #fff; }
html.tch .rm-away-list li { background: #fff; }
html.tch .rm-away-list small { color: var(--t-mut); }
html.tch .rm-away-list li.is-now { background: var(--returned-bg); }

/* 순위 발표 (teacher/reveal.html, 수업 모드 덮개 [순위 발표] 탭): 흰 무대, 시상대 연회색, 순위 색(금·은·동)은 시상대 숫자·카드 테두리에만 */
html.tch .ready-chip { background: var(--t-pill); color: var(--ink-2); font-weight: 500; }
html.tch .ready-title { letter-spacing: -0.05em; }
html.tch .ready-info { color: var(--t-mut); }
html.tch .ready-start { font-weight: 700; }
html.tch .ready-cls { border-radius: 24px; }
html.tch .ready-cls:hover { background: #ECECEC; transform: none; }
html.tch .stage { color: #0D0D0D; }
html.tch .stage-dim { background: #fff; }
html.tch .stage-label { background: var(--t-pill); border: 0; color: var(--ink-2); font-weight: 500; }
html.tch .pts { background: var(--t-pill); border: 0; color: #0D0D0D; font-weight: 700; }
html.tch .crown { filter: none; }
html.tch .face.back { background: var(--t-box); border: 0; box-shadow: none; }
html.tch .face.back span { color: #CFCFCF; }
html.tch .face.front { background: #fff; border: 0; box-shadow: inset 0 0 0 4px var(--ring); }
html.tch .face.front span { color: var(--t-mut); font-weight: 500; }
html.tch .block { background: var(--t-box); border: 0; box-shadow: none; border-radius: 28px 28px 14px 14px; }
html.tch .slot.is-open[data-rank="1"] .block::after { background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.85) 50%, transparent 80%); }
html.tch .rays-spin { background: repeating-conic-gradient(from 0deg, rgba(242,183,5,.18) 0deg 8deg, transparent 8deg 22deg); }
html.tch .rest li { background: var(--t-box); border: 0; }
html.tch .rest .r, html.tch .rest .muted-d { color: var(--t-mut); }
html.tch .stage-btn { background: var(--t-pill); border: 0; color: #0D0D0D; }
html.tch .stage-btn:hover { background: #E6E6E6; }
html.tch .stage-next { background: #0D0D0D; color: #fff; }
html.tch .stage-next:hover { background: #2B2B2B; }

/* 모둠 편성 (teacher/groups.html를 따로 열 때): 덮개 안(.embed)과 같은 모양 */
html.tch body:has(.groups-wrap) .bg { display: none; }
html.tch .groups-top h1 { font-size: 40px; letter-spacing: -0.04em; }
html.tch .groups-lesson { margin: -6px 0 0; color: #8A8A8A; font-weight: 500; }
html.tch .groups-wrap :is(.glass, .glass-strong) { background: #F7F7F7; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.tch .groups-wrap .glass-live::after { display: none; }
html.tch .groups-panel { border-radius: 28px; padding: 26px 28px; gap: 18px; }
html.tch .gcount, html.tch .mode-label { color: #5D5D5D; font-weight: 500; }
html.tch .gcount .input { background: #fff; border: 0; box-shadow: none; border-radius: 999px; width: 76px; }
html.tch .gcount .input:focus { outline: 2px solid #0D0D0D; outline-offset: 0; }
html.tch .gstats { color: #8A8A8A; }
html.tch .groups-wrap .cls-tab { border: 0; background: #fff; color: #0D0D0D; min-height: 42px; }
html.tch .groups-wrap .cls-tab:hover { background: #ECECEC; }
html.tch .groups-wrap .cls-tab.on { background: #0D0D0D; color: #fff; }
html.tch .roll { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
html.tch .roll-chip { border: 0; background: #fff; border-radius: 999px; transition: transform .15s, background .15s; }
html.tch .roll-chip:hover { background: #ECECEC; border-color: transparent; }
html.tch .roll-chip.off { background: var(--returned-bg); color: var(--returned-fg); }
html.tch .roll-chip.picking { background: #fff; box-shadow: 0 0 0 2px #0D0D0D; }
html.tch .cluster-item { background: #fff; }
html.tch .groups-wrap .btn, html.tch .gstage .btn { box-shadow: none; border: 0; border-radius: 999px; font-weight: 700; }
html.tch .groups-wrap .btn-primary, html.tch .gstage .btn-primary { background: #0D0D0D; color: #fff; }
html.tch .groups-wrap .btn-primary:hover, html.tch .gstage .btn-primary:hover { background: #2B2B2B; }
html.tch .groups-wrap .btn-line, html.tch .gstage .btn-line { background: #fff; color: #0D0D0D; }
html.tch .groups-wrap .btn-line:hover, html.tch .gstage .btn-line:hover { background: #ECECEC; }
html.tch .groups-wrap .btn-line { background: #F0F0F0; }
html.tch .groups-wrap .check-note { background: #F7F7F7; border-radius: 28px; }
html.tch .gstage { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.tch .gstage-top h2 { letter-spacing: -0.04em; }
html.tch .gstage-sub { color: #8A8A8A; }
html.tch .gstage .gcard { background: #F7F7F7; border: 0; box-shadow: none; border-radius: 28px; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.tch .gstage .gm { background: #fff; }
html.tch .gstage-close { background: #F0F0F0; box-shadow: none; }
html.tch .gstage-close:hover { background: #E6E6E6; }
html.tch .gstage .btn-pass { background: #0F8A5F; color: #fff; }
html.tch .groups-top .cls-tab { background: var(--t-pill); }
html.tch .groups-top .cls-tab:hover { background: #E6E6E6; }
html.tch .groups-top .cls-tab.on { background: #0D0D0D; color: #fff; }
html.tch .roll-chip.tied, .embed .roll-chip.tied { background: var(--c); color: #fff; }
html.tch .gstage .btn-line, .embed .gstage .btn-line { background: var(--t-pill, #F0F0F0); }
html.tch .gstage .btn-line:hover, .embed .gstage .btn-line:hover { background: #E6E6E6; }

/* 수업 모드 바탕 (teacher/live.html): 빈 안내·끼운 화면·구석 단추 */
html.tch .empty { background: var(--t-box); border: 0; border-radius: 28px; color: var(--t-mut); }
html.tch .empty strong { font-weight: 700; }
html.tch .cover-embed { background: #fff; border-radius: 28px; }
html.tch .live-corner .btn { box-shadow: 0 0 0 1px #ECECEC; }

/* 퀴즈 쇼 프로젝터 (teacher/quizshow.html, 수업 모드 [퀴즈 쇼] 탭): 흰 바탕, 상자 연회색, 그림자 없음.
   보기 색 6가지(.qs-c0~5)는 보기를 가르는 색이라 그대로 */
html.tch .qsh-chip { background: var(--t-pill); color: #0D0D0D; font-weight: 700; }
html.tch .qsh-progress, html.tch .qsh-hint { color: var(--t-mut); font-weight: 500; }
html.tch .qsh-set { border-radius: 24px; }
html.tch .qsh-set:hover { background: #ECECEC; transform: none; }
html.tch .qsh-set-go { color: var(--ink-2); }
html.tch .qsh-join { border-radius: 28px; }
html.tch .qsh-join span { color: var(--t-mut); font-weight: 500; }
html.tch .qsh-join b { color: #0D0D0D; }
html.tch :is(.qsh-p, .qsh-word) { background: var(--t-box); box-shadow: none; }
html.tch .qsh-team-col { background: var(--t-box); border-radius: 22px; }
html.tch .qsh-team-col .qsh-p { background: #fff; }
html.tch .qsh-q { background: var(--t-box); box-shadow: none; border-radius: 28px; }
html.tch .qsh-type { color: var(--t-mut); font-weight: 500; }
html.tch .qsh-clock { background: var(--t-box); box-shadow: none; }
html.tch .qsh-clock small { color: var(--t-mut); font-weight: 500; }
html.tch .qsh-bar { background: #ECECEC; }
html.tch .qs-opt { box-shadow: none; border-radius: 20px; }
html.tch .qsh-rank li { background: var(--t-box); box-shadow: none; border-radius: 20px; }
html.tch .qsh-rk { color: var(--t-mut); }
html.tch .qsh-pod-block { border-radius: 24px 24px 0 0; }
html.tch .qsh-foot kbd { border: 0; background: rgba(127,127,127,.22); opacity: 1; }
html.tch .qsh-bar i { background: #8A8A8A; }

/* 퀴즈 쇼 만들기 (teacher/quizshow-edit.html): 세트 목록은 연회색 큰 상자, 편집은 왼쪽 목록·가운데 연회색 바탕 위 흰 칸·오른쪽 속성.
   고른 문제·고른 방식은 검정. 보기 색(--qc)은 그대로 */
html.tch .qse-body { --nd-ink: #0D0D0D; --nd-ink2: #5D5D5D; --nd-ink3: #8A8A8A; --nd-line: #ECECEC; --nd-hover: #F0F0F0; }
html.tch .qse-body .icon-btn { background: var(--t-pill); border: 0; }
html.tch .qse-body .icon-btn:hover { background: #E6E6E6; }
html.tch .qse-list-wrap { max-width: 960px; padding-top: 44px; }
html.tch .qse-list-top h1 { font-size: 40px; letter-spacing: -0.045em; }
html.tch .qse-sets { border-top: 0; background: var(--t-box); border-radius: 28px; padding: 10px 24px; }
html.tch .qse-sets:empty { display: none; }
html.tch .qse-set { border-bottom-color: #E8E8E8; padding: 10px 0; }
html.tch .qse-set:last-child { border-bottom: 0; }
html.tch .qse-set:hover { background: transparent; }
html.tch .qse-set-main span { color: var(--t-mut); }
html.tch .qse-side { background: var(--t-box); border-right: 0; }
html.tch .qse-items { padding: 12px 10px; }
html.tch .qse-item { border-radius: 16px; }
html.tch .qse-item-main { border-radius: 16px; }
html.tch .qse-item:not(.on) .qse-item-main:hover { background: #ECECEC; }
html.tch .qse-item.on { background: #0D0D0D; color: #fff; }
html.tch .qse-item.on :is(.qse-item-no, .qse-item-body small) { color: rgba(255,255,255,.7); }
html.tch .qse-item.is-over { box-shadow: inset 0 3px 0 #0D0D0D; }
html.tch .qse-mini { box-shadow: none; border-radius: 999px; }
html.tch .qse-mini:hover { background: #ECECEC; }
html.tch .qse-side-btns { border-top: 0; padding: 12px; }
html.tch .qse-main { background: #fff; padding: 26px; }
html.tch .qse-card { background: var(--t-box); border-radius: 28px; padding: 28px; }
html.tch .qse-q { border-color: transparent; border-radius: 18px; }
html.tch .qse-media { border: 2px dashed #E0E0E0; border-radius: 20px; }
html.tch .qse-media.is-over { border-color: #0D0D0D; background: #F0F0F0; }
html.tch .qse-media.has-img { border: 0; }
html.tch .qse-opt { border-radius: 18px; }
html.tch .qse-opt-in:focus { outline: 2px solid #0D0D0D; border-radius: 8px; }
html.tch .qse-ok { border-color: #D6D6D6; }
html.tch :is(.qse-answers, .qse-puzzle, .qse-slider, .qse-pin-r) { border-radius: 20px; }
html.tch .qse-pz-row { background: var(--t-box); }
html.tch .qse-props { border-left: 0; }
html.tch .qse-props-h { font-size: 13px; color: var(--t-mut); }
html.tch .qse-types { gap: 10px; }
html.tch .qse-type { border: 0; background: var(--t-box); border-radius: 20px; }
html.tch .qse-type:hover { background: #ECECEC; }
html.tch .qse-type span { color: var(--t-mut); }
html.tch .qse-seg { background: var(--t-pill); }
html.tch .qse-seg-b { color: var(--ink-2); }
html.tch .qse-seg-b.on { background: #0D0D0D; color: #fff; box-shadow: none; }
html.tch .qse-class { border-radius: 999px; }
html.tch .qse-body .nd-views { border-bottom: 0; gap: 4px; }
html.tch .qse-body .nd-views .nd-view { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--t-pill); color: var(--ink-2); }
html.tch .qse-body .nd-views .nd-view.on { background: #0D0D0D; color: #fff; }
html.tch .qse-side .btn-line { background: #fff; } html.tch .qse-side .btn-line:hover { background: #EDEDED; }


/* ---------- 입구: 학번으로 첫 가입 (다른 선생님 사이트만, 2026-11-10) ---------- */
.first-row { display: flex; gap: 10px; flex-wrap: wrap; }
.first-row .btn { min-height: 48px; }
.su-who { display: block; min-height: 1.4em; margin-top: 6px; font-size: 16px; font-weight: 900; color: #0D0D0D; }
.su-who.bad { color: #A23B0B; }
.su-note { margin: 0; font-size: 14px; color: var(--ink-2); }
.signed-box { align-items: center; text-align: center; }
.sd-label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.sd-code { font-size: 56px; font-weight: 900; letter-spacing: .12em; line-height: 1.1; }
#install-dlg ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
.signup-box { margin-top: 18px; padding: 18px 20px; border-radius: 22px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.signup-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.signup-head .btn { margin-left: auto; }
