.pedigree-wrapper-0331155d {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px; /* Add some spacing below */
}
.pedigree-table-0331155d {
    display: flex;
    border: 1px solid #ccc;
    font-family: sans-serif;
    font-size: 12px;
    background: #fff;
    width: 100%;
    min-width: 1200px; /* Force minimum width to prevent cells getting too squished */
}
.pedigree-generation-0331155d {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ccc;
    min-width: 150px; /* Ensure each generation column has enough space */
}
.pedigree-generation-0331155d:last-child {
    border-right: none;
}
.pedigree-cell-0331155d {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2px 10px; /* Reduced top and bottom padding from 5px to 2px */
    border-bottom: 1px solid #ccc;
    min-height: 20px; /* Slightly reduced min-height */
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}
.pedigree-cell-0331155d:last-child {
    border-bottom: none;
}
.horse-name-0331155d {
    font-weight: bold;
    color: #333;
    line-height: 1.2;
    word-break: break-word; /* Prevent long names from breaking layout */
}
.horse-details-0331155d {
    color: #666;
    font-size: 0.9em;
    margin-top: 1px; /* Reduced margin top */
    line-height: 1.2; /* Slightly tighter line height */
    word-break: break-word; /* Prevent long details from breaking layout */
}

/* Tablet & Mobile Adjustments */
@media (max-width: 1024px) {
    .pedigree-wrapper-0331155d {
        /* Enhance scrollability hints on touch devices */
        box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.1); 
    }
    .pedigree-table-0331155d {
        /* On smaller screens, allow it to stretch further to ensure cells are readable */
        min-width: 1400px; 
    }
    .pedigree-generation-0331155d {
        /* Give columns a bit more breathing room when scrolling */
        min-width: 200px; 
    }
    .pedigree-cell-0331155d {
        /* Increase padding slightly for touch targets, but still less than before */
        padding: 4px 12px; 
    }
}