/* 
 * Complete CSS for ACV Stacker with 2-over-1 grid layout
 * Fixed for container overflow issues
 * Updated with limiting curve controls
 */

/* Base body and typography styles */
/* Update body to allow page scrolling and remove height constraint */
body {
    font-family: BlinkMacSystemFont,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 300;
    color: #414141;
    letter-spacing: .03rem;
    margin: 0;
    padding: 0;
    width: 100vw;
    min-height: 100vh; /* Changed from height: 100vh */
    overflow-y: auto; /* Allow vertical scrolling */
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    background-color: rgba(0,0,0,0.4);
}
/* Universal box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Links */
a {
    text-decoration: none;
    color: rgba(166,20,50,1);
}

/* Typography */
.title {
    text-align: center;
    font-weight: 300;
    margin: 0;
    padding: 0;
}

.tagline {
    text-align: center;
    font-weight: 300;
    margin: 0;
    margin-bottom: 15px;
    padding: 0;
}

.section-title {
    text-align: center;
    font-weight: 500;
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.detail {
    font-size: 14px;
    color: rgba(166,20,50,1);
}

kbd {
    background: #eee;
    border-radius: 2px;
    padding: 0px 3px;
    font-family: monospace;
    border: 1px solid #ccc;
    box-shadow: 1px 1px 0 #aaa;
}

/* Main container - fix overflow issue */
.main-container {
    display: grid;
    grid-template-rows: auto auto; /* Changed from 1fr auto to prevent compression */
    gap: 20px;
    width: 900px;
    max-width: 95vw;
    min-height: 600px; /* Reduced minimum height since panels can expand as needed */
    /* Removed max-height: 90vh to allow expansion */
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 20px; /* Increased for better spacing when scrolling */
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(0,0,0,0.6);
    border-radius: 15px;
    background-color: #fafaf8;
    box-shadow: 1px 2px 5px 0 rgba(0,0,0,0.55), 4px 8px 25px 0 rgba(0,0,75,0.25);
    box-sizing: border-box;
    overflow: hidden; /* Changed back to hidden to contain rotated text */
}
.wrap {
    margin-top: 10px;
}

/* Top row - ensure minimum height and allow expansion */
.top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    /* Removed min-height constraint to allow expansion */
    width: 100%;
    box-sizing: border-box;
}

/* Controls panel - allow expansion based on content */
.controls-panel {
    display: flex;
    flex-direction: column;
    min-height: 460px; /* Keep minimum height for controls */
    min-width: 0;
    box-sizing: border-box;
}

.curve-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    min-height: 520px; /* Minimum height for basic layout */
    /* Removed max-height to allow expansion for legend */
    min-width: 0;
    box-sizing: border-box;
    overflow: visible; /* Allow legend to show */
}

/* Feedback panel - keep consistent size */
.feedback-panel {
    grid-column: 1 / -1;
    min-height: 240px; /* Minimum height for feedback */
    width: 100%;
    box-sizing: border-box;
}

/* Panel layouts */
/* Update the top panel to handle overflow properly when it expands */
#top-panel {
    flex: 1;
    padding: 16px;
    padding-top: 0;
    overflow-y: auto; /* Allow scrolling within the panel if needed */
    min-height: 0;
}

.curve-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Drop Zone Styling */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 15px; /* Slightly smaller for tighter layout */
    margin: 10px 0;
    text-align: center;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drop-zone.drag-over {
    border-color: #a61432;
    background-color: #fff5f5;
    transform: scale(1.02);
}

.drop-zone.has-files {
    border-style: solid;
    border-color: #28a745;
    background-color: #f8fff9;
}

.drop-zone-text {
    color: #666;
    font-size: 14px;
    margin: 8px 0;
}

.drop-zone-subtext {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

/* File list styling */
/* Ensure file list can expand but with reasonable limits */

#fileList {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    min-height: 40px;
    max-height: none; /* Remove height limit to allow expansion */
    overflow-y: auto;
    border: 1px dashed #ddd;
    border-radius: 6px;
    background-color: #fafafa;
}
#fileList:empty::before {
    content: "No files loaded. Drag .acv files here or use the button above.";
    display: block;
    padding: 15px;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 12px;
}

/* File list items */
#fileList li {
    padding: 6px 10px; /* Smaller padding for compact layout */
    margin: 3px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

#fileList li:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

#fileList.with-handles li {
    display: flex;
    align-items: center;
}

#fileList li > span:nth-child(2) {
    flex: 1;
    font-size: 13px; /* Slightly smaller text */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#fileList li > span:last-of-type {
    font-size: 11px;
    color: #888;
    margin-left: 8px;
    font-weight: bold;
    background: #eee;
    padding: 2px 5px;
    border-radius: 8px;
}

/* Drag handle */
.drag-handle {
    cursor: grab;
    padding: 6px;
    user-select: none;
    color: #666;
    font-weight: bold;
    background-color: #e8e8e8;
    border-radius: 3px;
    margin-right: 8px;
    transition: background-color 0.2s ease;
    font-size: 12px;
}

.drag-handle:hover {
    background-color: #d8d8d8;
    color: #444;
}

.drag-handle:active {
    cursor: grabbing;
    background-color: #c8c8c8;
}

/* Remove button */
.remove-button {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 6px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-button:hover {
    background: #c82333;
    transform: scale(1.1);
}

#fileList li:hover .remove-button {
    display: flex;
}

/* Sortable states */
.sortable-chosen {
    opacity: 0.8;
    transform: scale(1.02);
    border: 2px solid #a61432;
    background-color: #fff5f5;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.sortable-ghost {
    opacity: 0.3;
    background-color: #f0f0f0;
    border: 2px dashed #999;
}

/* Form elements */
button, input, button > a {
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 12px;
    font-size: 14px;
}

.getFile {
    margin: 0;
    padding: 0;
}

input[type="file"]::file-selector-button, button {
    padding: 8px 10px; /* Slightly smaller */
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    border-radius: 4px;
    box-shadow: 1px 2px 2px 0 rgba(0,0,0,0.15), 2px 4px 4px 0 rgba(0,0,75,0.1);
    transition: background-color 0.2s ease;
}

input[type="file"]::file-selector-button:hover, button:hover {
    background-color: rgba(0,0,0,0.1);
}

/* ===== OUTPUT LIMITS SECTION ===== */
.limits-section {
    background-color: #FBF0F2;
    border: 1px solid #E8C4CC;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.limits-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.limits-title {
    font-size: 14px;
    font-weight: 600;
    color: #6B1626;
}

.reset-limits-btn {
    padding: 4px 10px !important;
    margin: 0 !important;
    font-size: 11px !important;
    background-color: #F0E0E5;
    border: 1px solid #D4B0BA;
    color: #6B1626;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-limits-btn:hover {
    background-color: #E0CCD2;
    border-color: #B07C88;
}

.limits-section .slider-container {
    margin: 8px 0;
}

.limit-slider {
    flex: 1;
    height: 6px;
    background: linear-gradient(to right, #2c2c2c, #ffffff);
    outline: none;
    border-radius: 3px;
    -webkit-appearance: none;
    appearance: none;
}

.limit-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #941F35;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.limit-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #941F35;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.limit-value {
    min-width: 40px;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    color: #6B1626;
}

.limits-hint {
    font-size: 11px;
    color: #8A6A72;
    font-style: italic;
    text-align: center;
    margin-top: 6px;
}

/* Negative output toggle */
.negative-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 8px;
}

.negative-toggle input[type="checkbox"] {
    display: none;
}

.negative-toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background-color: #D4B0BA;
    border-radius: 10px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.negative-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.negative-toggle input:checked + .negative-toggle-slider {
    background-color: #941F35;
}

.negative-toggle input:checked + .negative-toggle-slider::before {
    transform: translateX(16px);
}

.negative-toggle-label {
    font-size: 13px;
    color: #6B1626;
    font-weight: 500;
}

.limits-hint-neg {
    font-size: 11px;
    color: #941F35;
    font-style: italic;
    text-align: center;
    margin-bottom: 6px;
    padding: 4px 8px;
    background-color: #F8E6EB;
    border-radius: 4px;
}

/* Limits section active negative state */
.limits-section.negative-active {
    border-color: #941F35;
    background-color: #FDF0F4;
}

/* ===== END OUTPUT LIMITS SECTION ===== */

/* Slider container */
.slider-container {
    margin: 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-label {
    font-size: 14px;
    color: #666;
    min-width: 80px;
}

#smoothingSlider {
    flex: 1;
    height: 6px;
    background: #ddd;
    outline: none;
    border-radius: 3px;
}

/* Status indicator */
.status-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
}

.status-ready {
    background-color: #d4edda;
    color: #155724;
}

.status-processing {
    background-color: #fff3cd;
    color: #856404;
}

/* Output area */
#output {
    margin-top: 10px;
    font-size: 13px;
    max-height: 100px; /* Limit height for compact layout */
    overflow-y: auto;
    padding: 8px;
    background-color: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* Canvas and visualization */
#curvePreview {
    width: min(380px, 100%); /* Don't exceed container width */
    height: min(380px, 100%); /* Don't exceed container height */
    max-width: 100%; /* Responsive constraint */
    max-height: 100%; /* Responsive constraint */
    border: 1px solid #888;
    margin: 0 auto 15px auto;
    display: block;
}

#legendPanel {
    text-align: center;
    font-size: 12px;
    display: flex;
    flex-direction: column-reverse;
    align-items: left;
    max-width: min(380px, 100%); /* Match canvas width */
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: left;
    margin: 2px 0;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    vertical-align: middle;
    border: 1px solid #000;
}

/* Auto-compute notice */
.auto-compute-notice {
    background-color: #FAFAE8;
    border: 1px solid #D7D781;
    border-radius: 6px;
    padding: 8px;
    margin: 8px 0;
    font-size: 12px;
    color: #6B6B1A;
}

/* Remove zone for drag-to-delete */
.remove-zone {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 120px;
    height: 80px;
    background-color: #dc3545;
    color: white;
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    transition: all 0.2s ease;
    border: 2px dashed rgba(255, 255, 255, 0.5);
}

.remove-zone.drag-over-remove {
    background-color: #c82333;
    transform: scale(1.1);
    border-color: white;
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.5);
}

.remove-zone::before {
    content: "🗑️";
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

/* Dynamic body styles set by JavaScript */
body.dragging {
    user-select: none;
}

/* Processing order indicator */
.processing-order {
    font-size: 12px;
    color: #888;
    font-weight: bold;
    background: #eee;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* Processing notification styles */
.processing-notification {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
    transition: opacity 0.3s ease;
}

.notification-title {
    font-weight: 600;
    color: #856404;
    margin-bottom: 8px;
    font-size: 13px;
}

.processing-order-list {
    margin: 0;
    padding-left: 16px;
    color: #856404;
}

.processing-order-list li {
    margin: 3px 0;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    background-color: rgba(255, 193, 7, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    display: list-item;
}

.notification-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: bold;
    color: #856404;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.notification-close:hover {
    background-color: rgba(133, 100, 4, 0.1);
    color: #664d03;
}

/* Animation for the notification appearing */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== GRAYSCALE FEEDBACK STYLES ===== */

/* Feedback section - fixed for overflow containment */
.feedback-section {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    min-height: 180px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* Prevent any content overflow */
    position: relative; /* Establish containing block for rotated elements */
}

/* Feedback section header */
.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ddd;
}

.feedback-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

/* Mode toggle switch */
.mode-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.mode-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 55px;
    height: 28px;
    background-color: #ccc;
    border-radius: 14px;
    transition: background-color 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.mode-toggle input:checked + .toggle-slider {
    background-color: #2196F3;
}

.mode-toggle input:checked + .toggle-slider::before {
    transform: translateX(27px);
}

.toggle-label {
    font-size: 15px;
    color: #666;
    font-weight: 500;
}

/* Wedge container - fixed for overflow containment */
.wedge-container {
    display: flex;
    align-items: center;
    gap: 20px; /* Reduced gap to save space */
    justify-content: center;
    padding: 0 10px; /* Reduced padding */
    width: 100%;
    overflow: hidden; /* Prevent overflow */
    max-width: 100%; /* Ensure it doesn't exceed parent */
    box-sizing: border-box;
}

.wedge-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0; /* Prevent shrinking */
}

.wedge-title {
    font-size: 16px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.wedge-arrow {
    font-size: 28px; /* Slightly smaller */
    color: #666;
    font-weight: bold;
    margin: 0 10px; /* Reduced margin */
    flex-shrink: 0;
}

/* Step wedge display - fixed for container containment */
.step-wedge {
    display: flex;
    border: 1px solid #888;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 520px; /* Limit total width */
    margin: 0 auto; /* Center the wedge */
    box-sizing: border-box; /* Ensure border is included in width */
}

.wedge-step {
    flex: 1; /* Equal width distribution */
    min-width: 0; /* Allow shrinking */
    height: 50px;
    border-right: 1px solid #555;
    transition: all 0.2s ease;
}

.wedge-step:last-child {
    border-right: none;
}

.wedge-step:hover {
    transform: scaleY(1.1);
    z-index: 10;
    position: relative;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3);
}

/* Value labels - fixed for overflow containment */
.wedge-values {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 520px; /* Match step wedge width */
    margin: 0 auto; /* Center the values */
    height: 40px; /* Fixed height to accommodate rotated text */
    overflow: hidden; /* Prevent rotated text from escaping */
    position: relative; /* Establish containing block */
}

.value-label {
    flex: 1; /* Equal width distribution to match steps */
    min-width: 0; /* Allow shrinking */
    text-align: center;
    font-size: 12px; /* Larger font since we have room now */
    color: #666;
    font-weight: 500;
    padding: 8px 0;
    transition: all 0.2s ease;
    overflow: hidden; /* Changed from visible to hidden */
    white-space: nowrap;
    transform: rotate(90deg); /* Rotate 90 degrees clockwise */
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%; /* Ensure it doesn't exceed its flex container */
    position: relative; /* Help with positioning */
}

.value-label.value-increase {
    color: #e74c3c;
    font-weight: bold;
}

.value-label.value-decrease {
    color: #3498db;
    font-weight: bold;
}

.value-label:hover {
    background-color: rgba(240, 240, 240, 0.8); /* Semi-transparent for rotated text */
    border-radius: 4px;
}

/* Negative mode styling */
.feedback-section.negative-mode {
    background-color: #2c3e50;
    color: #ecf0f1;
    border-color: #34495e;
}

.feedback-section.negative-mode .feedback-header {
    border-bottom-color: #576574;
}

.feedback-section.negative-mode .feedback-header h3 {
    color: #ecf0f1;
}

.feedback-section.negative-mode .wedge-title {
    color: #bdc3c7;
}

.feedback-section.negative-mode .wedge-arrow {
    color: #95a5a6;
}

/* Default color for unchanged values in negative mode */
.feedback-section.negative-mode .value-label {
    color: #bdc3c7;
}

/* Force override for negative mode color coding - use !important to beat any other rules */
.feedback-section.negative-mode .value-label.value-increase {
    color: #e74c3c !important;
    font-weight: bold !important;
}

.feedback-section.negative-mode .value-label.value-decrease {
    color: #3498db !important;
    font-weight: bold !important;
}
.feedback-section.negative-mode .value-label:hover {
    background-color: rgba(189, 195, 199, 0.2); /* Semi-transparent for dark mode */
}

.feedback-section.negative-mode .toggle-label {
    color: #bdc3c7;
}

.feedback-section.negative-mode .feedback-info {
    border-top-color: #576574;
    color: #bdc3c7;
}

/* Responsive adjustments */
@media (max-width: 950px) {
    .main-container {
        width: 95%;
        max-width: 95vw;
        margin: 10px auto 20px auto;
        min-height: 700px; /* Reduced since panels can expand as needed */
    }
    
    .top-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        /* Removed min-height constraint to allow expansion */
    }
    
    .controls-panel {
        order: 1;
        min-height: 300px; /* Smaller minimum when stacked */
    }
    
    .curve-panel {
        order: 2;
        min-height: 460px; /* Minimum height, but can expand */
        /* Removed max-height to allow legend expansion */
    }
    
    #curvePreview {
        width: min(300px, 90%);
        height: min(300px, 90%);
    }
    
    #legendPanel {
        max-width: min(300px, 90%);
    }
    
    .wedge-container {
        gap: 15px;
        padding: 0 5px;
    }
    
    .step-wedge {
        max-width: 400px;
    }
    
    .wedge-values {
        max-width: 400px;
        height: 35px;
    }
}

@media (max-width: 768px) {
    .main-container {
        width: 98%;
        padding: 15px;
        gap: 15px;
        min-height: 750px; /* Reduced since panels can expand as needed */
    }
    
    .top-row {
        gap: 15px;
        /* Removed min-height constraint to allow expansion */
    }
    
    .curve-panel {
        min-height: 420px; /* Minimum height, but can expand */
        /* Removed max-height to allow legend expansion */
    }
    .wedge-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 5px; /* Reduced padding for mobile */
        overflow: hidden; /* Ensure no overflow in mobile */
    }
    
    .wedge-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
    
    .step-wedge {
        max-width: 400px; /* Smaller max width for mobile */
    }
    
    .wedge-values {
        max-width: 400px; /* Match step wedge */
        height: 35px; /* Slightly smaller height for mobile */
    }
    
    .value-label {
        font-size: 11px; /* Slightly smaller font for mobile */
    }
    
    #curvePreview {
        width: min(250px, 85%);
        height: min(250px, 85%);
    }
    
    /* Limits section responsive */
    .limits-section {
        padding: 10px;
    }
    
    .limits-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .processing-notification {
        margin: 10px -12px;
        border-radius: 0;
    }
    
    .processing-order-list li {
        font-size: 10px;
        word-break: break-all;
    }
    
    .step-wedge {
        max-width: 300px; /* Even smaller for very small screens */
    }
    
    .wedge-values {
        max-width: 300px;
        height: 30px; /* Smaller height for very small screens */
    }
    
    .value-label {
        font-size: 10px; /* Smaller font for tiny screens */
    }
    
    .wedge-container {
        padding: 0;
        gap: 15px;
    }
}
