/* U223: the lesson word page and the shared word games (static/js/wordgame.js). One filled navy button a screen (the page: none; a game: 확인 / 다음; the result: one). Red and green only for
   right and wrong. Every control is at least 44px. */
.wg-page { max-width: 720px; }
.wg-noscript { padding: 12px 14px; background: var(--bg-2); border-radius: 8px; font-size: 14px; }
.wg-sets { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.wg-set { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 16px; }
.wg-set h2 { margin: 0 0 6px; font-size: 17px; font-weight: 800; }
.wg-set__done { font-size: 13px; font-weight: 700; color: var(--navy); }
.wg-set__words { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.6; overflow-wrap: anywhere; }
.wg-set__games { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wg-g { min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 4px 8px; border: 1px solid #D9DCE3; border-radius: 10px; background: #fff; color: var(--navy-deep); font-weight: 800; font-size: 14.5px; }
.wg-g:hover { text-decoration: none; border-color: var(--navy); }
.wg-g.is-done { background: #F1F3F6; border-color: #B9C0CC; }
.wg-list-sec { margin-top: 34px; }
.wg-list-sec h2 { margin: 0 0 10px; font-size: 19px; font-weight: 800; }
.wg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.wg-chips button { min-height: 44px; padding: 0 16px; border: 1px solid #D9DCE3; border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.wg-chips button[aria-pressed="true"] { border-color: var(--navy-deep); box-shadow: inset 0 0 0 1px var(--navy-deep); color: var(--navy-deep); background: #EEF2F9; }
.wg-list { list-style: none; margin: 0; padding: 0; }
.wg-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.wg-w { display: flex; align-items: center; gap: 10px; }
.wg-w b { font-size: 19px; overflow-wrap: anywhere; }
.wg-w small { font-size: 12.5px; color: var(--ink-2); }
.wg-say { margin-left: auto; flex: 0 0 44px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy-deep); cursor: pointer; }
.wg-say[hidden] { display: none; }
.wg-ko { margin: 4px 0 6px; font-size: 16px; }
.wg-ex { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--ink-2); }
.wg-ex b { color: var(--navy); }
.wg-cell { position: relative; display: inline-block; }
.wg-hidebtn { display: none; position: absolute; inset: -4px -6px; min-width: 72px; min-height: 28px; border: 0; border-radius: 6px; background: #E9ECF2; cursor: pointer; }
.wg-hidebtn::after { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
.wg-list[data-hide="ko"] li:not(.is-shown) .wg-cell--ko .wg-hidebtn, .wg-list[data-hide="en"] li:not(.is-shown) .wg-cell--en .wg-hidebtn,
.wg-list[data-hide="en"] li:not(.is-shown) .wg-cell--exen .wg-hidebtn { display: block; }
.wg-list[data-hide="ko"] li:not(.is-shown) .wg-cell--ko > span, .wg-list[data-hide="en"] li:not(.is-shown) .wg-cell--en > b { visibility: hidden; }
.wg-list[data-hide="en"] li:not(.is-shown) .wg-say { visibility: hidden; }
.wg-note { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
/* the card on the lesson page (W0): an outline card, 24px or more under the buttons */
.wg-entry { display: flex; align-items: center; gap: 12px; max-width: 560px; min-height: 64px; padding: 12px 16px; border: 1px solid #D9DCE3; border-radius: 14px; background: #fff; color: var(--ink); margin-bottom: 28px; }
.wg-entry:hover { text-decoration: none; border-color: var(--navy); }
.wg-entry b { display: block; font-size: 16px; font-weight: 800; color: var(--navy-deep); }
.wg-entry small { display: block; font-size: 13px; color: var(--ink-2); }
.wg-entry i { margin-left: auto; font-style: normal; color: var(--ink-2); }

/* ---- the game screen: covers the page ---- */
html body.wg-open { overflow: hidden; }
.wg-play { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: #fff; overflow-y: auto; overscroll-behavior: contain; }
.wg-play[hidden] { display: none; }
.wg-play > * { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; box-sizing: border-box; padding-left: 20px; padding-right: 20px; }
.wg-top { display: flex; align-items: center; gap: 8px; padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.wg-x { flex: 0 0 44px; width: 44px; height: 44px; margin-left: -10px; border: 0; background: transparent; font-size: 18px; color: var(--ink); cursor: pointer; }
.wg-title { margin: 0; font-size: 17px; font-weight: 800; outline: none; }
.wg-sub { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.wg-prog { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; font-size: 13px; color: var(--ink-2); }
.wg-prog__bar { height: 4px; border-radius: 2px; background: #E5E8EB; overflow: hidden; }
.wg-prog__bar i { display: block; height: 100%; width: 0; background: var(--navy); }
.wg-stage { flex: 1 0 auto; padding-top: 12px; padding-bottom: 20px; }
.wg-foot { position: sticky; bottom: 0; display: flex; gap: 10px; padding-top: 12px; padding-bottom: 16px; border-top: 1px solid var(--line); background: #fff; }
.wg-foot[hidden] { display: none; }
.wg-btn { flex: 1 1 0; min-height: 52px; border-radius: 12px; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.wg-btn--p { border: 1px solid var(--navy-deep); background: var(--navy-deep); color: #fff; }
.wg-btn--o { border: 1px solid #D9DCE3; background: #fff; color: var(--ink); }
.wg-btn:disabled { opacity: .45; cursor: default; }
.wg-help { margin: 8px 0 12px; font-size: 14.5px; color: var(--ink-2); }
.wg-chances { margin: 0; text-align: right; font-size: 13px; font-weight: 700; color: var(--navy); }
.wg-match { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.wg-col { display: flex; flex-direction: column; gap: 10px; }
.wg-tile { min-height: 52px; padding: 8px 10px; border: 1px solid #D9DCE3; border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; overflow-wrap: anywhere; }
.wg-tile.is-on { border: 2px solid var(--navy); background: #EEF2F9; }
.wg-tile.is-ok { border-color: #1B6B33; background: #EAF6EE; color: #1B6B33; }
.wg-tile.is-no { border-color: #B42318; background: #FDECEA; color: #B42318; }
.wg-tile.is-shown { border-style: dashed; color: var(--ink-2); }
.wg-tile:disabled { cursor: default; }
.wg-sentence { padding: 16px; border-radius: 14px; background: #F4F6FA; }
.wg-sentence__en { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.6; }
.wg-sentence__ko { margin: 8px 0 0; font-size: 14.5px; color: var(--ink-2); }
.wg-blank { display: inline-block; min-width: 96px; border-bottom: 3px solid var(--navy); text-align: center; }
.wg-blank.is-filled { color: var(--navy); }
.wg-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.wg-q { text-align: center; margin: 6px 0 14px; }
.wg-q__pos { display: block; font-size: 13px; color: var(--ink-2); }
.wg-q__ko { display: block; font-size: 24px; font-weight: 800; }
.wg-q__w { display: block; font-size: 34px; line-height: 1.35; font-weight: 800; overflow-wrap: anywhere; }
.wg-q__sub { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.wg-time { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.wg-time__bar { flex: 1 1 auto; height: 5px; border-radius: 3px; background: #E5E8EB; overflow: hidden; }
.wg-time__bar i { display: block; height: 100%; background: var(--navy); }
.wg-slots, .wg-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.wg-slot { min-width: 56px; min-height: 48px; padding: 0 10px; border: 2px dashed #B9C0CC; border-radius: 10px; background: #fff; font: inherit; font-size: 18px; font-weight: 800; color: var(--ink); cursor: pointer; }
.wg-slot.is-filled { border: 2px solid var(--navy); background: #EEF2F9; }
.wg-slots.is-ok .wg-slot { border-color: #1B6B33; background: #EAF6EE; }
.wg-slots.is-no .wg-slot { border-color: #B42318; background: #FDECEA; }
.wg-tray { margin-top: 18px; }
.wg-piece { min-width: 52px; min-height: 48px; padding: 0 12px; border: 1px solid #D9DCE3; border-bottom-width: 3px; border-radius: 10px; background: #fff; font: inherit; font-size: 18px; font-weight: 800; color: var(--ink); cursor: pointer; }
.wg-piece.is-used { opacity: .3; }
.wg-letters { text-align: center; font-size: 22px; letter-spacing: 1px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.wg-input { width: 100%; box-sizing: border-box; min-height: 56px; padding: 0 16px; border: 2px solid var(--navy); border-radius: 12px; font: inherit; font-size: 22px; font-weight: 800; }
.wg-tools { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; }
.wg-link { min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--navy); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.wg-link:disabled { opacity: .45; cursor: default; }
.wg-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wg-fb { margin-top: 16px; padding: 14px 16px; border-radius: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; line-height: 1.6; }
.wg-fb--ok { background: #EAF6EE; color: #1B6B33; }
.wg-fb--no { background: #FDECEA; color: #9B1C12; }
.wg-diff { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.wg-diff u { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: #B42318; }
.wg-result { text-align: center; }
.wg-result__h { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); }
.wg-result__score { margin: 4px 0 8px; }
.wg-result__score b { font-size: 48px; font-weight: 900; color: var(--navy-deep); }
.wg-result__score span { font-size: 20px; color: var(--ink-2); }
.wg-exp { display: inline-block; margin: 0 0 4px; padding: 6px 14px; border-radius: 999px; background: #FFF6D6; color: #6B4E00; font-weight: 800; font-size: 14px; }
.wg-exp__login { margin: 2px 0 0; font-size: 13.5px; }
.wg-exp__login a { display: inline-block; min-height: 44px; line-height: 44px; color: var(--ink-2); text-decoration: underline; }
.wg-review { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.wg-review h3 { margin: 0; padding: 10px 14px; font-size: 14px; border-bottom: 1px solid var(--line); }
.wg-review ul { list-style: none; margin: 0; padding: 0; }
.wg-review li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.wg-review li:last-child { border-bottom: 0; }
.wg-review span { color: var(--ink-2); text-align: right; }
.wg-more { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.wg-next { min-height: 56px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; }
.wg-next b { font-size: 15px; color: var(--navy-deep); }
.wg-next span { font-size: 12.5px; color: var(--ink-2); }
/* U240: the word quest inside the play screen: the three steps, the result */
.wq-steps { display: flex; gap: 6px; list-style: none; margin-top: 10px; margin-bottom: 0; }
.wq-steps[hidden] { display: none; }
.wq-steps li { flex: 1 1 0; min-width: 0; padding: 7px 4px; border-radius: 8px; background: #F7F8FA; color: #4B515C; text-align: center; font-size: 13px; font-weight: 800; }
.wq-steps li.is-ok { background: #E7F5EC; color: #1E7B4A; }
.wq-steps li.is-cur { background: #0E5A8A; color: #fff; }
.wg-prog[hidden] { display: none; }
.wq-big { margin: 6px 0 0; }
.wq-big b { font-size: 48px; font-weight: 900; color: #1F2329; }
.wq-big span { font-size: 20px; color: #4B515C; }
.wq-cells { display: flex; gap: 8px; list-style: none; margin: 12px 0; padding: 0; }
.wq-cells li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; padding: 10px 4px; border: 1px solid #E6E8EC; border-radius: 10px; font-size: 12.5px; color: #4B515C; }
.wq-cells b { font-size: 18px; color: #1F2329; }
.wq-msg { margin: 10px 0; padding: 12px; border-radius: 10px; background: #F7F8FA; color: #1F2329; text-align: left; font-size: 14.5px; font-weight: 700; line-height: 1.6; }
.wq-msg--ok { background: #E7F5EC; color: #1E7B4A; }
.wq-unlock { margin: 10px 0; padding: 11px 12px; border-radius: 10px; background: #FFF8CC; text-align: left; font-size: 14.5px; font-weight: 700; }
.wq-noexp { margin: 6px 0; font-size: 13.5px; color: #4B515C; }
.wg-back { display: block; margin: 10px auto 0; }
.wq-intro { margin: 6px 0 0; font-size: 15.5px; line-height: 1.7; color: #1F2329; }
.wq-meanings { grid-template-columns: 1fr; }
@media (max-width: 480px) {
  .wg-match { gap: 14px; }
}
