.rack-container {
    display: flex;
    justify-content: center;
    padding: 8px 4px;
    touch-action: none;
}

.rack {
    display: flex;
    gap: 6px;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.rack-tile {
    width: clamp(36px, 10vw, 48px);
    height: clamp(36px, 10vw, 48px);
    background: linear-gradient(to bottom, var(--tile-bg), color-mix(in srgb, var(--tile-bg) 85%, #000));
    color: var(--tile-text);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px, 4vw, 22px);
    font-weight: 800;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -1px 0 rgba(0,0,0,0.15);
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
    cursor: grab;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.1s, opacity 0.1s;
}

.rack-tile .tile-score {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: clamp(8px, 2vw, 10px);
    font-weight: 400;
    opacity: 0.6;
}

.rack-tile--dragging {
    opacity: 0.3;
    transform: scale(0.9);
}

.rack-tile--selected {
    box-shadow: 0 0 0 3px var(--primary);
    transform: scale(1.05);
}

.drag-ghost {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    background: var(--tile-bg);
    color: var(--tile-text);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(16px, 4vw, 22px);
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.9;
}

.drag-ghost .tile-score {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: clamp(8px, 2vw, 10px);
    font-weight: 400;
    opacity: 0.6;
}

.rack--drop-target {
    outline: 2px dashed var(--primary);
    outline-offset: 4px;
    border-radius: 8px;
}
