/* 선생님 「게임 관리」 탭 (2026-11-19): 게임 켜고 끄기·서술형 고쳐 쓰고 시작 카드(game-admin.js)와 학생별 게임 시간 표(teacher.html drawPlayTable).
   카드 틀은 오늘 할 것(today-admin.css .ta)을 그대로 쓰고, 표는 한눈에 보기 표(teacher-simple.css .learning-table)와 같은 값을 쓴다. */
#gmWrap { display: block; }
#gmWrap .ta { margin: 0 0 12px; }

/* ---------- 스위치 ---------- */
.ga-sw { position: relative; flex: none; display: inline-block; width: 36px; height: 20px; border-radius: 999px; background: #cbd5e1; transition: background .15s; }
.ga-knob { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .3); transition: left .15s; }
.ga-sw.is-on { background: #22c55e; }
.ga-sw.is-on .ga-knob { left: 19px; }
.ga-sw.is-mixed { background: #f59e0b; }
.ga-sw.is-mixed .ga-knob { left: 11px; }

/* ---------- 게임 켜고 끄기 ---------- */
.ga .ta-head { flex-wrap: wrap; }
.ga-all { display: flex; gap: 8px; margin-left: auto; }
.ga-all .ta-reset { min-height: 36px; padding: 4px 14px; }
.ga-all .ta-reset:disabled { opacity: .45; cursor: default; }
.ga-row { grid-template-columns: 132px minmax(0, 1fr); }
.ga-group { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 8px; padding: 6px 8px; border: 1px solid transparent; border-radius: 10px; background: none; font: inherit; text-align: left; cursor: pointer; }
.ga-group:hover, .ga-group:focus-visible { border-color: #c7d2fe; background: #f5f6ff; outline: none; }
.ga-group .ta-row-title { grid-column: 1 / -1; padding-top: 0; white-space: nowrap; }
.ga-count { color: #64748b; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ga-game { padding-right: 10px; }
.ga-game .ga-sw { margin-left: 2px; }
.ga-game:hover, .ga-game:focus-visible { border-color: #818cf8; outline: none; }
.ga-game.is-closed { border-style: dashed; background: #f8fafc; color: #94a3b8; }
.ga-game.is-closed img { filter: grayscale(1); opacity: .45; }

/* 2026-11-24 늘 열림 목록과 학습 게임 줄(묶음 스위치 없앰) */
.ga .ga-row { grid-template-columns: 168px minmax(0, 1fr); }
.ga-row-head { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.ga-row-head .ta-row-title { padding-top: 0; text-wrap: balance; word-break: keep-all; }
.ga-fixed { cursor: default; padding-right: 12px; border-color: #bbf7d0; background: #f0fdf4; }
.ga-fixed-row { background: #fbfefc; }
.ga-all .ta-reset { white-space: nowrap; }

/* ---------- 서술형 고쳐 쓰고 시작 ---------- */
.ga-gate { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 8px; border-top: 1px solid #f1f5f9; }
.ga-one { display: inline-flex; grid-template-columns: none; }
.ga-one:disabled, .ga-seg-btn:disabled { opacity: .6; cursor: wait; }
.ga-state { min-width: 2.4em; font-size: 14px; font-weight: 800; color: #1e1b4b; }
.ga-seg { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; }
.ga-seg-btn { min-height: 36px; padding: 4px 14px; border: 0; border-left: 1px solid #cbd5e1; background: #fff; color: #334155; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ga-seg-btn:first-child { border-left: 0; }
.ga-seg-btn.is-on { background: #4338ca; color: #fff; }
.ga-desc { flex: 1 1 100%; margin: 0; color: #475569; font-size: 13px; line-height: 1.5; text-wrap: pretty; word-break: keep-all; }

/* ---------- 학생별 게임 시간 ---------- */
.pt-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.pt-head h2 { margin: 0; font-size: 17px; color: var(--ink); }
.pt-n { padding: 2px 10px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 700; }
.pt-head .tl-info-tip { margin-left: 0; }
.pt-head .sp { flex: 1; }
.pt-pick { display: inline-flex; align-items: center; gap: 8px; color: #475569; font-size: 14px; font-weight: 700; }
.pt-pick select { min-height: 36px; padding: 4px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font: inherit; font-weight: 500; }
#view .pt-scroll { max-height: calc(100vh - 150px); min-height: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
#view .pt-table { min-width: 860px; font-size: 14px; border: 0; border-radius: 0; box-shadow: none; }
#view .pt-table thead th { padding: 6px 8px; font-size: 14px; line-height: 1.35; background: #f6f7fb; }
#view .pt-table thead th small { font-size: 12.5px; white-space: nowrap; }
#view .pt-table .th-txt { text-wrap: balance; word-break: keep-all; }
#view .pt-table thead .th-sort { gap: 4px; padding-left: 4px; padding-right: 4px; }
#view .pt-table tbody td { padding: 6px 8px; line-height: 1.4; border-bottom: 1px solid #edf0f5; font-variant-numeric: tabular-nums; white-space: nowrap; }
#view .pt-table tbody tr:nth-child(even) td { background: #fafbfe; }
#view .pt-table tbody tr:hover td { background: #f3f5ff; }
#view .pt-table th:nth-child(1) { width: 64px; }
#view .pt-table th:nth-child(2) { width: 72px; }
#view .pt-table th:nth-child(3) { width: 168px; }
#view .pt-table th:nth-child(4), #view .pt-table th:nth-child(5) { width: 96px; }
#view .pt-table th:nth-child(7) { width: 116px; }
#view .pt-table th:nth-child(8) { width: 132px; }
#view .pt-table td.pt-games { white-space: normal; }
.pt-g { display: inline-flex; align-items: baseline; gap: 5px; margin: 2px 6px 2px 0; padding: 1px 9px; border-radius: 999px; background: #f1f5f9; color: #334155; font-size: 12.5px; white-space: nowrap; }
.pt-g b { font-weight: 700; }
.pt-g.is-today { background: #dcfce7; color: #166534; }
.pt-today { color: #15803d; }
#view .pt-table .pt-last { color: var(--mute); font-size: 13px; }
#view .pt-table .pt-last small { display: block; font-size: 12.5px; }

@media (max-width: 600px) {
  .ga-row, .ga .ga-row { grid-template-columns: 1fr; }
  .ga-all { margin-left: 0; flex-wrap: wrap; }
  .ga-group { grid-template-columns: auto auto 1fr; }
  .ga-group .ta-row-title { grid-column: auto; }
}

/* 2026-11-26 1만 별 뽑기 학생 게임 카드 */
.gv-list { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 4px; }
.gv-who { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 10px; border: 1px solid #fde68a; border-radius: 999px; background: #fffbeb; font-size: 13px; word-break: keep-all; }
.gv-who b { font-weight: 800; color: #92400e; }
.gv-who small { color: #a16207; }
