/* Letris: bandeja de peças sob o tabuleiro (src/js/letris.js). As peças usam a
   cor do tema que o canvas usa (--lx-face vem de tileColorForType). */
.letris-tray {
    --lx-tile: min(11vw, 42px);
    width: 100%;
    max-width: 450px;
    margin: 0 auto 8px;
    padding: 0 12px;
    user-select: none;
    -webkit-user-select: none;
}
.letris-tray.hidden {
    display: none;
}

/* No Letris não há palavra traçada: a faixa da palavra atual dá lugar à bandeja */
body.letris-active .current-word-display {
    display: none;
}

/* Tempo extra só existe no Arcade */
body.letris-active #board-legend .board-legend-item:has(.is-time) {
    display: none;
}

.lx-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.lx-slot {
    display: grid;
    place-items: center;
    min-height: calc(var(--lx-tile) * 2 + 22px);
    border-radius: 14px;
    background: rgba(143, 187, 255, 0.07);
    border: 1px dashed rgba(143, 187, 255, 0.2);
}

.lx-piece {
    display: grid;
    gap: 3px;
    padding: 5px;
    border-radius: 12px;
    cursor: grab;
    touch-action: none;
    transition: transform 0.1s ease;
}
.lx-piece.is-selected {
    outline: 2px solid #7cc8ff;
    background: rgba(124, 200, 255, 0.16);
    transform: scale(1.06);
}
.lx-piece.is-blocked {
    opacity: 0.4;
}
.lx-piece.is-dragging {
    opacity: 0.2;
}

.lx-tile {
    --lx-face: #e9f1ff;
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--lx-face) 78%, #ffffff) 0%,
        color-mix(in srgb, var(--lx-face) 94%, #000000) 100%
    );
    box-shadow:
        0 3px 0 color-mix(in srgb, var(--lx-face) 55%, #000000),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    font-size: calc(var(--lx-tile) * 0.52);
    font-weight: 900;
    line-height: 1;
}
.lx-mark {
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: calc(var(--lx-tile) * 0.36);
    line-height: 1;
}

.lx-ghost {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40000;
    padding: 0;
    pointer-events: none;
    opacity: 0.92;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
}
.lx-ghost .lx-tile {
    border-radius: 11px;
}

.lx-tray-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 8px;
}
.lx-left {
    font-size: 0.8rem;
    font-weight: 800;
    opacity: 0.8;
}
.lx-rotate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid rgba(143, 187, 255, 0.35);
    border-radius: 999px;
    color: inherit;
    background: rgba(143, 187, 255, 0.12);
    font-weight: 800;
}

/* Cartão da home */
.hm-letris {
    --hm-accent: #ff6fb1;
}
