/* 학생 화면: 선생님이 꺼 둔 게임(game-switch.js·game-plaza.js·gate-hub.js)과 서술형 고쳐 쓰고 시작하기 창(writing-gate.js). 2026-11-19 */

/* ---------- 꺼 둔 게임 ---------- */
.gh-card.is-closed .gh-card-pic img, .gp-card.is-closed .gp-pic img, .gh-tile.is-closed .gh-tile-pic img { filter: grayscale(1); opacity: .5; }
.gh-card.is-closed .gh-card-name, .gp-card.is-closed .gp-name, .gh-tile.is-closed .gh-tile-name { color: #64748b; }
.gh-card-go.is-closed, .gp-go.is-closed { background: #e2e8f0 !important; border-color: #e2e8f0 !important; color: #64748b !important; box-shadow: none !important; cursor: not-allowed; }
button.gh-tile.is-closed:disabled { cursor: not-allowed; opacity: 1; }

/* 단원평가를 꺼 두면 학생 화면의 단원평가 구역 자리에 한 줄만 남긴다 */
html[data-gs-assess="closed"] #assessments > *, html[data-gs-assess="closed"] #assessNext, html[data-gs-assess="closed"] #assessmentShortcut { display: none !important; }
html[data-gs-assess="closed"] #assessments::before { content: '선생님이 지금은 단원평가를 닫아 두었어요'; display: block; margin: 12px 0; padding: 32px 16px; border: 1px dashed #cbd5e1; border-radius: 16px; background: #f8fafc; color: #475569; font-size: 17px; font-weight: 700; text-align: center; }

/* ---------- 서술형 고쳐 쓰고 시작하기 ---------- */
html.wg-open { overflow: hidden; }
.wg { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .72); overflow: auto; }
.wg-box { width: min(640px, 100%); padding: 24px 24px 20px; border-radius: 20px; background: #fff; color: #1e1b4b; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); }
.wg-title { margin: 0 0 6px; font-size: 24px; line-height: 1.3; text-wrap: balance; word-break: keep-all; }
.wg-lead { margin: 0 0 16px; color: #475569; font-size: 16px; line-height: 1.55; text-wrap: balance; word-break: keep-all; }
.wg-list { display: grid; gap: 10px; }
.wg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid #e2e5f1; border-radius: 14px; background: #f8fafc; }
.wg-text { display: grid; gap: 2px; min-width: 0; }
.wg-unit { color: #4338ca; font-size: 13px; font-weight: 800; }
.wg-topic { font-size: 17px; line-height: 1.4; text-wrap: balance; word-break: keep-all; }
.wg-try { color: #b45309; font-size: 13px; font-weight: 700; text-wrap: pretty; word-break: keep-all; }
.wg-score { display: flex; align-items: baseline; gap: 2px; color: #b91c1c; white-space: nowrap; }
.wg-score b { font-size: 26px; font-variant-numeric: tabular-nums; }
.wg-score span { font-size: 14px; font-weight: 700; }
.wg-go { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 18px; border-radius: 12px; background: #4338ca; color: #fff; font-size: 16px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.wg-go:hover, .wg-go:focus-visible { background: #3730a3; outline: 3px solid #a5b4fc; outline-offset: 2px; }
/* 2026-11-20 닫기(✕·다음에 할게요) */
.wg-box { position: relative; }
.wg-title { padding-right: 48px; }
.wg-x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #eef2ff; color: #312e81; font-size: 20px; font-weight: 800; cursor: pointer; }
.wg-x:hover { filter: brightness(.95); }
.wg-x:focus-visible, .wg-later:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; }
.wg-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
.wg-later { min-height: 44px; padding: 8px 16px; border: 1px solid #c7d2fe; border-radius: 12px; background: #fff; color: #3730a3; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
@media (max-width: 520px) {
  .wg-box { padding: 18px 16px 16px; }
  .wg-title { font-size: 20px; }
  .wg-row { grid-template-columns: minmax(0, 1fr) auto; }
  .wg-go { grid-column: 1 / -1; justify-content: center; }
}
