#game-root {
    --wd-accent: #10B981;
    --wd-accent-dark: #0e9c6f;
    --wd-accent-light: #e3f9ef;
    --wd-accent-border: #a7f3d0;
    border-radius: var(--kw-radius, 16px);
}

.wd-wrap {
    max-width: 460px;
    margin: 0 auto;
    padding: 20px 16px 28px;
    text-align: center;
}

.wd-loading,
.wd-error {
    text-align: center;
    padding: 48px 16px;
}

.wd-loading-icon,
.wd-error-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.wd-loading-icon {
    animation: wd-pulse 1.2s ease-in-out infinite;
}

.wd-loading-text {
    font-size: 15px;
    color: #666;
}

.wd-error-text {
    font-size: 15px;
    font-weight: 700;
    color: #EF4444;
}

.wd-stat-row {
    justify-content: center;
    margin-bottom: 14px;
}

.wd-stat {
    background: var(--wd-accent-light);
    color: var(--wd-accent-dark);
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 700;
    font-size: 14px;
}

.wd-words {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.wd-word-chip {
    background: #fff;
    border: 2px solid var(--wd-accent-border);
    color: var(--wd-accent-dark);
    font-weight: 700;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 999px;
    transition: background .15s ease, color .15s ease;
}

.wd-word-chip.found {
    background: var(--wd-accent);
    color: #fff;
    border-color: var(--wd-accent);
    text-decoration: line-through;
    opacity: .75;
}

.wd-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
    margin-bottom: 18px;
    background: var(--wd-accent-light);
    border-radius: 12px;
    padding: 6px;
}

.wd-cell {
    aspect-ratio: 1;
    border: none;
    border-radius: 4px;
    background: #fff;
    color: var(--kw-text, #2D2A32);
    font-size: clamp(11px, 3.4vw, 15px);
    font-weight: 700;
    cursor: pointer;
    transition: background .1s ease, transform .1s ease;
}

.wd-cell:hover:not(.found) {
    background: var(--wd-accent-border);
}

.wd-cell.selecting {
    background: var(--wd-accent);
    color: #fff;
    transform: scale(1.05);
}

.wd-cell.found {
    background: var(--wd-accent);
    color: #fff;
    cursor: default;
}

.wd-cell.invalid {
    background: #FEE2E2;
    color: #EF4444;
    animation: wd-shake .3s ease;
}

.wd-done {
    text-align: center;
    background: #fff;
    border-radius: var(--kw-radius, 16px);
    padding: 24px 18px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .07);
    margin-bottom: 16px;
    animation: wd-pop .3s ease;
}

.wd-done-emoji {
    font-size: 48px;
    margin-bottom: 6px;
}

.wd-done-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--wd-accent-dark);
    margin-bottom: 6px;
}

.wd-done-score {
    font-size: 15px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.wd-done-stars {
    font-size: 22px;
    letter-spacing: 3px;
}

.wd-done-share {
    justify-content: center;
    margin-top: 12px;
}

.wd-restart-btn {
    border: none;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    background: var(--wd-accent);
    color: #fff;
    box-shadow: 0 3px 0 var(--wd-accent-dark);
    transition: transform .1s ease;
}

.wd-restart-btn:hover {
    transform: translateY(-1px);
}

@keyframes wd-pop {
    0% { transform: scale(.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes wd-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: .7; }
}

@keyframes wd-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}
