/* Group quizzes: full screen over the duel stage, same Knowledge Club look (cream card, navy ink). */
.stage { position: relative; }
.group-screen { position: absolute; inset: 0; z-index: 20; overflow: auto; padding: clamp(14px, 3vw, 34px); border-radius: 26px; background: #f8f1e6; color: #303058; display: flex; flex-direction: column; gap: 14px; }
.group-screen[hidden] { display: none; }
.group-screen h2 { margin: 0; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.2; color: #262650; }
.group-screen h3 { margin: 6px 0; font-size: 18px; color: #262650; }
.group-screen .eyebrow { margin: 0; color: #8a6c3c; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 700; }
.group-screen .hint { color: #66658a; }
.group-screen button { min-height: 52px; background: #343860; color: #fff5dd; border: 0; }
.group-screen button.quiet { background: transparent; color: #343860; border: 1px solid #b9b2a4; }
.group-screen button.small { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.group-screen input { min-height: 44px; border-radius: 10px; border: 1px solid #cfc7b9; padding: 8px 12px; font: inherit; background: #fffaf1; color: #303058; width: 100%; }
.group-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.group-lobby { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; }
.group-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.group-members li { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: #ece5d8; }
.group-members li.me { background: #dcdcf2; }
.group-members small { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: #343860; color: #fff5dd; }
.group-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.group-actions button { flex: 1 1 180px; }
.group-question { display: flex; flex-direction: column; gap: 12px; }
.group-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: #66658a; font-size: 13px; }
.group-count { margin-left: auto; font-weight: 700; color: #343860; }
.group-timer { position: relative; height: 10px; border-radius: 99px; background: #e2dbcd; overflow: hidden; }
.group-timer i { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #e2a74e, #f3cf84); border-radius: 99px; }
.group-timer[data-wait]::after { content: attr(data-wait); position: absolute; inset: -4px 0 auto; text-align: center; font-size: 11px; color: #343860; }
.group-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.group-answer { justify-content: flex-start !important; text-align: left !important; background: #e8e3d8 !important; color: #303058 !important; border: 1px solid #cfc7b9 !important; min-height: 74px !important; }
.group-answer .letter { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; border: 1px solid #9a95ad; font-size: 13px; }
.group-answer:hover:not(:disabled) { background: #dcdcf2 !important; }
.group-answer.picked { background: #c9cbee !important; border-color: #343860 !important; }
.group-answer.right { background: #bfe4c3 !important; border-color: #3d8a4c !important; }
.group-answer.wrong { background: #f2c4bd !important; border-color: #b4483b !important; }
.group-answer:disabled { opacity: 1; cursor: default; }
.group-explain { margin: 0; color: #4f4e74; }
.group-feedback { margin: 0; font-weight: 700; font-size: 18px; }
.group-feedback.right { color: #2f7a3e; }
.group-feedback.wrong { color: #a6402f; }
.group-winner { font-size: clamp(24px, 3vw, 38px) !important; text-align: center; }
.group-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: none; }
.group-board li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: #ece5d8; }
.group-board li.me { background: #dcdcf2; }
.group-board li:first-child { background: #f3dfae; }
.group-board .place { font-weight: 700; color: #8a6c3c; }
.group-board small { color: #66658a; }
.group-chat { display: grid; gap: 6px; margin-top: auto; }
.group-lines { max-height: 140px; overflow: auto; font-size: 13px; }
.group-lines p { margin: 2px 0; }
/* side panel */
[data-panel=group] h4 { margin: 14px 0 6px; }
[data-panel=group] hr { border: 0; border-top: 1px solid #4a4a72; margin: 18px 0; }
[data-panel=group] .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
[data-panel=group] .group-room { display: flex; justify-content: space-between; min-height: 48px; width: 100%; margin-bottom: 6px; }
[data-panel=group] .group-room small { opacity: .8; }
@media (max-width: 760px), (max-height: 480px) {
  .group-lobby { grid-template-columns: 1fr; }
  .group-answers { gap: 8px; }
  .group-answer { min-height: 54px !important; padding: 8px !important; }
}
/* live reveal: who picked what (bars + name chips), +points, board movement; timer turns amber, then red */
.group-answer { position: relative; overflow: hidden; gap: 12px; display: flex !important; align-items: center; }
.group-answer > * { position: relative; }
.group-answer > .group-fill { position: absolute; inset: 0 auto 0 0; width: var(--share); background: #3438601c; animation: fill .7s ease-out both; }
@keyframes fill { from { width: 0; } to { width: var(--share); } }
.group-answer.right > .group-fill { background: #3d8a4c33; }
.group-answer.wrong > .group-fill { background: #b4483b26; }
.group-label { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.group-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.group-chips em { font-style: normal; font-size: 11px; line-height: 1.5; padding: 0 8px; border-radius: 99px; background: #fffaf1; border: 1px solid #cfc7b9; color: #4f4e74; animation: drop .3s both; }
.group-chips em.me { background: #343860; color: #fff5dd; border-color: #343860; }
.group-chips em.more { background: transparent; }
.group-tally { margin-left: auto; font-size: 22px; font-weight: 700; color: #343860; min-width: 26px; text-align: right; }
.group-answer.right { animation: pop .45s ease-out, glow 1s ease-out; }
.group-answer.wrong { animation: shake .42s ease-in-out; }
.group-timer.warn i { background: linear-gradient(90deg, #e09a3e, #f2c46d); }
.group-timer.danger i { background: linear-gradient(90deg, #c8473a, #e8735f); }
.group-timer.danger:not(.done) { animation: pulse 1s ease-in-out infinite; }
.group-timer.done { opacity: .5; }
.group-feedback { position: relative; }
.group-feedback .points-pop { position: relative; display: inline-block; top: 0; right: auto; margin-left: 12px; font-size: 26px; animation-duration: 2.4s; }
.group-board li { grid-template-columns: 34px minmax(0, 1fr) auto auto auto; }
.group-board .move { margin-left: 8px; font-size: 11px; font-weight: 700; }
.group-board .move.up { color: #2f7a3e; }
.group-board .move.down { color: #a6402f; }
.group-board .gain { font-style: normal; font-size: 12px; font-weight: 700; color: #2f7a3e; min-width: 38px; text-align: right; }
.group-board li.up { animation: rise .5s ease-out both; }
.group-board li.down { animation: sink .5s ease-out both; }
[data-panel=group] .group-settings { background: #25284699; border: 1px solid #55597566; border-radius: 12px; padding: 2px 12px 4px; margin-bottom: 16px; }
[data-panel=group] .group-settings h3 { margin: 12px 0 4px; }
