.game-container {
    max-width: 1080px;
}

.game-area {
    background: var(--card-background, #fff);
    padding: 24px;
    border-radius: var(--border-radius, 8px);
    box-shadow: var(--shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
}

.status {
    min-height: 1.6em;
    margin-bottom: 14px;
    color: var(--secondary-color, #2c3e50);
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
}

/* Screen-reader-only live region: kept in the layout so it is announced,
   but visually hidden so it never duplicates on-screen text. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Round / timer bar */
.round-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 0 auto 16px;
    max-width: 620px;
}

.round-info {
    font-weight: 800;
    color: var(--secondary-color, #2c3e50);
    white-space: nowrap;
}

.timer-track {
    flex: 1 1 220px;
    min-width: 140px;
    height: 16px;
    background: var(--background-color, #f0f2f5);
    border: 2px solid var(--border-color, #e9ecef);
    border-radius: var(--radius-pill, 999px);
    overflow: hidden;
}

.timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--success-color, #27ae60), var(--primary-color, #2980b9));
    transition: width 0.25s linear, background 0.3s ease;
    border-radius: inherit;
}

.timer-fill.low-time {
    background: linear-gradient(90deg, var(--warning-color, #f39c12), var(--danger-color, #e74c3c));
}

.timer-text {
    font-weight: 700;
    color: var(--text-muted, #666);
    min-width: 3.2em;
    text-align: right;
}

/* Scoreboard */
.score-board {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 18px;
    max-width: 720px;
    padding: 0;
}

.score-board li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 2px solid var(--border-color, #e9ecef);
    border-radius: var(--radius-pill, 999px);
    font-weight: 700;
    color: var(--secondary-color, #2c3e50);
}

.score-board li.is-drawer {
    border-color: var(--primary-color, #2980b9);
    background: #eef7ff;
}

.score-board li.is-me {
    box-shadow: 0 0 0 2px var(--focus-ring-color, #6d5efc) inset;
}

.score-board .score-name {
    font-weight: 800;
}

.score-board .score-value {
    color: var(--primary-color, #2980b9);
}

.score-board .drawer-badge {
    font-size: 0.85rem;
}

/* Shared panel look for word choice / waiting / result / game-over */
.dg-panel {
    max-width: 640px;
    margin: 0 auto 18px;
    padding: 22px;
    background: #f8fafc;
    border: 2px solid var(--border-color, #e9ecef);
    border-radius: 14px;
    text-align: center;
}

.dg-panel h2 {
    margin-bottom: 8px;
    color: var(--secondary-color, #2c3e50);
}

.hint {
    color: var(--text-muted, #666);
    font-size: 0.95rem;
    font-weight: 600;
}

.word-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.word-option-btn {
    padding: 14px 22px;
    font-size: 1.05rem;
    text-transform: capitalize;
}

/* Draw stage layout: canvas on one side, guesses on the other */
.draw-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
    gap: 20px;
    align-items: start;
    max-width: 980px;
    margin: 0 auto 18px;
}

.canvas-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.drawer-word-label {
    padding: 6px 16px;
    background: #fff7ed;
    border: 2px solid #fed7aa;
    border-radius: var(--radius-pill, 999px);
    color: #9a3412;
    font-weight: 800;
    text-transform: capitalize;
}

.canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1 / 1;
}

#draw-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 3px solid var(--border-color, #e9ecef);
    border-radius: 16px;
    box-shadow: var(--shadow, 0 4px 6px rgba(0, 0, 0, 0.1));
    touch-action: none;
    cursor: crosshair;
}

#draw-canvas:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring), var(--shadow);
}

.pen-cursor {
    position: absolute;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
    border-radius: 50%;
    border: 3px solid var(--primary-color, #2980b9);
    background: rgba(41, 128, 185, 0.25);
    pointer-events: none;
}

.canvas-desc {
    max-width: 480px;
    color: var(--text-muted, #666);
    font-size: 0.85rem;
    text-align: center;
}

.drawer-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.guess-panel {
    background: #f8fafc;
    border: 2px solid var(--border-color, #e9ecef);
    border-radius: 14px;
    padding: 18px;
}

.guess-panel h2 {
    margin-bottom: 10px;
    color: var(--secondary-color, #2c3e50);
    text-align: center;
}

.guess-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.guess-choice-btn {
    padding: 14px 10px;
    font-size: 1.02rem;
    text-transform: capitalize;
    background: white;
    color: var(--text-color, #333);
    border: 2px solid var(--border-color, #e9ecef);
    box-shadow: none;
}

.guess-choice-btn:hover:not(:disabled) {
    background: #f1f7ff;
    border-color: var(--primary-color, #2980b9);
    color: var(--text-color, #333);
}

.guess-choice-btn.correct {
    background: var(--success-color, #27ae60);
    border-color: var(--success-color, #27ae60);
    color: white;
}

.guess-choice-btn.incorrect {
    background: var(--danger-color, #e74c3c);
    border-color: var(--danger-color, #e74c3c);
    color: white;
}

.guess-choice-btn.chosen {
    box-shadow: 0 0 0 3px var(--focus-ring-color, #6d5efc) inset;
}

.guess-choice-btn:disabled {
    opacity: 0.65;
    cursor: default;
    transform: none;
}

.guess-status {
    margin-top: 12px;
    text-align: center;
    color: var(--text-muted, #666);
    font-weight: 600;
}

.result-panel {
    background: #ecf7ff;
    border-color: #cbe7ff;
}

.game-over-panel {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.game-over-panel .score-board {
    margin-top: 12px;
}

/* Win celebration pulse — duration is neutralized globally under
   prefers-reduced-motion, so no extra guard is needed here. */
.celebrate {
    animation: dgCelebratePulse 0.8s ease-in-out 3;
}

@keyframes dgCelebratePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@media (max-width: 860px) {
    .draw-stage {
        grid-template-columns: 1fr;
    }

    .canvas-wrap {
        max-width: 380px;
    }
}

@media (max-width: 560px) {
    .game-area {
        padding: 14px;
    }

    .dg-panel,
    .guess-panel {
        padding: 14px;
    }

    .guess-choices {
        grid-template-columns: 1fr;
    }

    .round-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .timer-text {
        text-align: center;
    }
}
