/* ─── Container (wine-red console) ──────────────────────────────────── */
#game-root .ws-wrap {
    position: relative; padding: 0.85rem; max-width: 560px; margin: 0 auto;
    background: linear-gradient(180deg, #2a1010 0%, #5a1818 100%);
    border-radius: var(--jul-radius-lg, 20px); user-select: none;
}

/* ─── HUD pills ─────────────────────────────────────────────────────── */
#game-root .ws-header { display: flex; align-items: stretch; gap: 0.4rem; margin-bottom: 0.55rem; }
#game-root .ws-pill {
    flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 0.4rem; padding: 0.32rem 0.55rem;
    background: linear-gradient(180deg, #fff8e1 0%, #fbf0c8 100%);
    border: 1px solid rgba(0,0,0,0.12); border-radius: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 2px 4px rgba(0,0,0,0.18);
}
#game-root .ws-pill-icon { font-size: 1.05rem; line-height: 1; }
#game-root .ws-pill-body { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
#game-root .ws-lbl { font-size: 0.56rem; letter-spacing: 0.06em; color: #8a5a1a; text-transform: uppercase; font-weight: 700; }
#game-root .ws-val { font-size: 1.1rem; font-weight: 800; color: var(--jul-red-700, #8B0000); font-variant-numeric: tabular-nums; }
#game-root .ws-audio { display: flex; align-items: center; gap: 0.3rem; padding: 0.28rem 0.42rem; background: linear-gradient(180deg, #fff8e1 0%, #fbf0c8 100%); border: 1px solid rgba(0,0,0,0.12); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 2px 4px rgba(0,0,0,0.18); }
#game-root .ws-mute { background: transparent; border: 0; width: 24px; height: 24px; cursor: pointer; font-size: 0.9rem; padding: 0; }
#game-root .ws-vol { width: 46px; cursor: pointer; accent-color: var(--jul-red-700, #8B0000); }

/* ─── Difficulty chips ──────────────────────────────────────────────── */
#game-root .ws-modes { display: flex; gap: 0.3rem; margin-bottom: 0.6rem; }
#game-root .ws-mode {
    flex: 1 1 0; padding: 0.32rem 0.5rem; font-size: 0.8rem; font-weight: 700; color: #fde9a8;
    background: rgba(0,0,0,0.28); border: 1px solid rgba(255,221,100,0.18); border-radius: 999px; cursor: pointer;
}
#game-root .ws-mode:hover:not(.ws-mode--active) { background: rgba(0,0,0,0.42); color: #fff8d0; }
#game-root .ws-mode--active { background: linear-gradient(180deg, #fbd24a 0%, #d99b1e 100%); color: #4a1a05; border-color: #b8870b; box-shadow: inset 0 1px 0 rgba(255,255,255,0.6); }

/* ─── Playfield + grid ──────────────────────────────────────────────── */
#game-root .ws-playfield { position: relative; padding: 12px; border: 3px solid #ffd66b; border-radius: 14px; background: #f3e3bf; box-shadow: 0 0 0 1px rgba(0,0,0,0.4), inset 0 0 16px rgba(120,80,30,0.2); }
#game-root .ws-grid { display: grid; gap: 3px; touch-action: none; }
#game-root .ws-cell {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    background: #fffaf0; border-radius: 4px; font-weight: 800; font-size: clamp(0.6rem, 2.2vw, 1rem);
    color: #5a3a1f; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(150,110,60,0.2);
}
#game-root .ws-cell--active { background: var(--jul-gold-300, #ffd66b); color: #4a1a05; }
#game-root .ws-cell--found { background: #bfe6c4; color: #14532d; box-shadow: inset 0 0 0 1px rgba(22,101,52,0.3); }
#game-root .ws-cell--found.ws-cell--active { background: #8fd49b; }
#game-root .ws-words { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 0.7rem; }
#game-root .ws-word { padding: 4px 11px; background: rgba(255,255,255,0.7); border-radius: 999px; border: 1px solid rgba(120,80,30,0.25); font-size: 0.8rem; font-weight: 700; color: #5a3a1f; }
#game-root .ws-word--found { background: #16a34a; color: #fff; text-decoration: line-through; border-color: #16a34a; }

/* ─── Buttons / actions ─────────────────────────────────────────────── */
#game-root .ws-actions { display: flex; justify-content: center; margin-top: 0.7rem; }
#game-root .ws-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.55rem 1.2rem; font-size: 0.92rem; font-weight: 700; border-radius: 999px; cursor: pointer; transition: transform 0.08s ease, background 0.2s ease; }
#game-root .ws-btn--primary { background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%); color: #fff; border: 1px solid #7f1d1d; box-shadow: 0 3px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3); }
#game-root .ws-btn--primary:hover { background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%); transform: translateY(-1px); }
#game-root .ws-btn--primary:active { transform: translateY(1px); }

/* ─── Start + win overlay ───────────────────────────────────────────── */
#game-root .ws-overlay, #game-root .ws-start { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(20, 10, 10, 0.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); border-radius: 12px; }
#game-root .ws-overlay { z-index: 6; } #game-root .ws-start { z-index: 7; }
#game-root .ws-overlay[hidden], #game-root .ws-start[hidden] { display: none; }
#game-root .ws-wrap.ws-prestart .ws-actions { display: none; }
#game-root .ws-overlay-card {
    max-width: 320px; width: 100%; text-align: center; padding: 1.2rem 1.1rem;
    background: linear-gradient(180deg, #fff8e1 0%, #fbf0c8 100%);
    border: 1px solid rgba(150, 95, 40, 0.45); border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.7);
    animation: ws-pop 0.3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes ws-pop { 0% { transform: scale(0.85); opacity: 0; } 100% { transform: none; opacity: 1; } }
#game-root .ws-overlay-card h2 { margin: 0 0 0.4rem; color: var(--jul-red-700, #8B0000); font-size: 1.35rem; }
#game-root .ws-overlay-card p { margin: 0 0 0.9rem; color: #4a2a10; font-size: 0.92rem; }
#game-root .ws-rekord { color: #16a34a; }

/* ─── Confetti ──────────────────────────────────────────────────────── */
#game-root .ws-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 8; }
#game-root .ws-confetti-piece { position: absolute; top: 18%; left: 50%; width: 8px; height: 13px; border-radius: 2px; animation: ws-confetti-fall 1.6s ease-out forwards; }
@keyframes ws-confetti-fall { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 340px) rotate(var(--rot)); opacity: 0; } }

@media (max-width: 480px) { #game-root .ws-wrap { padding: 0.6rem; } #game-root .ws-val { font-size: 1rem; } #game-root .ws-vol { width: 40px; } }
