        /* General Reset and Base */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 2px;
        }

        /* Container - main card */
        .container {
            background: white;
            border-radius: 12px;
            padding: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
            max-width: 500px;
            width: 100%;
        }

        /* Headings and Subtitle */
        h1 {
            color: #333;
            margin-bottom: 2px;
            font-size: 20px;
        }

        .subtitle {
            color: #666;
            margin-bottom: 8px;
            font-size: 12px;
        }

        /* Input Group Sections */
        .input-group {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 10px;
            margin-bottom: 8px;
        }

        .input-group h3 {
            color: #667eea;
            margin-bottom: 3px;
            font-size: 15px;
        }

        /* Input Rows */
        .input-row {
            display: flex;
            gap: 6px;
            margin-bottom: 2px;
            flex-wrap: nowrap;
            /* prevent wrapping */
        }

        .input-field {
            flex: 1;
            min-width: 0;
            /* CRITICAL: prevents overlap */
        }

        /* Labels and Inputs */
        label {
            display: block;
            color: #555;
            margin-bottom: 1px;
            font-size: 10px;
            font-weight: 500;
        }

        /* Stepper Styles (Narrower + No Overlap) */
        .input-stepper {
            display: flex;
            width: 100%;
            border: 1px solid #e0e0e0;
            border-radius: 4px;
            overflow: hidden;
            /* keeps buttons contained */
        }

        .input-stepper input {
            border: none;
            padding: 2px 3px;
            /* narrower input */
            text-align: center;
            flex-grow: 1;
            font-size: 12px;
            min-width: 0;
            /* allows shrinking */
        }

        .input-stepper button {
            display: block;
            background: #e9ecef;
            border: none;
            width: 22px;
            /* narrower buttons */
            padding: 0;
            cursor: pointer;
            font-size: 14px;
            line-height: 1;
            color: #555;
            transition: background 0.2s;
        }

        .input-stepper button:hover {
            background: #dee2e6;
        }

        .input-stepper button:first-child {
            border-right: 1px solid #e0e0e0;
            border-radius: 4px 0 0 4px;
        }

        .input-stepper button:last-child {
            border-left: 1px solid #e0e0e0;
            border-radius: 0 4px 4px 0;
        }

        /* Original input/select styles for non-stepper inputs */
        input:not(.pace-input):not(.time-input):not(.dist-input),
        select {
            width: 100%;
            padding: 5px;
            border: 1px solid #e0e0e0;
            border-radius: 4px;
            font-size: 13px;
            transition: border-color 0.3s;
        }

        /* Style for invalid input */
        input:invalid:not(:placeholder-shown) {
            border-color: red;
        }

        input:focus,
        select:focus {
            outline: none;
            border-color: #667eea;
        }

        /* Helper Text */
        .helper-text {
            font-size: 10px;
            color: #888;
            margin-top: 3px;
        }

        /* Button (Hidden as calculation is automatic) */
        button {
            display: none;
        }

        /* Results Section */
        .result {
            margin-top: 8px;
            padding: 10px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 8px;
            color: white;
        }

        .result.show {
            animation: slideIn 0.3s ease-out;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .result h2 {
            margin-bottom: 6px;
            font-size: 16px;
        }

        .result-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(255, 255, 255, 0.2);
            padding: 5px 8px;
            border-radius: 4px;
            margin-bottom: 4px;
            font-size: 12px;
        }

        .result-item:last-child {
            margin-bottom: 0;
        }

        .result-value {
            font-weight: 600;
            font-size: 14px;
        }