* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%; height: 100%; overflow: hidden;
    background: #0b0b12;
    font-family: 'Trebuchet MS', Arial, sans-serif;
}
#gameCanvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.overlay {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    background: rgba(5, 5, 15, 0.7);
}
.overlay.hidden { display: none; }

.panel {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px; padding: 30px 38px; text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); max-width: 440px; width: 90%;
}
.panel h1 { font-size: 40px; color: #2a2a55; margin-bottom: 8px; }
.tag { color: #445; margin-bottom: 18px; font-size: 15px; }

.choice { text-align: left; margin: 14px 0; padding: 14px 16px; background: #eef0fa; border-radius: 12px; }
.choice h3 { font-size: 15px; color: #2a2a55; margin-bottom: 8px; }
.choice label { display: block; padding: 5px 4px; font-size: 15px; color: #234; cursor: pointer; }
.choice input[type=radio] { margin-right: 8px; transform: scale(1.2); }
.choice input[type=number] { font-size: 20px; padding: 6px 10px; width: 90px; border: 2px solid #ccd; border-radius: 8px; }
.choice small { display: block; margin-top: 6px; color: #678; font-size: 12px; }

.buttons { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.btn {
    padding: 13px 22px; font-size: 16px; font-weight: bold; border: none;
    border-radius: 10px; cursor: pointer; background: #dfe2ef; color: #2a2a55;
    transition: transform 0.12s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: #6a5acd; color: #fff; }
.btn.primary:hover { background: #5847c0; }
.hint { margin-top: 12px; font-size: 12px; color: #678; }

#muteBtn {
    position: fixed; bottom: 16px; left: 16px; z-index: 160;
    width: 46px; height: 46px; border: none; border-radius: 50%;
    background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 22px; cursor: pointer;
}
#muteBtn:hover { background: rgba(0, 0, 0, 0.75); }

#pose-wrapper {
    position: fixed; bottom: 16px; right: 16px; width: 260px; z-index: 150;
    background: rgba(0, 0, 0, 0.6); border-radius: 12px; padding: 10px;
    color: #fff; text-align: center;
}
#pose-wrapper.hidden { display: none; }
#pose-cam { position: relative; width: 240px; height: 180px; border-radius: 8px; overflow: hidden; background: #000; }
#poseCanvas { display: block; width: 100%; height: 100%; }
#webcam { display: none; }
#pose-status { font-size: 12px; margin-top: 6px; min-height: 28px; }

@media (max-width: 768px) {
    .panel { padding: 22px; } .panel h1 { font-size: 30px; }
    #pose-wrapper { width: 170px; } #pose-cam { width: 150px; height: 112px; }
}
