.ws-page {
    overscroll-behavior-y: none;
}

.ws-grid {
    display: grid;
    width: 100%;
    aspect-ratio: 1;
    touch-action: none; /* Prevent scrolling while dragging on mobile */
}

.ws-cell {
    border-right: 1px solid var(--color-outline-variant);
    border-bottom: 1px solid var(--color-outline-variant);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-headline);
    font-size: clamp(1rem, 3.5vw, 1.8rem);
    font-weight: 700;
    color: var(--color-on-background);
    user-select: none;
    transition: all 0.15s ease;
}

/* Current selection while dragging */
.ws-cell.selecting {
    background: var(--color-primary-container);
    color: var(--color-on-primary-container);
}

/* Successfully found words */
.ws-cell.found {
    background: var(--color-tertiary-container);
    color: var(--color-on-tertiary-container);
}

/* Overlap selection and found */
.ws-cell.found.selecting {
    background: var(--color-secondary-container);
}

/* Right Panel List */
.ws-words-ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ws-word-li {
    background: var(--color-surface-container-highest);
    color: var(--color-on-surface-variant);
    font-family: var(--font-label);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ws-word-li.found {
    text-decoration: line-through;
    opacity: 0.5;
    background: var(--color-surface-variant);
}
