/* General layout adjustments for compactness */
        .grid_item h2 { margin-block: 0.6em 0.3em; }
        .grid_item p { margin-block: 0 0.6em; }

        /* --- COMPONENT STYLES --- */
        .custom-tolerance-input,
        #assistant-results {
            border: 1px solid var(--border-color);
            border-radius: var(--radius-sm);
        }

        select { opacity: 0.8; }
        .custom-tolerance-input { display: flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: var(--radius-sm); }
        .nominal-value { font-size: 1.6em; font-weight: 700; }
        .tolerances { display: flex; flex-direction: column; font-size: 0.85em; justify-content: center; }
        .tolerances span { line-height: 1.1; }
        /* Result readout: plain text, not an input-style box */
        .custom-tolerance-input.result-value { border: none; padding: 0; }
        [contenteditable]:focus { box-shadow: 0 0 0 2px rgba(0,123,255,0.2); outline:none; border-radius: 4px; }
        .component-row { display: flex; gap: 4px; align-items: center; margin-bottom: 8px; }
        .component-row select.c-dir { font-size: 1.2em; font-weight: bold; padding: 5px 0; width: 50px; text-align: center; text-align-last: center; }
        .btn { padding: 8px 20px; border: none; border-radius: 8px; color: white; font-weight: 400; cursor: pointer; transition: opacity 0.2s; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5); box-shadow: none; }
        .btn-primary { background-color: #007bff; }
        .btn-danger { background-color: #dc3545; }
        .btn-info { background-color: #17a2b8; }
        .btn:hover { opacity: 0.9; }
        .results-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2px 10px; }
        .results-grid > div { padding: 4px 5px; border-bottom: 1px solid #dee2e6; display: flex; align-items: center; }
        .results-grid small { margin-left: 5px; opacity: 0.7; font-size: 0.9em; }
        .grid-header { font-weight: 700; border-bottom-width: 2px; opacity: 0.8; }
        #assistant-results { margin-top: 8px; padding: 6px 8px; border-radius: 4px; }
        #summary-table { width: 100%; border-collapse: collapse; font-size: 0.9em; display: inline-table}
        #summary-table th, #summary-table td { border: 1px solid #ccc; padding: 4px 5px; text-align: center; }
        #summary-table th { font-weight: 700; opacity: 0.8; }
        #summary-table tfoot td { font-weight: 700; }
        .image-container { position: relative; width: 100%; min-height: 350px; cursor: pointer; overflow: hidden; border-radius: 6px; }
        .image-container img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transition: opacity 0.4s ease-in-out; }
        .image-container .image-hover { opacity: 0; }
        .image-container:hover .image-hover { opacity: 1; }
        .image-container:hover .image-default { opacity: 0; }
        /* Auto-rotate support: when container has .auto-detail, show detail image */
        .image-container.auto-detail .image-hover { opacity: 1; }
        .image-container.auto-detail .image-default { opacity: 0; }

/* Extracted from inline page assets */
.k5-inline-24e8529acd{width:auto; margin-top:8px;}

/* Extracted from inline page assets */
.k5-inline-479684ecee{flex-basis: 100%;}

/* Extracted from inline page assets */
.k5-inline-4a3180e2eb{margin-bottom: 15px;}

/* Extracted from inline page assets */
.k5-inline-1e71b2a995{display: flex; flex-wrap: wrap; gap: 25px; align-items: flex-start;}

/* Extracted from inline page assets */
.k5-inline-d98dbc59af{flex:1; min-width: 250px;}

/* Extracted from inline page assets */
.k5-inline-1f5c0a3889{opacity:0.7; font-size:0.9em; margin-top:6px;}

/* Extracted from inline page assets */
.k5-inline-6e199b8792{flex:1.5; min-width: 280px;}

/* Extracted from inline page assets */
.k5-inline-288d56f5b0{display:flex; gap: 5px; align-items: center; margin-bottom: 8px;}

/* Extracted from inline page assets */
.k5-inline-7623f05545{flex:1;}

/* Extracted from inline page assets */
.k5-inline-cad980f4b7{width:100%;}

/* Extracted from inline page assets */
.k5-inline-59809fcf0f{display:flex; gap: 5px; align-items: center; margin-top: 8px;}

/* Extracted from inline page assets */
.k5-inline-f16bf35992{opacity:0.8; font-size: 0.9em;}

/* Extracted from inline page assets */
.k5-inline-697b0e760c{display:flex; gap: 5px; margin-top:8px;}

/* Extracted from inline page assets */
.k5-inline-ced570faf7{width:auto; background-color:#28a745}
