/* Giao diện riêng của lớp 4 (tiền tố g4, tái dùng các lớp chung trong style.css). */
.g4 .k-char { background: #f3dcff; color: #5a2a7a; }
.g4 .k-infer { background: #ffe9c7; color: #7a4a0c; }
.g4 .k-msg { background: #fff2a8; color: #6b5300; }
.g4 .k-gist { background: #dcf0ff; color: #1d4f7a; }
.g4 .k-fact { background: #dcf5e8; color: #155c3e; }
.g4 .k-vocab { background: #ffe0e6; color: #7a1d36; }
.g4 .k-lang { background: #e3e3ff; color: #2e2e86; }
.g4 .k-write { background: #ffe7d4; color: #7a3b0c; }
.g4-textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.15rem; line-height: 1.5; padding: 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; margin: 8px 0 12px; }
.g4-textarea:focus { outline: none; border-color: var(--accent); }
.g4-words { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.g4 [hidden] { display: none !important; }
.g4 .ptext { white-space: pre-line; }

.g1 h2.g1-h { margin-top: 1.4em; }
.g1-badges { display: flex; gap: 8px; margin: 8px 0 12px; }
.g1-badge { font-size: 28px; filter: grayscale(1); opacity: .35; }
.g1-badge.on { filter: none; opacity: 1; }
.g1-un { font-weight: 800; text-align: center; line-height: 1.2; }
.g1-prog { flex: 1; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.g1-prog i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.g1-q { text-align: center; }
.g1-prompt { font-size: 1.3rem; }
.g1-big { font-size: 3rem; font-weight: 800; min-height: 70px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.g1-say { font-size: 1.8rem; width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--line); background: var(--accent-soft); }
.g1-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.g1-opts.two { grid-template-columns: repeat(2, 1fr); }
.g1-opts.words { display: flex; flex-wrap: wrap; justify-content: center; }
.g1-opt { border: 3px solid var(--line); background: var(--surface); border-radius: 16px; min-height: 76px; font-weight: 800; padding: 8px 12px; }
.g1-opt.pic { font-size: 3rem; }
.g1-opt.txt { font-size: 1.7rem; }
.g1-opt.good { background: var(--good-soft); border-color: var(--good); }
.g1-opt.bad { background: var(--bad-soft); border-color: var(--bad); }
.g1-line { font-size: 1.7rem; font-weight: 800; min-height: 60px; padding: 8px; border-bottom: 3px dashed var(--line); margin: 8px 0; }
.g1-text { font-size: 1.5rem; }
.g1-sent { margin: 8px 0; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.g1-sent:active { background: var(--hl); }
.g1-ico { margin-right: 6px; }
.g1-stars { font-size: 2rem; margin: 0; }
@media (max-width: 420px) { .g1-opts { grid-template-columns: 1fr 1fr; } .g1-big { font-size: 2.4rem; } }
